From owner-cvs-all Tue Jan 1 9:13:24 2002 Delivered-To: cvs-all@freebsd.org Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by hub.freebsd.org (Postfix) with ESMTP id EADEA37B416; Tue, 1 Jan 2002 09:13:19 -0800 (PST) Received: (from jake@localhost) by k6.locore.ca (8.11.6/8.11.6) id g01HFxE29925; Tue, 1 Jan 2002 12:15:59 -0500 (EST) (envelope-from jake) Date: Tue, 1 Jan 2002 12:15:59 -0500 From: Jake Burkholder To: Bruce Evans Cc: Poul-Henning Kamp , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 trap.c Message-ID: <20020101121559.D9752@locore.ca> References: <20011230211002.C9752@locore.ca> <20020101042804.T7381-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020101042804.T7381-100000@gamplex.bde.org>; from bde@zeta.org.au on Tue, Jan 01, 2002 at 04:49:17AM +1100 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Tue, Jan 01, 2002 at 04:49:17AM +1100, Bruce Evans said words to the effect of; > On Sun, 30 Dec 2001, Jake Burkholder wrote: > > > Apparently, On Sun, Dec 30, 2001 at 11:43:59AM -0800, > > Poul-Henning Kamp said words to the effect of; > > > > > phk 2001/12/30 11:43:59 PST > > > > > > Modified files: > > > sys/i386/i386 trap.c > > > Log: > > > GC an alternate trap_pfault() which has rotted away behind an "#ifdef notyet" > > > since 21-Mar-95 . > > > > > > Revision Changes Path > > > 1.210 +0 -118 src/sys/i386/i386/trap.c > > > > This is the one that should have been used. The existing one is broken because > > it allows faults on user memory in kernel mode without using copy{in,out} or > > {f,s}uword. Apparently there is still broken kernel code that expects this to > > work. > > I agree. Some of the bitrot was fixed in my local version, but I never > got around to testing it. > > What do the other arches do? They all seem to be based on the ancient > version that did trap_pfault() inline in trap(). The i386 version stopped > doing this in rev.1.25 (1994/06/06). The ia64 and alpha ones seem to be, yes. But they do correctly disallow these faults, except for in the stackgap used by the linux emulator. The sparc64 version is based on the non-broken i386 one. Special instructions must be used to access user space, so copy{in,out} are mandatory. Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message