Commit 661e723b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Do not use set_pgd() when updating the KASLR trampoline pgd entry
   because that updates the user PGD too on KPTI builds, resulting in
   memory corruption

 - Prevent a panic in the IO-APIC setup code due to conflicting command
   line parameters

* tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
  x86/mm: Avoid using set_pgd() outside of real PGD pages
parents a92b7d26 85d38d58
...@@ -97,7 +97,10 @@ static void init_x2apic_ldr(void) ...@@ -97,7 +97,10 @@ static void init_x2apic_ldr(void)
static int x2apic_phys_probe(void) static int x2apic_phys_probe(void)
{ {
if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys())) if (!x2apic_mode)
return 0;
if (x2apic_phys || x2apic_fadt_phys())
return 1; return 1;
return apic == &apic_x2apic_phys; return apic == &apic_x2apic_phys;
......
...@@ -172,10 +172,10 @@ void __meminit init_trampoline_kaslr(void) ...@@ -172,10 +172,10 @@ void __meminit init_trampoline_kaslr(void)
set_p4d(p4d_tramp, set_p4d(p4d_tramp,
__p4d(_KERNPG_TABLE | __pa(pud_page_tramp))); __p4d(_KERNPG_TABLE | __pa(pud_page_tramp)));
set_pgd(&trampoline_pgd_entry, trampoline_pgd_entry =
__pgd(_KERNPG_TABLE | __pa(p4d_page_tramp))); __pgd(_KERNPG_TABLE | __pa(p4d_page_tramp));
} else { } else {
set_pgd(&trampoline_pgd_entry, trampoline_pgd_entry =
__pgd(_KERNPG_TABLE | __pa(pud_page_tramp))); __pgd(_KERNPG_TABLE | __pa(pud_page_tramp));
} }
} }
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