All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naresh Kamboju <naresh.kamboju@linaro.org>
To: Marco Elver <elver@google.com>
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 12:59:50 +0530	[thread overview]
Message-ID: <CA+G9fYvLmhfw7dk_rhXBHd7YESGtAndmhdcW2=VGANfk0ho9Uw@mail.gmail.com> (raw)
In-Reply-To: <CANpmjNOciiDNkWDrkQ+BEgAj=rSYGQAuHVS1DTDfvPHSbAndoA@mail.gmail.com>

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.

- Naresh

  reply	other threads:[~2023-02-17  7:30 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 [this message]
2023-02-17  8:56         ` Marco Elver

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='CA+G9fYvLmhfw7dk_rhXBHd7YESGtAndmhdcW2=VGANfk0ho9Uw@mail.gmail.com' \
    --to=naresh.kamboju@linaro.org \
    --cc=anders.roxell@linaro.org \
    --cc=andreyknvl@gmail.com \
    --cc=arnd@arndb.de \
    --cc=elver@google.com \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.