Re: 2.6.25-rc6: BUG: unable to handle kernel NULL pointer dereference

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Christian Kujau <lists@...>, LKML <linux-kernel@...>, Markus Rehbach <markus.rehbach@...>, Rafael J. Wysocki <rjw@...>, Ingo Molnar <mingo@...>
Date: Thursday, March 27, 2008 - 11:20 am

On Tue, 25 Mar 2008, Andrew Morton wrote:

It faults in a prefetch.


Same here. And both are AMD X2 early stepping machines.
 

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
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: 2.6.25-rc6: BUG: unable to handle kernel NULL pointer de..., Thomas Gleixner, (Thu Mar 27, 11:20 am)
Re: 2.6.25-rc6: BUG: unable to handle kernel NULL pointer de..., Rafael J. Wysocki, (Wed Mar 26, 5:56 pm)