Re: [RFC v2 5/7] arm64: initialize and switch ptrauth kernel keys
From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2019-06-06 16:44:43
On Wed, May 29, 2019 at 08:03:30PM +0100, Kristina Martsenko wrote:
- Added ISB after key install in kernel_exit, in case in the future C function calls are added after the macro
[...]
quoted hunk ↗ jump to hunk
diff --git a/arch/arm64/include/asm/asm_pointer_auth.h b/arch/arm64/include/asm/asm_pointer_auth.h index e3bfddfe80b6..f595da9661a4 100644 --- a/arch/arm64/include/asm/asm_pointer_auth.h +++ b/arch/arm64/include/asm/asm_pointer_auth.h@@ -25,11 +25,24 @@ alternative_if ARM64_HAS_ADDRESS_AUTH ldp \tmp2, \tmp3, [\tmp1, #PTRAUTH_KEY_APDB] msr_s SYS_APDBKEYLO_EL1, \tmp2 msr_s SYS_APDBKEYHI_EL1, \tmp3 + isb alternative_else_nop_endif alternative_if ARM64_HAS_GENERIC_AUTH ldp \tmp2, \tmp3, [\tmp1, #PTRAUTH_KEY_APGA] msr_s SYS_APGAKEYLO_EL1, \tmp2 msr_s SYS_APGAKEYHI_EL1, \tmp3 + isb +alternative_else_nop_endif
I couldn't find the previous discussions, so why are the ISBs needed here? Is this macro not invoked only on the kernel_exit path? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel