linux_dsm_epyc7002/arch/arm64
Mark Brown b8fdef311a 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: 7503197562 (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>
2020-04-01 21:23:40 +01:00
..
boot ARMv8 Juno/Fast Models fix for v5.6 2020-02-11 14:47:09 -08:00
configs This pull request contains ARM64 defconfig changes for v5.6, please pull 2020-02-11 14:49:38 -08:00
crypto arm64: crypto: Modernize names for AES function macros 2020-03-09 17:35:04 +00:00
include Merge branch 'for-next/kernel-ptrauth' into for-next/core 2020-03-25 11:11:08 +00:00
kernel Merge branch 'for-next/kernel-ptrauth' into for-next/core 2020-03-25 11:11:08 +00:00
kvm Merge branch 'for-next/asm-cleanups' into for-next/core 2020-03-25 11:10:51 +00:00
lib arm64: fix spelling mistake "ca not" -> "cannot" 2020-03-17 18:22:40 +00:00
mm Merge branch 'for-next/kernel-ptrauth' into for-next/core 2020-03-25 11:11:08 +00:00
net arm64: bpf: optimize modulo operation 2019-09-03 15:44:40 +02:00
xen arm64: xen: Use modern annotations for assembly functions 2020-01-09 16:09:42 +00:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64: Kconfig: ptrauth: Add binutils version check to fix mismatch 2020-04-01 13:26:58 +01:00
Kconfig.debug arm64: mm: convert mm/dump.c to use walk_page_range() 2020-02-04 03:05:25 +00:00
Kconfig.platforms i.MX SoC update for 5.5: 2019-11-06 07:46:42 -08:00
Makefile arm64: Always force a branch protection mode when the compiler has one 2020-04-01 21:23:40 +01:00