arm64: Conditionally configure PTR_AUTH key of the kernel.
authorDaniel Kiss <daniel.kiss@arm.com>
Sun, 13 Jun 2021 09:26:32 +0000 (11:26 +0200)
committerWill Deacon <will@kernel.org>
Tue, 15 Jun 2021 10:32:31 +0000 (11:32 +0100)
commitd053e71ac8442d4fd24fb85591489813cdb56365
tree442db612f4fa71991b35f56b2a3e683da4211702
parentb27a9f4119afa460289cd327f403e2ec9c8e0511
arm64: Conditionally configure PTR_AUTH key of the kernel.

If the kernel is not compiled with CONFIG_ARM64_PTR_AUTH_KERNEL=y,
then no PACI/AUTI instructions are expected while the kernel is running
so the kernel's key will not be used. Write of a system registers
is expensive therefore avoid if not required.

Signed-off-by: Daniel Kiss <daniel.kiss@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210613092632.93591-3-daniel.kiss@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Kconfig
arch/arm64/include/asm/asm_pointer_auth.h
arch/arm64/include/asm/pointer_auth.h
arch/arm64/include/asm/processor.h
arch/arm64/kernel/asm-offsets.c