mbox series

[0/3] arm64: PAC stripping cleanups

Message ID 20230314162044.888747-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: PAC stripping cleanups | expand

Message

Mark Rutland March 14, 2023, 4:20 p.m. UTC
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(-)