linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Kujau <lists@nerdbynature.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Markus Rehbach <markus.rehbach@gmx.de>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, Ingo Molnar <mingo@elte.hu>
Subject: Re: 2.6.25-rc6: BUG: unable to handle kernel NULL pointer dereference
Date: Thu, 27 Mar 2008 16:20:53 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.1.00.0803271615470.3781@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080325233357.17d6ac41.akpm@linux-foundation.org>

On Tue, 25 Mar 2008, Andrew Morton wrote:
> > Code: 53 c0 e8 20 08 fc ff c1 e3 02 8b 14 33 89 54 24 20 8b 44 24 20 85 c0 75 10 eb 51 8b 12 89 54 24 20 8b 44 24 20 85 c0 74 43 8b 02 <0f> 18 00 90 8d 5a d8 39 6b 34 75 e4 8b 7c 24 0c 39 7b 30 75 db 

It faults in a prefetch.

> Markus reported what looks to be the same thing here:
> http://lkml.org/lkml/2008/3/21/202 and it's already in the regresison list.

Same here. And both are AMD X2 early stepping machines.
 
> I guess you've confirmed that this wasn't a mystery
> once-off-on-that-machine.
> 
> I can't think what we did to cause this.

I had a lengthy bug decoding session with Ingo and we found the root
cause:

A dropped workaround for the prefetch bug in early X2s and
Opterons. Patch below.

Thanks,

	tglx

--------------->
Subject: x86: fix prefetch workaround
From: Ingo Molnar <mingo@elte.hu>
Date: Thu Mar 27 15:58:28 CET 2008

some early Athlon XP's and Opterons generate bogus faults on prefetch
instructions. The workaround for this regressed over .24 - reinstate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/mm/fault.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-x86.q/arch/x86/mm/fault.c
===================================================================
--- linux-x86.q.orig/arch/x86/mm/fault.c
+++ linux-x86.q/arch/x86/mm/fault.c
@@ -104,7 +104,8 @@ static int is_prefetch(struct pt_regs *r
 	unsigned char *max_instr;
 
 #ifdef CONFIG_X86_32
-	if (!(__supported_pte_mask & _PAGE_NX))
+	/* Catch an obscure case of prefetch inside an NX page: */
+	if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16))
 		return 0;
 #endif
 



  parent reply	other threads:[~2008-03-27 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 23:08 2.6.25-rc6: BUG: unable to handle kernel NULL pointer dereference Christian Kujau
2008-03-26  6:33 ` Andrew Morton
2008-03-26 21:56   ` Rafael J. Wysocki
2008-03-26 23:57   ` Christian Kujau
2008-03-27 15:20   ` Thomas Gleixner [this message]
2008-03-27 15:26     ` Ingo Molnar
2008-03-27 18:30     ` Markus Rehbach
2008-03-27 19:26       ` Thomas Gleixner
2008-03-27 23:50     ` Björn Steinbrink
2008-03-28  8:50       ` Christian Kujau
2008-03-28  1:46     ` Christian Kujau
2008-03-28 10:25       ` Ingo Molnar

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.1.00.0803271615470.3781@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --cc=markus.rehbach@gmx.de \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).