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

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -97,7 +97,10 @@ static void init_x2apic_ldr(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 apic == &apic_x2apic_phys;
+4 −4
Original line number Diff line number Diff line
@@ -172,10 +172,10 @@ void __meminit init_trampoline_kaslr(void)
		set_p4d(p4d_tramp,
			__p4d(_KERNPG_TABLE | __pa(pud_page_tramp)));

		set_pgd(&trampoline_pgd_entry,
			__pgd(_KERNPG_TABLE | __pa(p4d_page_tramp)));
		trampoline_pgd_entry =
			__pgd(_KERNPG_TABLE | __pa(p4d_page_tramp));
	} else {
		set_pgd(&trampoline_pgd_entry,
			__pgd(_KERNPG_TABLE | __pa(pud_page_tramp)));
		trampoline_pgd_entry =
			__pgd(_KERNPG_TABLE | __pa(pud_page_tramp));
	}
}