From owner-cvs-src@FreeBSD.ORG Sat Aug 2 09:34:24 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2879637B401; Sat, 2 Aug 2003 09:34:24 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64D7943F85; Sat, 2 Aug 2003 09:34:23 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (rwcrmhc12) with ESMTP id <2003080216340701400ndodhe>; Sat, 2 Aug 2003 16:34:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id JAA56066; Sat, 2 Aug 2003 09:34:06 -0700 (PDT) Date: Sat, 2 Aug 2003 09:34:04 -0700 (PDT) From: Julian Elischer To: David Xu In-Reply-To: <002e01c358ce$6df2ecd0$0701a8c0@tiger> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Julian Elischer cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 sys_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 16:34:25 -0000 On Sat, 2 Aug 2003, David Xu wrote: > > ----- Original Message ----- > From: "Julian Elischer" > To: ; ; > Sent: Saturday, August 02, 2003 2:52 PM > Subject: cvs commit: src/sys/i386/i386 sys_machdep.c > > > > julian 2003/08/01 23:52:36 PDT > > > > FreeBSD src repository > > > > Modified files: > > sys/i386/i386 sys_machdep.c > > Log: > > Relax the check for bad LDTE allocations. It turns out that > > there is code that blindly allocates LDTEs starting at slot 6 > > and I quess it doesn't really matter to us if they overwrite the BSDI > > syscall slot, since it isn't a BSDI binary. Also add some code to help track > > down other such users (commented out for now). > > > > Reviewed by: deischen@ > > > > Revision Changes Path > > 1.87 +21 -4 src/sys/i386/i386/sys_machdep.c > > > > The code is incorrect: > > dp = &((union descriptor *)(pldt->ldt_base))[NLDT]; > /* > * start scanning a bit up to leave room for NVidia and > * Wine, which still user the "Blat" method of allocation. > */ > for (i = NLDT + 1; i < pldt->ldt_len; ++i) { > if (dp->sd.sd_type == SDT_SYSNULL) > break; > dp++; > } > > dp is set to start from NLDT not NLDT+1, so the 'i' and 'dp' is > out of synchronous. oops If you have not already fixed it, I will after sending this.. (that's what you get from last-minute tweeks to a patch) > > And why is complaint included in DEBUG section ? > #ifdef DEBUG > /* complain a for a while if using old methods */ > if (ldt_warnings++ < NUM_LDT_WARNINGS) { > printf("Warning: pid %d used static ldt allocation.\n", > td->td_proc->p_pid); > printf("See the i386_set_ldt man page for more info\n"); > } > #endif because libthr uses it so it will always complain. Mike has said he can not fix it for a while, It sounds from his description that it is more work for libthr to use the dynamic allocator. > > -- > David Xu > >