Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2006 23:48:08 +0200 (CEST)
From:      Tijl Coosemans <tijl@ulyssis.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/101379: page fault clobbers error code in trap frame
Message-ID:  <200608042148.k74Lm8BM022085@kalimero.kotnet.org>
Resent-Message-ID: <200608042150.k74LoDX3060857@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         101379
>Category:       i386
>Synopsis:       page fault clobbers error code in trap frame
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 04 21:50:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
>Description:
In case of a page fault the trap handler stores the faulting address
in trapframe.tf_err to pass it on to sendsig. This is no longer
necessary because the address is now passed on to sendsig in a
ksiginfo_t.
An example of a program that depends on the correct tf_err ending
up in the signal handler's sigcontext is Wine.
>How-To-Repeat:
>Fix:
(this is a patch against HEAD)

--- trap.c.diff begins here ---
--- sys/i386/i386/trap.c.orig	Fri Aug  4 23:20:16 2006
+++ sys/i386/i386/trap.c	Fri Aug  4 23:20:36 2006
@@ -777,9 +777,6 @@
 		return (-1);
 	}
 
-	/* kludge to pass faulting virtual address to sendsig */
-	frame->tf_err = eva;
-
 	return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
 }
 
--- trap.c.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608042148.k74Lm8BM022085>