i386/101379: page fault clobbers error code in trap frame
Tijl Coosemans
tijl at ulyssis.org
Fri Aug 4 21:50:14 UTC 2006
>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:
More information about the freebsd-i386
mailing list