From owner-cvs-all@FreeBSD.ORG Sat Aug 2 01:13:47 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 363B637B401; Sat, 2 Aug 2003 01:13:47 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6B6F43FDF; Sat, 2 Aug 2003 01:13:46 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h728DiUp048349; Sat, 2 Aug 2003 01:13:45 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <002e01c358ce$6df2ecd0$0701a8c0@tiger> From: "David Xu" To: "Julian Elischer" , , , References: <200308020652.h726qaUs066611@repoman.freebsd.org> Date: Sat, 2 Aug 2003 16:16:50 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Re: cvs commit: src/sys/i386/i386 sys_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 08:13:47 -0000 ----- Original Message -----=20 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 >=20 > FreeBSD src repository >=20 > Modified files: > sys/i386/i386 sys_machdep.c=20 > 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). > =20 > Reviewed by: deischen@ > =20 > Revision Changes Path > 1.87 +21 -4 src/sys/i386/i386/sys_machdep.c >=20 The code is incorrect: dp =3D &((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 =3D NLDT + 1; i < pldt->ldt_len; ++i) { if (dp->sd.sd_type =3D=3D SDT_SYSNULL) break; dp++; } dp is set to start from NLDT not NLDT+1, so the 'i' and 'dp' is out of synchronous. 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 -- David Xu