linux/arch/x86/mm
Hou Wenlong a0cb371b52 x86/bug: Handle __WARN_printf() trap in early_fixup_exception()
The commit 5b472b6e5b ("x86_64/bug: Implement __WARN_printf()")
implemented __WARN_printf(), which changed the mechanism to use UD1
instead of UD2. However, it only handles the trap in the runtime IDT
handler, while the early booting IDT handler lacks this handling. As a
result, the usage of WARN() before the runtime IDT setup can lead to
kernel crashes. Since KMSAN is enabled after the runtime IDT setup, it
is safe to use handle_bug() directly in early_fixup_exception() to
address this issue.

Fixes: 5b472b6e5b ("x86_64/bug: Implement __WARN_printf()")
Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/c4fb3645f60d3a78629d9870e8fcc8535281c24f.1768016713.git.houwenlong.hwl@antgroup.com
2026-02-23 11:19:11 +01:00
..
pat Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
amdtopology.c x86/platform/amd: Move the <asm/amd_nb.h> header to <asm/amd/nb.h> 2025-04-14 09:34:14 +02:00
cpu_entry_area.c x86/cpu_entry_area: Annotate percpu_setup_exception_stacks() as __init 2024-08-25 14:29:38 +02:00
debug_pagetables.c x86/bugs: Rename CONFIG_PAGE_TABLE_ISOLATION => CONFIG_MITIGATION_PAGE_TABLE_ISOLATION 2024-01-10 10:52:28 +01:00
dump_pagetables.c x86/mm: Drop unnecessary export of "ptdump_walk_pgd_level_debugfs" 2025-11-12 15:24:42 -08:00
extable.c x86/bug: Handle __WARN_printf() trap in early_fixup_exception() 2026-02-23 11:19:11 +01:00
fault.c x86: make page fault handling disable interrupts properly 2026-01-22 16:49:17 -08:00
hugetlbpage.c mm, arch: consolidate hugetlb CMA reservation 2026-01-26 20:02:19 -08:00
ident_map.c x86/mm/ident_map: Fix theoretical virtual address overflow to zero 2025-03-19 11:12:29 +01:00
init.c mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
init_32.c arch, mm: consolidate initialization of SPARSE memory model 2026-01-26 20:02:18 -08:00
init_64.c arch, mm: consolidate initialization of SPARSE memory model 2026-01-26 20:02:18 -08:00
iomap_32.c io-mapping: Cleanup atomic iomap 2020-11-06 23:14:58 +01:00
ioremap.c mm, x86: use for_each_valid_pfn() from __ioremap_check_ram() 2025-05-12 23:50:44 -07:00
kasan_init_64.c kasan: call kasan_init_generic in kasan_init 2025-09-21 14:21:58 -07:00
kaslr.c x86/kaslr: Recognize all ZONE_DEVICE users as physaddr consumers 2026-01-05 18:05:55 -07:00
kmmio.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
kmsan_shadow.c x86: kmsan: handle CPU entry area 2022-10-03 14:03:26 -07:00
maccess.c x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault() 2024-02-15 19:21:39 -08:00
Makefile Move the x86 page fault tracepoints to generic code, because 2025-05-26 21:18:59 -07:00
mem_encrypt.c x86/sev: Add Secure TSC support for SNP guests 2025-01-07 20:27:23 +01:00
mem_encrypt_amd.c x86/sev: Avoid global variable to store virtual address of SVSM area 2025-09-03 17:58:15 +02:00
mem_encrypt_boot.S x86/boot: Create a confined code area for startup code 2025-09-03 18:00:01 +02:00
mm_internal.h arch, mm: consolidate initialization of nodes, zones and memory map 2026-01-26 20:02:18 -08:00
mmap.c mm: constify arch_pick_mmap_layout() for improved const-correctness 2025-09-21 14:22:14 -07:00
mmio-mod.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
numa.c drivers/base/node: fold register_node() into register_one_node() 2025-11-16 17:28:02 -08:00
pf_in.c
pf_in.h
pgprot.c mm: change vm_get_page_prot() to accept vm_flags_t argument 2025-07-09 22:42:13 -07:00
pgtable.c x86/mm: use 'ptdesc' when freeing PMD pages 2025-11-16 17:28:17 -08:00
pgtable_32.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
physaddr.c x86/mm: Unify __phys_addr_symbol() 2025-10-24 22:13:00 +02:00
physaddr.h
pkeys.c x86/pkeys: Clarify PKRU_AD_KEY macro 2022-06-07 16:06:33 -07:00
pti.c treewide: Update email address 2026-01-11 06:09:11 -10:00
srat.c x86/mm: Don't print out SRAT table information 2024-08-08 17:23:40 +02:00
testmmiotrace.c x86/mm: add testmmiotrace MODULE_DESCRIPTION() 2024-09-01 20:43:31 -07:00
tlb.c x86/mm: Hide mm_free_global_asid() definition under CONFIG_BROADCAST_TLB_FLUSH 2026-01-16 22:16:32 +01:00