[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIysGSmWKIhQYid+@e129823.arm.com>
Date: Fri, 1 Aug 2025 12:59:21 +0100
From: Yeoreum Yun <yeoreum.yun@....com>
To: Andrey Konovalov <andreyknvl@...il.com>
Cc: thomas.weissschuh@...utronix.de, ryabinin.a.a@...il.com,
glider@...gle.com, dvyukov@...gle.com, vincenzo.frascino@....com,
akpm@...ux-foundation.org, kasan-dev@...glegroups.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kasan: disable kasan_strings() kunit test when
CONFIG_FORTIFY_SOURCE enabled
Hi Andrey,
> >
> > When CONFIG_FORTIFY_SOURCE is enabled, invalid access from source
> > triggers __fortify_panic() which kills running task.
> >
> > This makes failured of kasan_strings() kunit testcase since the
> > kunit-try-cacth kthread running kasan_string() dies before checking the
> > fault.
> >
> > To address this, add define for __NO_FORTIFY for kasan kunit test.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@....com>
> > ---
> > mm/kasan/Makefile | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
> > index dd93ae8a6beb..b70d76c167ca 100644
> > --- a/mm/kasan/Makefile
> > +++ b/mm/kasan/Makefile
> > @@ -44,6 +44,10 @@ ifndef CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX
> > CFLAGS_KASAN_TEST += -fno-builtin
> > endif
> >
> > +ifdef CONFIG_FORTIFY_SOURCE
> > +CFLAGS_KASAN_TEST += -D__NO_FORTIFY
> > +endif
>
> We should be able to use OPTIMIZER_HIDE_VAR() to deal with this
> instead; see commits b2325bf860fa and 09c6304e38e4.
Thanks for sharing this!
I'll update the patch!
--
Sincerely,
Yeoreum Yun
Powered by blists - more mailing lists