[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABVgOSmfyvw6Bb1SKkBr7EmQ=+rJ7pJYenG4vmwqKrCQdf87GQ@mail.gmail.com>
Date: Fri, 12 Apr 2024 11:26:28 +0800
From: David Gow <davidgow@...gle.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Dan Carpenter <dan.carpenter@...aro.org>, Naresh Kamboju <naresh.kamboju@...aro.org>,
Will Deacon <will@...nel.org>, mic@...ikod.net, keescook@...omium.org, rmoar@...gle.com,
lkft-triage@...ts.linaro.org, kunit-dev@...glegroups.com,
linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...hat.com,
longman@...hat.com, boqun.feng@...il.com, anders.roxell@...aro.org,
arnd@...db.de, Linux Kernel Functional Testing <lkft@...aro.org>
Subject: Re: BUG: KASAN: null-ptr-deref in _raw_spin_lock_irq next-20240410
On Thu, 11 Apr 2024 at 23:05, Guenter Roeck <linux@...ck-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
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4014 bytes)
Powered by blists - more mailing lists