[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250801131327.8627459bf3d94895d42b95b2@linux-foundation.org>
Date: Fri, 1 Aug 2025 13:13:27 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: thomas.weissschuh@...utronix.de, ryabinin.a.a@...il.com,
glider@...gle.com, andreyknvl@...il.com, dvyukov@...gle.com,
vincenzo.frascino@....com, kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] kunit: kasan_test: disable fortify string checker on
kasan_strings() test
On Fri, 1 Aug 2025 13:02:36 +0100 Yeoreum Yun <yeoreum.yun@....com> wrote:
> Similar to commit 09c6304e38e4 ("kasan: test: fix compatibility with
> FORTIFY_SOURCE") the kernel is panicing in kasan_string().
>
> This is due to the `src` and `ptr` not being hidden from the optimizer
> which would disable the runtime fortify string checker.
>
> Call trace:
> __fortify_panic+0x10/0x20 (P)
> kasan_strings+0x980/0x9b0
> kunit_try_run_case+0x68/0x190
> kunit_generic_run_threadfn_adapter+0x34/0x68
> kthread+0x1c4/0x228
> ret_from_fork+0x10/0x20
> Code: d503233f a9bf7bfd 910003fd 9424b243 (d4210000)
> ---[ end trace 0000000000000000 ]---
> note: kunit_try_catch[128] exited with irqs disabled
> note: kunit_try_catch[128] exited with preempt_count 1
> # kasan_strings: try faulted: last
> ** replaying previous printk message **
> # kasan_strings: try faulted: last line seen mm/kasan/kasan_test_c.c:1600
> # kasan_strings: internal error occurred preventing test case from running: -4
>
We don't want -stable kernels to panic either. I'm thinking
Fixes: 73228c7ecc5e ("KASAN: port KASAN Tests to KUnit")
Cc: <stable@...r.kernel.org>
What do you think?
We could perhaps go back earlier in time, but 73228c7ecc5e is 5 years
old.
Powered by blists - more mailing lists