summaryrefslogtreecommitdiff
path: root/arch/arm64/Kconfig.debug
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-31 20:44:59 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2020-04-01 21:23:40 +0100
commitb8fdef311a0bd9223f10754f94fdcf1a594a3457 (patch)
tree7d16fba0e73e40131b3b3aa793abf947a93e73b9 /arch/arm64/Kconfig.debug
parent15cd0e675f3f76b4d21c313795fe0c23df0ee20f (diff)
downloadlwn-b8fdef311a0bd9223f10754f94fdcf1a594a3457.tar.gz
lwn-b8fdef311a0bd9223f10754f94fdcf1a594a3457.zip
arm64: Always force a branch protection mode when the compiler has one
Compilers with branch protection support can be configured to enable it by default, it is likely that distributions will do this as part of deploying branch protection system wide. As well as the slight overhead from having some extra NOPs for unused branch protection features this can cause more serious problems when the kernel is providing pointer authentication to userspace but not built for pointer authentication itself. In that case our switching of keys for userspace can affect the kernel unexpectedly, causing pointer authentication instructions in the kernel to corrupt addresses. To ensure that we get consistent and reliable behaviour always explicitly initialise the branch protection mode, ensuring that the kernel is built the same way regardless of the compiler defaults. Fixes: 7503197562567 (arm64: add basic pointer authentication support) Reported-by: Szabolcs Nagy <szabolcs.nagy@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org [catalin.marinas@arm.com: remove Kconfig option in favour of Makefile check] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/Kconfig.debug')
0 files changed, 0 insertions, 0 deletions