mbox series

[v5,0/2] arm64: split ARM64_PTR_AUTH option to userspace and kernel

Message ID 20210604100437.1658599-1-daniel.kiss@arm.com (mailing list archive)
Headers show
Series arm64: split ARM64_PTR_AUTH option to userspace and kernel | expand

Message

Daniel Kiss June 4, 2021, 10:04 a.m. UTC
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 5.13-rc4

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

Changes from v4:
* Rebased to 5.13-rc4.

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 | 49 +++++++++++--------
 arch/arm64/include/asm/pointer_auth.h     | 59 +++++++++++++----------
 arch/arm64/include/asm/processor.h        |  2 +
 arch/arm64/kernel/asm-offsets.c           |  4 ++
 drivers/misc/lkdtm/bugs.c                 |  6 +--
 7 files changed, 91 insertions(+), 64 deletions(-)