Skip to content

Commit 35f8458

Browse files
committed
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
2 parents 1a2b418 + f525999 commit 35f8458

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/kernel/cpufeature.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,10 @@ static int __init __kpti_install_ng_mappings(void *__unused)
18391839

18401840
static void __init kpti_install_ng_mappings(void)
18411841
{
1842+
/* Check whether KPTI is going to be used */
1843+
if (!cpus_have_cap(ARM64_UNMAP_KERNEL_AT_EL0))
1844+
return;
1845+
18421846
/*
18431847
* We don't need to rewrite the page-tables if either we've done
18441848
* it already or we have KASLR enabled and therefore have not

0 commit comments

Comments
 (0)