[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+aWkGTGXB+h1Hp1yxmrTBRDn1r4YHSQ6-SUK4SHn9serQ@mail.gmail.com>
Date: Fri, 19 Jun 2020 12:03:20 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: syzbot <syzbot+42bc0d31b9a21faebdf8@...kaller.appspotmail.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Borislav Petkov <bp@...en8.de>, devel@...ukata.com,
"H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
Thomas Gleixner <tglx@...utronix.de>,
Al Viro <viro@...iv.linux.org.uk>,
"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: INFO: trying to register non-static key in is_dynamic_key
On Fri, Jun 19, 2020 at 11:53 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Jun 18, 2020 at 02:17:15PM -0700, syzbot wrote:
>
> > INFO: trying to register non-static key.
> > the code is fine but needs lockdep annotation.
> > turning off the locking correctness validator.
> > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-syzkaller #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> > Call Trace:
> > <IRQ>
> > __dump_stack lib/dump_stack.c:77 [inline]
> > dump_stack+0xf6/0x16e lib/dump_stack.c:118
> > assign_lock_key kernel/locking/lockdep.c:894 [inline]
> > register_lock_class+0x1442/0x17e0 kernel/locking/lockdep.c:1206
> > arch_stack_walk+0x81/0xf0 arch/x86/kernel/stacktrace.c:25
> > lock_downgrade+0x720/0x720 kernel/locking/lockdep.c:4624
> > is_dynamic_key+0x1b0/0x1b0 kernel/locking/lockdep.c:1176
> > trace_hardirqs_off+0x50/0x1f0 kernel/trace/trace_preemptirq.c:83
> > __lock_acquire+0x101/0x6270 kernel/locking/lockdep.c:4259
> > save_stack+0x32/0x40 mm/kasan/common.c:50
>
> So I'm thinking this is in fact:
>
> spin_lock_irqsave(&depot_lock, flags);
>
> from lib/stackdepot.c:stack_depot_save(), which has gone missing from
> the stack due to tail-call optimizations.
>
> Now depot_lock is declared thusly:
>
> static DEFINE_SPINLOCK(depot_lock);
>
> and I'm trying to figure out how lockdep manages to conclude that isn't
> static storage.... most odd.
Note there also was something wrong with the unwinder:
https://syzkaller.appspot.com/x/log.txt?x=13f305a9100000
(or with something else in the kernel), so potentially it did not
happen save_stack.
In fact, Andrey just reverted this parsing of questionable frames in syzkaller:
https://github.com/google/syzkaller/commit/4d2d1ebee3b65c404576d1c8573a0ec48b03b883
(was done because of what turned out to be ORC unwinder bug, which was fixed).
So potentially we just need to close this is invalid now.
Powered by blists - more mailing lists