[PATCH v4 0/2] arm64: split ARM64_PTR_AUTH option to userspace and kernel

Daniel Kiss daniel.kiss at arm.com
Fri Apr 16 13:50:13 BST 2021


This patch series is to support pointer authentication in userspace
independently from the kernel use.

Use of pointer authentication in kernel depends on toolchain suppport
and might not be desired in production due to deployment problems.
Debugging the kernel also a bit harder with PAC. Let the distributions
choose where the pointer authentication is used. 
Config structure for BTI is similar.

This patch series can be cleanly applied on v5.12.rc7

The patch series has been tested on Arm FVP in all three
config combinations.

Changes from v3:
* Removed the duplicated #ifdef block in asm/pointer_auth.h.

Changes from v2:
* Moved the toolchain version check under ARM64_PTR_AUTH_KERNEL.

Changes from v1:
* Keep the A key in register while running in the kernel.

Daniel Kiss (2):
  arm64: Add ARM64_PTR_AUTH_KERNEL config option
  arm64: Conditionally configure PTR_AUTH key of the kernel.

 arch/arm64/Kconfig                        | 33 +++++++-----
 arch/arm64/Makefile                       |  2 +-
 arch/arm64/include/asm/asm_pointer_auth.h | 63 +++++++++++++----------
 arch/arm64/include/asm/pointer_auth.h     | 44 +++++++++-------
 arch/arm64/include/asm/processor.h        |  2 +
 arch/arm64/kernel/asm-offsets.c           |  4 ++
 drivers/misc/lkdtm/bugs.c                 |  6 +--
 7 files changed, 90 insertions(+), 64 deletions(-)

-- 
2.25.1




More information about the linux-arm-kernel mailing list