All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6] Fix 4G/4G and WP test lockup
@ 2003-10-16  7:22 Zwane Mwaikambo
  2003-10-16  7:23 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Zwane Mwaikambo @ 2003-10-16  7:22 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Ingo Molnar, Andrew Morton, William Lee Irwin III

Hi Ingo,
	It looks like when we do the WP test and trigger a 
(write) protection fault, the 4G/4G page fault handling path doesn't 
expect this kind of fault and instead results in recursive fault handling 
(or so it appears).

How does the following look?

Index: linux-2.6.0-test7-mm1/arch/i386/mm/fault.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test7-mm1/arch/i386/mm/fault.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 fault.c
--- linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	15 Oct 2003 09:01:14 -0000	1.1.1.1
+++ linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	16 Oct 2003 06:42:42 -0000
@@ -260,8 +260,12 @@ asmlinkage void do_page_fault(struct pt_
 	/*
 	 * On 4/4 all kernels faults are either bugs, vmalloc or prefetch
 	 */
-	if (unlikely((regs->xcs & 3) == 0))
+	if (unlikely((regs->xcs & 3) == 0)) {
+		if (error_code & 3)
+			goto bad_area_nosemaphore;
+
  		goto vmalloc_fault;
+	}
 #else
 	if (unlikely(address >= TASK_SIZE)) { 
 		if (!(error_code & 5))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][2.6] Fix 4G/4G and WP test lockup
  2003-10-16  7:22 [PATCH][2.6] Fix 4G/4G and WP test lockup Zwane Mwaikambo
@ 2003-10-16  7:23 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2003-10-16  7:23 UTC (permalink / raw)
  To: Zwane Mwaikambo; +Cc: Linux Kernel, Andrew Morton, William Lee Irwin III


fine with me.

	Ingo

On Thu, 16 Oct 2003, Zwane Mwaikambo wrote:

> Hi Ingo,
> 	It looks like when we do the WP test and trigger a 
> (write) protection fault, the 4G/4G page fault handling path doesn't 
> expect this kind of fault and instead results in recursive fault handling 
> (or so it appears).
> 
> How does the following look?
> 
> Index: linux-2.6.0-test7-mm1/arch/i386/mm/fault.c
> ===================================================================
> RCS file: /build/cvsroot/linux-2.6.0-test7-mm1/arch/i386/mm/fault.c,v
> retrieving revision 1.1.1.1
> diff -u -p -B -r1.1.1.1 fault.c
> --- linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	15 Oct 2003 09:01:14 -0000	1.1.1.1
> +++ linux-2.6.0-test7-mm1/arch/i386/mm/fault.c	16 Oct 2003 06:42:42 -0000
> @@ -260,8 +260,12 @@ asmlinkage void do_page_fault(struct pt_
>  	/*
>  	 * On 4/4 all kernels faults are either bugs, vmalloc or prefetch
>  	 */
> -	if (unlikely((regs->xcs & 3) == 0))
> +	if (unlikely((regs->xcs & 3) == 0)) {
> +		if (error_code & 3)
> +			goto bad_area_nosemaphore;
> +
>   		goto vmalloc_fault;
> +	}
>  #else
>  	if (unlikely(address >= TASK_SIZE)) { 
>  		if (!(error_code & 5))
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-16  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16  7:22 [PATCH][2.6] Fix 4G/4G and WP test lockup Zwane Mwaikambo
2003-10-16  7:23 ` Ingo Molnar

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.