Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jan 2002 12:15:59 -0500
From:      Jake Burkholder <jake@locore.ca>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Poul-Henning Kamp <phk@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/i386 trap.c
Message-ID:  <20020101121559.D9752@locore.ca>
In-Reply-To: <20020101042804.T7381-100000@gamplex.bde.org>; from bde@zeta.org.au on Tue, Jan 01, 2002 at 04:49:17AM %2B1100
References:  <20011230211002.C9752@locore.ca> <20020101042804.T7381-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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