diff options
author | Daniel Kiss <daniel.kiss@arm.com> | 2021-06-13 11:26:32 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-06-15 12:32:31 +0200 |
commit | d053e71ac8442d4fd24fb85591489813cdb56365 (patch) | |
tree | 442db612f4fa71991b35f56b2a3e683da4211702 /arch/arm64/include/asm/processor.h | |
parent | arm64: Add ARM64_PTR_AUTH_KERNEL config option (diff) | |
download | linux-d053e71ac8442d4fd24fb85591489813cdb56365.tar.xz linux-d053e71ac8442d4fd24fb85591489813cdb56365.zip |
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>
Diffstat (limited to 'arch/arm64/include/asm/processor.h')
-rw-r--r-- | arch/arm64/include/asm/processor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 9df3feeee890..e7d50c6f700d 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -148,8 +148,10 @@ struct thread_struct { struct debug_info debug; /* debugging */ #ifdef CONFIG_ARM64_PTR_AUTH struct ptrauth_keys_user keys_user; +#ifdef CONFIG_ARM64_PTR_AUTH_KERNEL struct ptrauth_keys_kernel keys_kernel; #endif +#endif #ifdef CONFIG_ARM64_MTE u64 gcr_user_excl; #endif |