From owner-freebsd-current@FreeBSD.ORG Fri Aug 1 15:25:24 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AC9437B404; Fri, 1 Aug 2003 15:25:24 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2AD343FAF; Fri, 1 Aug 2003 15:25:23 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc11) with ESMTP id <2003080122252201300l799he>; Fri, 1 Aug 2003 22:25:23 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA47018; Fri, 1 Aug 2003 15:25:19 -0700 (PDT) Date: Fri, 1 Aug 2003 15:25:18 -0700 (PDT) From: Julian Elischer To: deischen@freebsd.org In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Thorsten Greiner cc: current@freebsd.org Subject: Re: NVidia glx stuff dies in sysarch(I386_SET_LDT, ...) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2003 22:25:25 -0000 On Fri, 1 Aug 2003, Julian Elischer wrote: > > > On Fri, 1 Aug 2003, Daniel Eischen wrote: > > > On Fri, 1 Aug 2003, Thorsten Greiner wrote: > > > > > * Thorsten Greiner [2003-08-01 23:47]: > > > > I will test wether the problem still occurs with version 1.84 of > > > > sys_machdep.c and let you know. > > > > > > Yup, reverting to 1.84 unbreaks this for me. Looking at the changes > > > made it appears to me that the check > > > > > > if (uap->start < NLDT || uap->num <= 0) > > > return (EINVAL);i > > > > > > causes this, because NLDT is 6 and the NVidia stuff passes > > > uap->start == 6 to this call. > > > > It can't use 6. FreeBSD reserves 0-16 for its own use. > > > > I think the bug was in the old code allowing this to > > happen... > > Looking at segments.h..... > /* > * Entries in the Local Descriptor Table (LDT) > */ > #define LSYS5CALLS_SEL 0 /* forced by intel BCS */ > #define LSYS5SIGR_SEL 1 > #define L43BSDCALLS_SEL 2 /* notyet */ > #define LUCODE_SEL 3 > #define LSOL26CALLS_SEL 4 /* Solaris >= 2.6 system call gate */ > #define LUDATA_SEL 5 > /* separate stack, es,fs,gs sels ? */ > /* #define LPOSIXCALLS_SEL 5*/ /* notyet */ > #define LBSDICALLS_SEL 16 /* BSDI system call gate */ > #define NLDT (LBSDICALLS_SEL + 1) > > it looks like NLDT should be save between from 6 to 15 > (though I wish they'd chosen a different value) > > so we could add: I might add that this si slightly bogus as you an't have aproces being a BSDI binary and a SOLARIS binary and a BCS binary all at the same time, and we don't set any values on most (any?) of these segments for FreeBSD binaries.. > > if ((uap->start == LBSDICALLS_SEL) || (uap->start <= LUDATA_SEL)) || > (uap->num <= 0)) > ... > > What do you think? > > > > > -- > > Dan Eischen > > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >