linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: thomas.weissschuh@linutronix.de, ryabinin.a.a@gmail.com,
	glider@google.com, andreyknvl@gmail.com, dvyukov@google.com,
	vincenzo.frascino@arm.com, kasan-dev@googlegroups.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] kunit: kasan_test: disable fortify string checker on kasan_strings() test
Date: Fri, 1 Aug 2025 21:24:34 +0100	[thread overview]
Message-ID: <aI0igs82mj5Qowxl@e129823.arm.com> (raw)
In-Reply-To: <20250801131327.8627459bf3d94895d42b95b2@linux-foundation.org>

Hi Andrew,

> > 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@vger.kernel.org>
>
> What do you think?
>
> We could perhaps go back earlier in time, but 73228c7ecc5e is 5 years
> old.

Unless others feel differently, your suggestion works for me.
I had considered including it earlier, but wasn’t entirely sure.

Thanks

--
Sincerely,
Yeoreum Yun


      reply	other threads:[~2025-08-01 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 12:02 Yeoreum Yun
2025-08-01 20:13 ` Andrew Morton
2025-08-01 20:24   ` Yeoreum Yun [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=aI0igs82mj5Qowxl@e129823.arm.com \
    --to=yeoreum.yun@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vincenzo.frascino@arm.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