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

Changed files
+8 -5
arch
x86
kernel
mm
+4 -1
arch/x86/kernel/apic/x2apic_phys.c
··· 97 97 98 98 static int x2apic_phys_probe(void) 99 99 { 100 - if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys())) 100 + if (!x2apic_mode) 101 + return 0; 102 + 103 + if (x2apic_phys || x2apic_fadt_phys()) 101 104 return 1; 102 105 103 106 return apic == &apic_x2apic_phys;
+4 -4
arch/x86/mm/kaslr.c
··· 172 172 set_p4d(p4d_tramp, 173 173 __p4d(_KERNPG_TABLE | __pa(pud_page_tramp))); 174 174 175 - set_pgd(&trampoline_pgd_entry, 176 - __pgd(_KERNPG_TABLE | __pa(p4d_page_tramp))); 175 + trampoline_pgd_entry = 176 + __pgd(_KERNPG_TABLE | __pa(p4d_page_tramp)); 177 177 } else { 178 - set_pgd(&trampoline_pgd_entry, 179 - __pgd(_KERNPG_TABLE | __pa(pud_page_tramp))); 178 + trampoline_pgd_entry = 179 + __pgd(_KERNPG_TABLE | __pa(pud_page_tramp)); 180 180 } 181 181 }