From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
Aboorva Devarajan <aboorvad@linux.ibm.com>,
Aditya Gupta <adityag@linux.ibm.com>,
Daniel Axtens <dja@axtens.net>,
Hari Bathini <hbathini@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Shivang Upadhyay <shivangu@linux.ibm.com>
Subject: Re: [PATCH 1/2] powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o
Date: Wed, 1 Apr 2026 19:12:27 +0530 [thread overview]
Message-ID: <82c2fcd1-1756-4f61-b4cd-f02767701737@linux.ibm.com> (raw)
In-Reply-To: <tstzmm8o.ritesh.list@gmail.com>
On 29/03/26 07:26, Ritesh Harjani (IBM) wrote:
> Sourabh Jain <sourabhjain@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@linux.ibm.com>
>> Closes: https://lore.kernel.org/all/1dee8891-8bcc-46b4-93f3-fc3a774abd5b@linux.ibm.com/
> 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) <ritesh.list@gmail.com>
>
Thanks for the review Ritesh.
- Sourabh Jain
prev parent reply other threads:[~2026-04-01 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 5:31 [PATCH 1/2] powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o Sourabh Jain
2026-03-21 5:31 ` [PATCH 2/2] powerpc/kexec: Disable KASAN for VMX helpers used in MMU-off path Sourabh Jain
2026-03-29 1:18 ` Ritesh Harjani
2026-04-02 0:04 ` Ritesh Harjani
2026-04-02 3:59 ` Sourabh Jain
2026-03-23 6:11 ` [PATCH 1/2] powerpc/kdump: fix KASAN sanitization flag for core_$(BITS).o Mahesh J Salgaonkar
2026-03-23 10:36 ` Sourabh Jain
2026-03-23 8:53 ` Venkat Rao Bagalkote
2026-03-29 1:56 ` Ritesh Harjani
2026-04-01 13:42 ` Sourabh Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82c2fcd1-1756-4f61-b4cd-f02767701737@linux.ibm.com \
--to=sourabhjain@linux.ibm.com \
--cc=aboorvad@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=dja@axtens.net \
--cc=hbathini@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=ritesh.list@gmail.com \
--cc=shivangu@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox