From d053e71ac8442d4fd24fb85591489813cdb56365 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Sun, 13 Jun 2021 11:26:32 +0200 Subject: 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 Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210613092632.93591-3-daniel.kiss@arm.com Signed-off-by: Will Deacon --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm64/Kconfig') diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 489e3e42320f..dabe9b81012f 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1503,7 +1503,7 @@ config ARM64_PTR_AUTH not be selected. config ARM64_PTR_AUTH_KERNEL - bool + bool "Use pointer authentication for kernel" default y depends on ARM64_PTR_AUTH depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC -- cgit v1.2.3