From owner-freebsd-i386@FreeBSD.ORG Fri Aug 4 21:50:14 2006 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0564B16A4DD for ; Fri, 4 Aug 2006 21:50:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54CDF43D49 for ; Fri, 4 Aug 2006 21:50:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k74LoDxf060858 for ; Fri, 4 Aug 2006 21:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k74LoDX3060857; Fri, 4 Aug 2006 21:50:13 GMT (envelope-from gnats) Resent-Date: Fri, 4 Aug 2006 21:50:13 GMT Resent-Message-Id: <200608042150.k74LoDX3060857@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tijl Coosemans Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 329C316A4DA for ; Fri, 4 Aug 2006 21:48:24 +0000 (UTC) (envelope-from tijl@kalimero.kotnet.org) Received: from outmx017.isp.belgacom.be (outmx017.isp.belgacom.be [195.238.4.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 855EB43D46 for ; Fri, 4 Aug 2006 21:48:23 +0000 (GMT) (envelope-from tijl@kalimero.kotnet.org) Received: from outmx017.isp.belgacom.be (localhost [127.0.0.1]) by outmx017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k74LmISX000900 for ; Fri, 4 Aug 2006 23:48:19 +0200 (envelope-from ) Received: from kalimero.kotnet.org (224.54-245-81.adsl-dyn.isp.belgacom.be [81.245.54.224]) by outmx017.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k74LmFCC000873 for ; Fri, 4 Aug 2006 23:48:15 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k74Lm91w022086 for ; Fri, 4 Aug 2006 23:48:09 +0200 (CEST) (envelope-from tijl@kalimero.kotnet.org) Received: (from tijl@localhost) by kalimero.kotnet.org (8.13.6/8.13.6/Submit) id k74Lm8BM022085; Fri, 4 Aug 2006 23:48:08 +0200 (CEST) (envelope-from tijl) Message-Id: <200608042148.k74Lm8BM022085@kalimero.kotnet.org> Date: Fri, 4 Aug 2006 23:48:08 +0200 (CEST) From: Tijl Coosemans To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: i386/101379: page fault clobbers error code in trap frame X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tijl Coosemans List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 21:50:14 -0000 >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: