[PATCH v2 1/2] powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o
Sourabh Jain
sourabhjain at linux.ibm.com
Sat Apr 4 14:20:13 AEDT 2026
On 04/04/26 06:27, Ritesh Harjani (IBM) wrote:
> Sourabh Jain <sourabhjain at linux.ibm.com> writes:
>
>> 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: 2ab2d5794f14 ("powerpc/kasan: Disable address sanitization in kexec paths")
>> Reported-by: Venkat Rao Bagalkote <venkat88 at linux.ibm.com>
>> Closes: https://lore.kernel.org/all/1dee8891-8bcc-46b4-93f3-fc3a774abd5b@linux.ibm.com/
>> Cc: Aboorva Devarajan <aboorvad at linux.ibm.com>
>> Cc: Aditya Gupta <adityag at linux.ibm.com>
>> Cc: Daniel Axtens <dja at axtens.net>
>> Cc: Hari Bathini <hbathini at linux.ibm.com>
>> Cc: Madhavan Srinivasan <maddy at linux.ibm.com>
>> Cc: Michael Ellerman <mpe at ellerman.id.au>
>> Cc: Shivang Upadhyay <shivangu at linux.ibm.com>
> I guess you missed adding:
> Cc: stable at vger.kernel.org
You’re right, I missed it.
I’ll include it in the next revision.
Thanks,
Sourabh Jain
More information about the Linuxppc-dev
mailing list