From: Marco Elver <elver@google.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Alexander Potapenko <glider@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Jakub Jelinek <jakub@redhat.com>,
Peter Collingbourne <pcc@google.com>,
kasan-dev <kasan-dev@googlegroups.com>,
open list <linux-kernel@vger.kernel.org>,
kunit-dev@googlegroups.com, lkft-triage@lists.linaro.org,
regressions@lists.linux.dev,
Anders Roxell <anders.roxell@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Andrey Konovalov <andreyknvl@gmail.com>
Subject: Re: next: x86_64: kunit test crashed and kernel panic
Date: Fri, 17 Feb 2023 09:56:34 +0100 [thread overview]
Message-ID: <CANpmjNPLX-1JzSiFzxCyk=Y-zOupMjezeeEGa_wa7+-B5dtc5Q@mail.gmail.com> (raw)
In-Reply-To: <CA+G9fYvLmhfw7dk_rhXBHd7YESGtAndmhdcW2=VGANfk0ho9Uw@mail.gmail.com>
On Fri, 17 Feb 2023 at 08:30, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> Hi Marco,
>
> On Fri, 17 Feb 2023 at 05:22, Marco Elver <elver@google.com> wrote:
> >
> > On Thu, 16 Feb 2023 at 19:59, Alexander Potapenko <glider@google.com> wrote:
> > >
> > > >
> > > > > <4>[ 38.796558] ? kmalloc_memmove_negative_size+0xeb/0x1f0
> > > > > <4>[ 38.797376] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
> > > >
> > > > Most certainly kmalloc_memmove_negative_size() is related.
> > > > Looks like we fail to intercept the call to memmove() in this test,
> > > > passing -2 to the actual __memmove().
> > >
> > > This was introduced by 69d4c0d321869 ("entry, kasan, x86: Disallow
> > > overriding mem*() functions")
> >
> > Ah, thanks!
> >
> > > There's Marco's "kasan: Emit different calls for instrumentable
> > > memintrinsics", but it doesn't fix the problem for me (looking
> > > closer...), and GCC support is still not there, right?
> >
> > Only Clang 15 supports it at this point. Some future GCC will support it.
> >
> > > Failing to intercept memcpy/memset/memmove should normally result in
> > > false negatives, but kmalloc_memmove_negative_size() makes a strong
> > > assumption that KASAN will catch and prevent memmove(dst, src, -2).
> >
> > Ouch - ok, so we need to skip these tests if we know memintrinsics
> > aren't instrumented.
> >
> > I've sent a series here:
> > https://lore.kernel.org/all/20230216234522.3757369-1-elver@google.com/
>
> Thanks for sending this patch series.
>
> I request you to share your Linux tree / branch / sha.
> I will rebuild it with clang-16 and run kunit tests and get back to
> you soon with results.
The series should apply against -next, where you observed the failure.
Otherwise I have them here:
https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git/log/?h=kasan/dev
Thanks,
-- Marco
prev parent reply other threads:[~2023-02-17 8:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 12:13 next: x86_64: kunit test crashed and kernel panic Naresh Kamboju
2023-02-16 12:17 ` Marco Elver
2023-02-16 16:34 ` Alexander Potapenko
2023-02-16 18:58 ` Alexander Potapenko
2023-02-16 23:52 ` Marco Elver
2023-02-17 7:29 ` Naresh Kamboju
2023-02-17 8:56 ` Marco Elver [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='CANpmjNPLX-1JzSiFzxCyk=Y-zOupMjezeeEGa_wa7+-B5dtc5Q@mail.gmail.com' \
--to=elver@google.com \
--cc=anders.roxell@linaro.org \
--cc=andreyknvl@gmail.com \
--cc=arnd@arndb.de \
--cc=glider@google.com \
--cc=jakub@redhat.com \
--cc=kasan-dev@googlegroups.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=pcc@google.com \
--cc=peterz@infradead.org \
--cc=regressions@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).