mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
x86/tboot: Unbreak tboot with PTI enabled
This is another case similar to what EFI does: create a new set of
page tables, map some code at a low address, and jump to it. PTI
mistakes this low address for userspace and mistakenly marks it
non-executable in an effort to make it unusable for userspace.
Undo the poison to allow execution.
Fixes: 385ce0ea4c ("x86/mm/pti: Add Kconfig")
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Andrea Arcangeli <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Jon Masters <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jeff Law <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: David" <[email protected]>
Cc: Nick Clifton <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
committed by
Thomas Gleixner
parent
61dc0f555b
commit
262b6b3008
@@ -127,6 +127,7 @@ static int map_tboot_page(unsigned long vaddr, unsigned long pfn,
|
||||
p4d = p4d_alloc(&tboot_mm, pgd, vaddr);
|
||||
if (!p4d)
|
||||
return -1;
|
||||
pgd->pgd &= ~_PAGE_NX;
|
||||
pud = pud_alloc(&tboot_mm, p4d, vaddr);
|
||||
if (!pud)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user