The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Dave Hansen <dave@sr71.net>,
	Richard Purdie <rpurdie@linux.intel.com>
Subject: Re: -tip: origin tree boot crash
Date: Fri, 18 Dec 2009 12:10:35 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0912181158300.3712@localhost.localdomain> (raw)
In-Reply-To: <20091218164509.GA14574@elte.hu>



On Fri, 18 Dec 2009, Ingo Molnar wrote:
> [   75.151208] calling  nas_gpio_init+0x0/0x153 @ 1
> [   75.155860] BUG: unable to handle kernel paging request at 00000000001de7d0
> [   75.159841] IP: [<ffffffff81683c55>] strstr+0x20/0x5f

Ok, the disassembly is

   b:	55                   	push   %rbp
   c:	48 89 f2             	mov    %rsi,%rdx
   f:	48 89 e5             	mov    %rsp,%rbp
  12:	eb 03                	jmp    0x17
  14:	48 ff c2             	inc    %rdx
  17:	80 3a 00             	cmpb   $0x0,(%rdx)
  1a:	75 f8                	jne    0x14
  1c:	29 f2                	sub    %esi,%edx
  1e:	48 89 f8             	mov    %rdi,%rax
  21:	74 45                	je     0x68
  23:	48 89 f9             	mov    %rdi,%rcx
  26:	eb 03                	jmp    0x2b
  28:	48 ff c1             	inc    %rcx
  2b:*	80 39 00             	cmpb   $0x0,(%rcx)     <-- trapping instruction
  2e:	75 f8                	jne    0x28
  30:	48 89 f8             	mov    %rdi,%rax
  33:	4c 63 d2             	movslq %edx,%r10
  36:	eb 26                	jmp    0x5e

so if I read that code right, that's a 'strlen()' on %rdi, which is the 
first argument to strstr().

So it would be that 

	l1 = strlen(s1);

thing, and 's1' is bad.

Which in turn means:

> [   75.159841] Call Trace:
> [   75.159841]  [<ffffffff825f0dfb>] dmi_matches+0x6f/0x8d

that since the call is

	strstr(dmi_ident[s], dmi->matches[i].substr)

that it is the "dmi_ident[]" array itself that is broken.

The DMI code doesn't seem to be very careful about checking the array 
accesses against DMI_STRING_MAX. So I wonder if this is actually a DMI 
bug, not a driver bug - and that the driver just is able to trigger that 
bug somehow where others have not.

		Linus

  parent reply	other threads:[~2009-12-18 20:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 16:45 -tip: origin tree boot crash Ingo Molnar
2009-12-18 17:01 ` Dave Hansen
2009-12-18 17:06   ` Ingo Molnar
2009-12-18 19:30     ` Dave Hansen
2009-12-18 20:10 ` Linus Torvalds [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-12-24 22:00 Linux 2.6.33-rc2 - Merry Christmas Linus Torvalds
2009-12-25 10:27 ` -tip: origin tree boot crash Ingo Molnar
2009-12-25 19:49   ` Dmitry Torokhov
2009-12-26 20:19     ` Len Brown
2009-12-26 20:17   ` Len Brown
2009-12-27  4:20     ` Len Brown
2009-12-28  9:44       ` Ingo Molnar
2009-12-28 12:01         ` Ingo Molnar
2009-12-28 15:02           ` Paul Rolland
2009-12-28 16:15             ` Paul Rolland
2009-12-28 16:53             ` Paul Rolland
2009-12-28 20:17               ` Dmitry Torokhov
2009-12-30  6:14               ` Len Brown
2009-12-30  7:13                 ` Paul Rolland
2009-12-17  9:02 Ingo Molnar
2009-12-17  9:27 ` Christoph Hellwig
2009-12-17  9:44   ` Ingo Molnar
2009-12-17  9:32 ` Al Viro
2009-12-17  9:35   ` Christoph Hellwig
2009-12-17  9:44   ` Ingo Molnar
2009-12-17  9:52     ` Ingo Molnar
2009-12-17  9:54       ` Al Viro

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=alpine.LFD.2.00.0912181158300.3712@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=dave@sr71.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rpurdie@linux.intel.com \
    /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