On 29/03/26 07:26, Ritesh Harjani (IBM) wrote:
Sourabh Jain <[email protected]> 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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/Nice catch. Indeed seems to be missed in the Fixes patch. I think you might want to Cc: stable too, so that it is auto backported to previous stable kernel releases too. The Fixes patch was added in v5.19 kernel, maybe we weren't testing KASAN + Kdump, but it's worth backporting to all stable kernel releases, IMO.
Yes, it is worth backporting this to the stable trees. I will update it in v2.
LGTM, please feel free to add: Reviewed-by: Ritesh Harjani (IBM) <[email protected]>
Thanks for the review Ritesh. - Sourabh Jain
