|author||Mark Brown <email@example.com>||2019-12-09 18:12:14 +0000|
|committer||Will Deacon <firstname.lastname@example.org>||2020-01-15 14:11:02 +0000|
|parent||Linux 5.5-rc3 (diff)|
arm64: Add initial support for E0PD
Kernel Page Table Isolation (KPTI) is used to mitigate some speculation based security issues by ensuring that the kernel is not mapped when userspace is running but this approach is expensive and is incompatible with SPE. E0PD, introduced in the ARMv8.5 extensions, provides an alternative to this which ensures that accesses from userspace to the kernel's half of the memory map to always fault with constant time, preventing timing attacks without requiring constant unmapping and remapping or preventing legitimate accesses. Currently this feature will only be enabled if all CPUs in the system support E0PD, if some CPUs do not support the feature at boot time then the feature will not be enabled and in the unlikely event that a late CPU is the first CPU to lack the feature then we will reject that CPU. This initial patch does not yet integrate with KPTI, this will be dealt with in followup patches. Ideally we could ensure that by default we don't use KPTI on CPUs where E0PD is present. Signed-off-by: Mark Brown <email@example.com> Reviewed-by: Suzuki K Poulose <firstname.lastname@example.org> [will: Fixed typo in Kconfig text] Signed-off-by: Will Deacon <email@example.com>
Diffstat (limited to 'arch/arm64/Kconfig')
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b1b4476ddb83..9cee2008ea9e 100644
@@ -1484,6 +1484,22 @@ config ARM64_PTR_AUTH
+menu "ARMv8.5 architectural features"
+ bool "Enable support for E0PD"
+ default y
+ E0PD (part of the ARMv8.5 extensions) allows us to ensure
+ that EL0 accesses made via TTBR1 always fault in constant time,
+ providing similar benefits to KASLR as those provided by KPTI, but
+ with lower overhead and without disrupting legitimate access to
+ kernel memory such as SPE.
+ This option enables E0PD for TTBR1 where available.
bool "ARM Scalable Vector Extension support"