mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: fengguang.wu@intel.com, byungchul.park@lge.com, mingo@kernel.org,
	peterz@infradead.org, linux-kernel@vger.kernel.org, lkp@01.org,
	torvalds@linux-foundation.org, bp@alien8.de, x86@kernel.org,
	hpa@zytor.com, tglx@linutronix.de
Subject: Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2
Date: Thu, 5 Oct 2017 08:57:34 -0500	[thread overview]
Message-ID: <20171005135734.7hiztv6i5abdcqv7@treble> (raw)
In-Reply-To: <201710052002.HIH12957.JOFFSMOVFHLOtQ@I-love.SAKURA.ne.jp>

On Thu, Oct 05, 2017 at 08:02:33PM +0900, Tetsuo Handa wrote:
> Josh Poimboeuf wrote:
> > On Wed, Oct 04, 2017 at 06:44:50AM +0900, Tetsuo Handa wrote:
> > > Josh Poimboeuf wrote:
> > > > On Tue, Oct 03, 2017 at 11:28:15AM -0500, Josh Poimboeuf wrote:
> > > > > There are two bugs:
> > > > > 
> > > > > 1) Somebody -- presumably lockdep -- is corrupting the stack.  Need the
> > > > >    lockdep people to look at that.
> > > > > 
> > > > > 2) The 32-bit FP unwinder isn't handling the corrupt stack very well,
> > > > >    It's blindly dereferencing untrusted data:
> > > > > 
> > > > > 	/* Is the next frame pointer an encoded pointer to pt_regs? */
> > > > > 	regs = decode_frame_pointer(next_bp);
> > > > > 	if (regs) {
> > > > > 		frame = (unsigned long *)regs;
> > > > > 		len = regs_size(regs);
> > > > > 		state->got_irq = true;
> > > > > 
> > > > >   On 32-bit, regs_size() dereferences the regs pointer before we know it
> > > > >   points to a valid stack.  I'll fix that, along with the other unwinder
> > > > >   improvements I discussed with Linus.
> > > > 
> > > > Tetsuo and/or Fengguang,
> > > > 
> > > > Would you mind testing with this patch?  It should at least prevent the
> > > > unwinder panic and should hopefully print a useful unwinder dump
> > > > instead.
> > > > 
> > > Here are two outputs.
> > 
> > Tetsuo, would you mind trying the following patch?
> > 
> Here are two outputs. Same kernel with different host hardware.

Thanks, these dumps are more "normal":

- The first shows a missing frame pointer setup in
  atomic64_add_unless_cx8().

- The second shows some frame pointer related issue in the kthread
  creation path.

I don't plan on fixing those, because we don't yet have objtool support
for 32-bit and we don't have anything which needs reliable stack traces
there.  I'll probably just disable those unwinder dumps on 32-bit.

-- 
Josh

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

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 14:06 Fengguang Wu
2017-10-03 14:31 ` Josh Poimboeuf
2017-10-03 14:41   ` Josh Poimboeuf
2017-10-03 15:05     ` Josh Poimboeuf
2017-10-03 16:28       ` Josh Poimboeuf
2017-10-03 17:34         ` Josh Poimboeuf
2017-10-03 21:44           ` Tetsuo Handa
2017-10-04 21:06             ` Josh Poimboeuf
2017-10-04 21:30               ` Linus Torvalds
2017-10-04 22:15                 ` Josh Poimboeuf
2017-10-04 22:40             ` Josh Poimboeuf
2017-10-05 11:02               ` Tetsuo Handa
2017-10-05 13:57                 ` Josh Poimboeuf [this message]
2017-10-04  8:34       ` Peter Zijlstra
2017-10-10  5:57         ` Byungchul Park
2017-10-03 16:54 ` Linus Torvalds
2017-10-03 16:57   ` Linus Torvalds
2017-10-10  5:48     ` Byungchul Park
2017-10-10 16:22       ` Linus Torvalds
2017-10-10 16:56         ` Linus Torvalds
2017-10-10 18:14           ` Peter Zijlstra
2017-10-10 18:38             ` Linus Torvalds
2017-10-11  1:14             ` Byungchul Park
2017-10-11  2:36           ` Byungchul Park
2017-10-11  0:56         ` Byungchul Park
2017-10-11  1:02           ` Byungchul Park
2017-10-12  1:15           ` Byungchul Park
2017-10-03 17:18   ` Ingo Molnar
2017-10-04  9:20     ` Peter Zijlstra
2017-10-04 10:31       ` Ingo Molnar
2017-10-04 14:15       ` Josh Poimboeuf
2017-10-10  5:30     ` Byungchul Park
2017-10-05 13:01   ` Josh Poimboeuf
2017-10-05 14:54     ` Josh Poimboeuf
2017-10-09 10:50       ` Peter Zijlstra
2017-10-09 12:21         ` Fengguang Wu
2017-10-09 12:54           ` Peter Zijlstra
2017-10-09 12:59             ` Fengguang Wu
2017-10-09 13:03             ` Josh Poimboeuf
2017-10-09 12:55           ` Fengguang Wu
2017-10-09 13:26             ` Josh Poimboeuf
2017-10-09 14:17               ` Fengguang Wu
2017-10-09 15:28                 ` Peter Zijlstra
2017-10-09 15:41                   ` Fengguang Wu
2017-10-09 15:44                     ` Peter Zijlstra
2017-10-09 15:47                       ` Fengguang Wu
2017-10-10  5:08   ` Byungchul Park
2017-10-12  8:47 ` Peter Zijlstra
2017-10-12  9:21   ` Fengguang Wu
2017-10-12  9:28     ` Fengguang Wu
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=20171005135734.7hiztv6i5abdcqv7@treble \
    --to=jpoimboe@redhat.com \
    --cc=bp@alien8.de \
    --cc=byungchul.park@lge.com \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=mingo@kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®