All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: lkp@lists.01.org
Subject: Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2
Date: Thu, 05 Oct 2017 08:01:46 -0500	[thread overview]
Message-ID: <20171005130146.pmayo6owv362zfai@treble> (raw)
In-Reply-To: <CA+55aFxa_1pCMt-GQmBZUzRbc8_UY9sacmEaCqkDM1_=sq8y_A@mail.gmail.com>

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

On Tue, Oct 03, 2017 at 09:54:31AM -0700, Linus Torvalds wrote:
> On Tue, Oct 3, 2017 at 7:06 AM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> >
> > This patch triggers a NULL-dereference bug at update_stack_state().
> > Although its parent commit also has a NULL-dereference bug, however
> > the call stack looks rather different. Both dmesg files are attached.
> >
> > It also triggers this warning, which is being discussed in another
> > thread, so CC Josh. The full dmesg attached, too.
> >
> >         Please press Enter to activate this console.
> >         [  138.605622] WARNING: kernel stack regs at be299c9a in procd:340 has bad 'bp' value 000001be
> >         [  138.605627] unwind stack type:0 next_sp:  (null) mask:0x2 graph_idx:0
> >         [  138.605631] be299c9a: 299ceb00 (0x299ceb00)
> >         [  138.605633] be299c9e: 2281f1be (0x2281f1be)
> >         [  138.605634] be299ca2: 299cebb6 (0x299cebb6)
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >
> > commit b09be676e0ff25bd6d2e7637e26d349f9109ad75
> >      locking/lockdep: Implement the 'crossrelease' feature
> 
> Can we consider just reverting the crossrelease thing?
> 
> The apparent stack corruption really worries me, and what worries me
> most is that commit wasn't even supposed to change anything as far as
> I can tell - it only adds infrastructure, no actual users that *set*
> the cross-lock thing.
> 
> So the fact that it actually seems to cause behavioural changes seems
> to be _really_ scary, and indicates that the code is completely
> broken.
> 
> Or am I missing something?

So I gave crossrelease a bad rap here.  Going back and looking at the
panics and stack dumps, what I thought was "stack corruption" was
actually the GCC unaligned stack pointer thing.

I suspect those commits were implicated in the bisections because they
started doing more stack traces in general, revealing some existing
32-bit unwinder/GCC/frame pointer bugs in the process.

So I just wanted to clarify that crossrelease seems to be innocent in
all this.  Sorry for the confusion!

-- 
Josh

WARNING: multiple messages have this Message-ID (diff)
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
	Byungchul Park <byungchul.park@lge.com>,
	Ingo Molnar <mingo@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	LKP <lkp@01.org>
Subject: Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2
Date: Thu, 5 Oct 2017 08:01:46 -0500	[thread overview]
Message-ID: <20171005130146.pmayo6owv362zfai@treble> (raw)
In-Reply-To: <CA+55aFxa_1pCMt-GQmBZUzRbc8_UY9sacmEaCqkDM1_=sq8y_A@mail.gmail.com>

On Tue, Oct 03, 2017 at 09:54:31AM -0700, Linus Torvalds wrote:
> On Tue, Oct 3, 2017 at 7:06 AM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> >
> > This patch triggers a NULL-dereference bug at update_stack_state().
> > Although its parent commit also has a NULL-dereference bug, however
> > the call stack looks rather different. Both dmesg files are attached.
> >
> > It also triggers this warning, which is being discussed in another
> > thread, so CC Josh. The full dmesg attached, too.
> >
> >         Please press Enter to activate this console.
> >         [  138.605622] WARNING: kernel stack regs at be299c9a in procd:340 has bad 'bp' value 000001be
> >         [  138.605627] unwind stack type:0 next_sp:  (null) mask:0x2 graph_idx:0
> >         [  138.605631] be299c9a: 299ceb00 (0x299ceb00)
> >         [  138.605633] be299c9e: 2281f1be (0x2281f1be)
> >         [  138.605634] be299ca2: 299cebb6 (0x299cebb6)
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >
> > commit b09be676e0ff25bd6d2e7637e26d349f9109ad75
> >      locking/lockdep: Implement the 'crossrelease' feature
> 
> Can we consider just reverting the crossrelease thing?
> 
> The apparent stack corruption really worries me, and what worries me
> most is that commit wasn't even supposed to change anything as far as
> I can tell - it only adds infrastructure, no actual users that *set*
> the cross-lock thing.
> 
> So the fact that it actually seems to cause behavioural changes seems
> to be _really_ scary, and indicates that the code is completely
> broken.
> 
> Or am I missing something?

So I gave crossrelease a bad rap here.  Going back and looking at the
panics and stack dumps, what I thought was "stack corruption" was
actually the GCC unaligned stack pointer thing.

I suspect those commits were implicated in the bisections because they
started doing more stack traces in general, revealing some existing
32-bit unwinder/GCC/frame pointer bugs in the process.

So I just wanted to clarify that crossrelease seems to be innocent in
all this.  Sorry for the confusion!

-- 
Josh

  parent reply	other threads:[~2017-10-05 13:01 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 14:06 [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2 Fengguang Wu
2017-10-03 14:06 ` Fengguang Wu
2017-10-03 14:31 ` Josh Poimboeuf
2017-10-03 14:31   ` Josh Poimboeuf
2017-10-03 14:41   ` Josh Poimboeuf
2017-10-03 14:41     ` Josh Poimboeuf
2017-10-03 15:05     ` Josh Poimboeuf
2017-10-03 15:05       ` Josh Poimboeuf
2017-10-03 16:28       ` Josh Poimboeuf
2017-10-03 16:28         ` Josh Poimboeuf
2017-10-03 17:34         ` Josh Poimboeuf
2017-10-03 17:34           ` Josh Poimboeuf
2017-10-03 21:44           ` Tetsuo Handa
2017-10-03 21:44             ` Tetsuo Handa
2017-10-04 21:06             ` Josh Poimboeuf
2017-10-04 21:06               ` Josh Poimboeuf
2017-10-04 21:30               ` Linus Torvalds
2017-10-04 21:30                 ` Linus Torvalds
2017-10-04 22:15                 ` Josh Poimboeuf
2017-10-04 22:15                   ` Josh Poimboeuf
2017-10-04 22:40             ` Josh Poimboeuf
2017-10-04 22:40               ` Josh Poimboeuf
2017-10-05 11:02               ` Tetsuo Handa
2017-10-05 11:02                 ` Tetsuo Handa
2017-10-05 13:57                 ` Josh Poimboeuf
2017-10-05 13:57                   ` Josh Poimboeuf
2017-10-04  8:34       ` Peter Zijlstra
2017-10-04  8:34         ` Peter Zijlstra
2017-10-10  5:57         ` Byungchul Park
2017-10-10  5:57           ` Byungchul Park
2017-10-03 16:54 ` Linus Torvalds
2017-10-03 16:54   ` Linus Torvalds
2017-10-03 16:57   ` Linus Torvalds
2017-10-03 16:57     ` Linus Torvalds
2017-10-10  5:48     ` Byungchul Park
2017-10-10  5:48       ` Byungchul Park
2017-10-10 16:22       ` Linus Torvalds
2017-10-10 16:22         ` Linus Torvalds
2017-10-10 16:56         ` Linus Torvalds
2017-10-10 16:56           ` Linus Torvalds
2017-10-10 18:14           ` Peter Zijlstra
2017-10-10 18:14             ` Peter Zijlstra
2017-10-10 18:38             ` Linus Torvalds
2017-10-10 18:38               ` Linus Torvalds
2017-10-11  1:14             ` Byungchul Park
2017-10-11  1:14               ` Byungchul Park
2017-10-11  2:36           ` Byungchul Park
2017-10-11  2:36             ` Byungchul Park
2017-10-11  0:56         ` Byungchul Park
2017-10-11  0:56           ` Byungchul Park
2017-10-11  1:02           ` Byungchul Park
2017-10-11  1:02             ` Byungchul Park
2017-10-12  1:15           ` Byungchul Park
2017-10-12  1:15             ` Byungchul Park
2017-10-03 17:18   ` Ingo Molnar
2017-10-03 17:18     ` Ingo Molnar
2017-10-04  9:20     ` Peter Zijlstra
2017-10-04  9:20       ` Peter Zijlstra
2017-10-04 10:31       ` Ingo Molnar
2017-10-04 10:31         ` Ingo Molnar
2017-10-04 14:15       ` Josh Poimboeuf
2017-10-04 14:15         ` Josh Poimboeuf
2017-10-10  5:30     ` Byungchul Park
2017-10-10  5:30       ` Byungchul Park
2017-10-05 13:01   ` Josh Poimboeuf [this message]
2017-10-05 13:01     ` Josh Poimboeuf
2017-10-05 14:54     ` Josh Poimboeuf
2017-10-05 14:54       ` Josh Poimboeuf
2017-10-09 10:50       ` Peter Zijlstra
2017-10-09 10:50         ` Peter Zijlstra
2017-10-09 12:21         ` Fengguang Wu
2017-10-09 12:21           ` Fengguang Wu
2017-10-09 12:54           ` Peter Zijlstra
2017-10-09 12:54             ` Peter Zijlstra
2017-10-09 12:59             ` Fengguang Wu
2017-10-09 12:59               ` Fengguang Wu
2017-10-09 13:03             ` Josh Poimboeuf
2017-10-09 13:03               ` Josh Poimboeuf
2017-10-09 12:55           ` Fengguang Wu
2017-10-09 12:55             ` Fengguang Wu
2017-10-09 13:26             ` Josh Poimboeuf
2017-10-09 13:26               ` Josh Poimboeuf
2017-10-09 14:17               ` Fengguang Wu
2017-10-09 14:17                 ` Fengguang Wu
2017-10-09 15:28                 ` Peter Zijlstra
2017-10-09 15:28                   ` Peter Zijlstra
2017-10-09 15:41                   ` Fengguang Wu
2017-10-09 15:41                     ` Fengguang Wu
2017-10-09 15:44                     ` Peter Zijlstra
2017-10-09 15:44                       ` Peter Zijlstra
2017-10-09 15:47                       ` Fengguang Wu
2017-10-09 15:47                         ` Fengguang Wu
2017-10-10  5:08   ` Byungchul Park
2017-10-10  5:08     ` Byungchul Park
2017-10-12  8:47 ` Peter Zijlstra
2017-10-12  8:47   ` Peter Zijlstra
2017-10-12  9:21   ` Fengguang Wu
2017-10-12  9:21     ` Fengguang Wu
2017-10-12  9:28     ` Fengguang Wu
2017-10-12  9:28       ` Fengguang Wu
2017-10-12 11:45       ` Peter Zijlstra
2017-10-12 11:45         ` Peter Zijlstra

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=20171005130146.pmayo6owv362zfai@treble \
    --to=jpoimboe@redhat.com \
    --cc=lkp@lists.01.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.