All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: David Gow <davidgow@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	 Will Deacon <will@kernel.org>,
	mic@digikod.net, keescook@chromium.org, rmoar@google.com,
	 lkft-triage@lists.linaro.org, kunit-dev@googlegroups.com,
	 linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@redhat.com,  longman@redhat.com, boqun.feng@gmail.com,
	anders.roxell@linaro.org,  arnd@arndb.de,
	Linux Kernel Functional Testing <lkft@linaro.org>
Subject: Re: BUG: KASAN: null-ptr-deref in _raw_spin_lock_irq next-20240410
Date: Fri, 12 Apr 2024 11:26:28 +0800	[thread overview]
Message-ID: <CABVgOSmfyvw6Bb1SKkBr7EmQ=+rJ7pJYenG4vmwqKrCQdf87GQ@mail.gmail.com> (raw)
In-Reply-To: <fd604ae0-5630-4745-acf2-1e51c69cf0c0@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]

On Thu, 11 Apr 2024 at 23:05, Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Thu, Apr 11, 2024 at 06:00:25PM +0300, Dan Carpenter wrote:
> > On Thu, Apr 11, 2024 at 08:20:55PM +0530, Naresh Kamboju wrote:
> > >
> > > I use to notice kernel panic while running kunit tests
> > > now I have noticed this
> > >
> > > Unable to handle kernel paging request at virtual address
> > > KASAN: null-ptr-deref in range
> > > pc : kunit_test_null_dereference (lib/kunit/kunit-test.c:119)
> > > lr : kunit_generic_run_threadfn_adapter (lib/kunit/try-catch.c:31)
> > >
> > > The kunit tests run to completion and the system is stable.
> > > Kernel did not panic.
> > >
> >
> > [ Snip ]
> >
> > > <0>[   76.808597] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
> > > <4>[   76.809876] Modules linked in:
> > > <4>[   76.812055] CPU: 1 PID: 567 Comm: kunit_try_catch Tainted: G
> > > B            N 6.9.0-rc3-next-20240410 #1
> > > <4>[   76.812987] Hardware name: linux,dummy-virt (DT)
> > > <4>[   76.814123] pstate: 12400009 (nzcV daif +PAN -UAO +TCO -DIT
> > > -SSBS BTYPE=--)
> > > <4>[ 76.814947] pc : kunit_test_null_dereference (lib/kunit/kunit-test.c:119)
> >                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This is a new intentional NULL dereferencer that was added yesterday.
> >
> > Maybe these should have a big printk, "Intentional NULL dereference
> > coming up!\n".
> >
>
> Can the backtrace be suppressed, similar to the warnings suppression I am
> working on ?
>

I'd like to do that going forward. Of course, this isn't a warning, so
it doesn't work as-is (and it'd be harder to pass things like the
function name through), but it seems like a worthwhile feature to have
going forward.
We did have some similar stuff for trapping KASAN errors as a part of
the KASAN tests a while ago: that's also something to look at.

I have been playing with the warning suppression with the fortify
test, and that seems to be working well.

Cheers,
-- David

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4014 bytes --]

  reply	other threads:[~2024-04-12  3:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 10:27 BUG: KASAN: null-ptr-deref in _raw_spin_lock_irq next-20240410 Naresh Kamboju
2024-04-10 15:23 ` Will Deacon
2024-04-10 17:14   ` Naresh Kamboju
2024-04-10 17:21     ` Naresh Kamboju
2024-04-11  4:25   ` David Gow
2024-04-11  8:48     ` Mickaël Salaün
2024-04-11 14:42     ` Naresh Kamboju
2024-04-11 14:50       ` Naresh Kamboju
2024-04-11 15:00         ` Dan Carpenter
2024-04-11 15:05           ` Guenter Roeck
2024-04-12  3:26             ` David Gow [this message]
2024-04-12  3:23     ` David Gow

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='CABVgOSmfyvw6Bb1SKkBr7EmQ=+rJ7pJYenG4vmwqKrCQdf87GQ@mail.gmail.com' \
    --to=davidgow@google.com \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=keescook@chromium.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=lkft@linaro.org \
    --cc=longman@redhat.com \
    --cc=mic@digikod.net \
    --cc=mingo@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rmoar@google.com \
    --cc=will@kernel.org \
    /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.