Commit 35f84584 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Catalin Marinas:
 "Fix a regression where the arm64 KPTI ends up enabled even on systems
  that don't need it"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Avoid enabling KPTI unnecessarily
parents 1a2b4185 f5259997
...@@ -1839,6 +1839,10 @@ static int __init __kpti_install_ng_mappings(void *__unused) ...@@ -1839,6 +1839,10 @@ static int __init __kpti_install_ng_mappings(void *__unused)
static void __init kpti_install_ng_mappings(void) static void __init kpti_install_ng_mappings(void)
{ {
/* Check whether KPTI is going to be used */
if (!cpus_have_cap(ARM64_UNMAP_KERNEL_AT_EL0))
return;
/* /*
* We don't need to rewrite the page-tables if either we've done * We don't need to rewrite the page-tables if either we've done
* it already or we have KASLR enabled and therefore have not * it already or we have KASLR enabled and therefore have not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment