* [PATCH v4 11/12] arch/um: don't initialize kasan if it's disabled [not found] <20251128033320.1349620-1-bhe@redhat.com> @ 2025-11-28 3:33 ` Baoquan He 2025-12-01 10:56 ` Johannes Berg 0 siblings, 1 reply; 3+ messages in thread From: Baoquan He @ 2025-11-28 3:33 UTC (permalink / raw) To: linux-mm Cc: ryabinin.a.a, andreyknvl, glider, dvyukov, vincenzo.frascino, akpm, kasan-dev, linux-kernel, kexec, elver, sj, lorenzo.stoakes, snovitoll, christophe.leroy, Baoquan He, linux-um And also do the kasan_arg_disabled chekcing before kasan_flag_enabled enabling to make sure kernel parameter kasan=on|off has been parsed. Signed-off-by: Baoquan He <bhe@redhat.com> Cc: linux-um@lists.infradead.org --- arch/um/kernel/mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 39c4a7e21c6f..08cd012a6bb8 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -62,8 +62,11 @@ static unsigned long brk_end; void __init arch_mm_preinit(void) { +#ifdef CONFIG_KASAN /* Safe to call after jump_label_init(). Enables KASAN. */ - kasan_init_generic(); + if (!kasan_arg_disabled) + kasan_init_generic(); +#endif /* clear the zero-page */ memset(empty_zero_page, 0, PAGE_SIZE); -- 2.41.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4 11/12] arch/um: don't initialize kasan if it's disabled 2025-11-28 3:33 ` [PATCH v4 11/12] arch/um: don't initialize kasan if it's disabled Baoquan He @ 2025-12-01 10:56 ` Johannes Berg 2025-12-02 13:13 ` Baoquan He 0 siblings, 1 reply; 3+ messages in thread From: Johannes Berg @ 2025-12-01 10:56 UTC (permalink / raw) To: Baoquan He, linux-mm Cc: ryabinin.a.a, andreyknvl, glider, dvyukov, vincenzo.frascino, akpm, kasan-dev, linux-kernel, kexec, elver, sj, lorenzo.stoakes, snovitoll, christophe.leroy, linux-um On Fri, 2025-11-28 at 11:33 +0800, Baoquan He wrote: > And also do the kasan_arg_disabled chekcing before kasan_flag_enabled ^^^^^^^^ typo > enabling to make sure kernel parameter kasan=on|off has been parsed. But I'm not sure how to understand that sentence. And I have no idea what to do with this patch, with it being random CC of the middle of the series. johannes ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4 11/12] arch/um: don't initialize kasan if it's disabled 2025-12-01 10:56 ` Johannes Berg @ 2025-12-02 13:13 ` Baoquan He 0 siblings, 0 replies; 3+ messages in thread From: Baoquan He @ 2025-12-02 13:13 UTC (permalink / raw) To: Johannes Berg Cc: linux-mm, ryabinin.a.a, andreyknvl, glider, dvyukov, vincenzo.frascino, akpm, kasan-dev, linux-kernel, kexec, elver, sj, lorenzo.stoakes, snovitoll, christophe.leroy, linux-um On 12/01/25 at 11:56am, Johannes Berg wrote: > On Fri, 2025-11-28 at 11:33 +0800, Baoquan He wrote: > > And also do the kasan_arg_disabled chekcing before kasan_flag_enabled > ^^^^^^^^ > > typo Thanks, will fix. > > > enabling to make sure kernel parameter kasan=on|off has been parsed. > > But I'm not sure how to understand that sentence. > > And I have no idea what to do with this patch, with it being random CC > of the middle of the series. Sorry for the inconvenience. I am worried several rounds of posting could bomb receivers's mail box, so only add arch's mailing list to CC in each arch's relevant patch. The whole patchset can be found at below link. And the whole patchset are sent to linux-mm, lkml and kexec mailing lists if subscribed any of them. [PATCH v4 00/12] mm/kasan: make kasan=on|off work for all three modes https://lore.kernel.org/all/20251128033320.1349620-1-bhe@redhat.com/T/#u Thanks Baoquan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-02 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20251128033320.1349620-1-bhe@redhat.com>
2025-11-28 3:33 ` [PATCH v4 11/12] arch/um: don't initialize kasan if it's disabled Baoquan He
2025-12-01 10:56 ` Johannes Berg
2025-12-02 13:13 ` Baoquan He
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox