From owner-freebsd-hackers Tue Dec 7 21:53:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 6275C15197 for ; Tue, 7 Dec 1999 21:53:52 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id AAA03932; Wed, 8 Dec 1999 00:53:51 -0500 (EST) (envelope-from luoqi) Date: Wed, 8 Dec 1999 00:53:51 -0500 (EST) From: Luoqi Chen Message-Id: <199912080553.AAA03932@lor.watermarkgroup.com> To: hackers@FreeBSD.ORG, vsilyaev@mindspring.com Subject: Re: FreeBSD-i386 and GS selector register Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hi > > I have the next question. > The FreeBSD on i386 don't use GS register, even kernel DDB don't show > it. And at the time when kernel loaded and operational GS didn't > initialized yet and have some garbage value (something like 0x1f, i.e. > pointed to the LDT). But because no one don't touch that all working fine. > 0x1f is not garbage, it's (FreeBSD) standard user data segment. > Question. > The some driver had code like this: > push %gs <--- OK 0x1f saved on the stack > ... > call do_big_deal > ... > pop %gs <--- Restore 0x1f and have a fault, probably Double Fault > It could only be that the driver code changed the LDT descriptor and didn't restore it upon return. > I can't change that code. When I found this problem, I did simple hack, > before call that code I'm clear GS. But I want to know may be exist > a better solution? > > -- > Vladimir Silyaev > -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message