mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
x86/pti: Add attack vector controls for PTI
Disable PTI mitigation if user->kernel attack vector mitigations are disabled. Signed-off-by: David Kaplan <david.kaplan@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/20250707183316.1349127-20-david.kaplan@amd.com
This commit is contained in:
parent
0cdd2c4f35
commit
02c7d5b8e0
|
|
@ -38,6 +38,7 @@
|
|||
#include <asm/desc.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/set_memory.h>
|
||||
#include <asm/bugs.h>
|
||||
|
||||
#undef pr_fmt
|
||||
#define pr_fmt(fmt) "Kernel/User page tables isolation: " fmt
|
||||
|
|
@ -84,7 +85,8 @@ void __init pti_check_boottime_disable(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (cpu_mitigations_off())
|
||||
if (pti_mode == PTI_AUTO &&
|
||||
!cpu_attack_vector_mitigated(CPU_MITIGATE_USER_KERNEL))
|
||||
pti_mode = PTI_FORCE_OFF;
|
||||
if (pti_mode == PTI_FORCE_OFF) {
|
||||
pti_print_if_insecure("disabled on command line.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user