Skip to content
  • Catalin Marinas's avatar
    ef5dd6a0
    arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess · ef5dd6a0
    Catalin Marinas authored
    
    
    On exception entry, the kernel explicitly resets the PSTATE.TCO (tag
    check override) so that any kernel memory accesses will be checked (the
    bit is restored on exception return). This has the side-effect that the
    uaccess routines will not honour the PSTATE.TCO that may have been set
    by the user prior to a syscall.
    
    There is no issue in practice since PSTATE.TCO is expected to be used
    only for brief periods in specific routines (e.g. garbage collection).
    To control the tag checking mode of the uaccess routines, the user will
    have to invoke a corresponding prctl() call.
    
    Document the kernel behaviour w.r.t. PSTATE.TCO accordingly.
    
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Fixes: df9d7a22 ("arm64: mte: Add Memory Tagging Extension documentation")
    Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    ef5dd6a0
    arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess
    Catalin Marinas authored
    
    
    On exception entry, the kernel explicitly resets the PSTATE.TCO (tag
    check override) so that any kernel memory accesses will be checked (the
    bit is restored on exception return). This has the side-effect that the
    uaccess routines will not honour the PSTATE.TCO that may have been set
    by the user prior to a syscall.
    
    There is no issue in practice since PSTATE.TCO is expected to be used
    only for brief periods in specific routines (e.g. garbage collection).
    To control the tag checking mode of the uaccess routines, the user will
    have to invoke a corresponding prctl() call.
    
    Document the kernel behaviour w.r.t. PSTATE.TCO accordingly.
    
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    Fixes: df9d7a22 ("arm64: mte: Add Memory Tagging Extension documentation")
    Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
Loading