[PATCH 0/3] arm64: PAC stripping cleanups

Mark Rutland mark.rutland at arm.com
Tue Mar 14 09:20:41 PDT 2023


While working on some stacktrace and noinstr cleanups, I spotted that
we're doing a bunch of redundant work to strip PACs from pointers which
have already been stripped. Further, for historical reasons we use C
code to strip PACs when we can easily use XPACLRI.

These patches clean up the PAC stripping, removing the redundant work
and making better use of XPACLRI to strip PACs in the kernel.

Thanks,
Mark.

Mark Rutland (3):
  arm64: avoid redundant PAC stripping in __builtin_return_address()
  arm64: use XPACLRI to strip PAC
  arm64: move PAC masks to <asm/pointer_auth.h>

 arch/arm64/Kconfig                    | 14 +++++++++++
 arch/arm64/include/asm/compiler.h     | 36 +++++++++++++++++++--------
 arch/arm64/include/asm/pointer_auth.h | 13 +++++-----
 arch/arm64/kernel/crash_core.c        |  1 +
 arch/arm64/kernel/perf_callchain.c    |  2 +-
 arch/arm64/kernel/process.c           |  2 +-
 arch/arm64/kernel/stacktrace.c        |  2 +-
 7 files changed, 50 insertions(+), 20 deletions(-)

-- 
2.30.2




More information about the linux-arm-kernel mailing list