linux/arch/powerpc/kexec
Sourabh Jain b3a97f9484 powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o
KASAN instrumentation is intended to be disabled for the kexec core
code, but the existing Makefile entry misses the object suffix. As a
result, the flag is not applied correctly to core_$(BITS).o.

So when KASAN is enabled, kexec_copy_flush and copy_segments in
kexec/core_64.c are instrumented, which can result in accesses to
shadow memory via normal address translation paths. Since these run
with the MMU disabled, such accesses may trigger page faults
(bad_page_fault) that cannot be handled in the kdump path, ultimately
causing a hang and preventing the kdump kernel from booting. The same
is true for kexec as well, since the same functions are used there.

Update the entry to include the “.o” suffix so that KASAN
instrumentation is properly disabled for this object file.

Fixes: 2ab2d5794f ("powerpc/kasan: Disable address sanitization in kexec paths")
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Closes: https://lore.kernel.org/all/1dee8891-8bcc-46b4-93f3-fc3a774abd5b@linux.ibm.com/
Cc: stable@vger.kernel.org
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Acked-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Reviewed-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
Tested-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260407124349.1698552-1-sourabhjain@linux.ibm.com
2026-05-06 07:31:27 +05:30
..
core_32.c kexec: Consolidate machine_kexec_mask_interrupts() implementation 2024-12-11 20:32:34 +01:00
core_64.c powerpc/kexec: Enable SMT before waking offline CPUs 2025-12-22 17:53:37 +05:30
core.c powerpc/kexec/core: use big-endian types for crash variables 2026-03-04 11:08:57 +05:30
crash.c powerpc/crash: Update backup region offset in elfcorehdr on memory hotplug 2026-04-01 09:21:04 +05:30
elf_64.c arm64,ppc64le/kdump: pass dm-crypt keys to kdump kernel 2026-04-02 23:36:24 -07:00
file_load_64.c powerpc/crash: Update backup region offset in elfcorehdr on memory hotplug 2026-04-01 09:21:04 +05:30
file_load.c powerpc: Delete unused function delete_fdt_mem_rsv() 2021-03-08 12:06:30 -07:00
Makefile powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o 2026-05-06 07:31:27 +05:30
ranges.c powerpc/kdump: Fix size calculation for hot-removed memory ranges 2025-11-11 14:11:55 +05:30
relocate_32.S powerpc/kexec: fix physical address calculation in clear_utlb_entry() 2025-03-10 10:10:55 +05:30
vmcore_info.c arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c 2024-02-23 17:48:25 -08:00