From: Coywolf Qi Hunt <coywolf@greatcn.org>
To: Linux-Kernel@vger.kernel.org
Cc: tao@acc.umu.se, Riley@Williams.Name, davej@codemonkey.org.uk,
hpa@zytor.com, alan@lxorguk.ukuu.org.uk, root@chaos.analogic.com,
torvalds@osdl.org
Subject: Re: [2.0.40 2.2.25 2.4.25] Fix boot GDT limit 0x800 to 0x7ff in setup.S or not
Date: Sat, 21 Feb 2004 11:39:23 +0800 [thread overview]
Message-ID: <4036D2EB.1090709@greatcn.org> (raw)
In-Reply-To: <40318FB0.6060109@lovecn.org>
Coywolf Qi Hunt wrote:
> Coywolf Qi Hunt wrote:
>
>> Hello 2.4.xx hackers,
>>
>> In setup.S, i feel like that the gdt limit 0x8000 is not proper and it
>> should be 0x800. How came 0x800 into 0x8000 in 2.4.xx code? Is there
>> a story? It shouldn't be a careless typo. 256 gdt entries should be
>> enough and since it's boot gdt, 256 is ok even if the code is run on
>> SMP with 64 cpus.
>> At least the comment doesn't match the code. Either fix the code or
>> fix the comment. We really needn't so many GDT entries. Let's use the
>> intel segmentation in a most limited way. Below follows a patch fixing
>> the code.
>>
>> I don't have the latest 2.4.24, but setup.S isn't changed from 2.4.23
>> to 2.4.24.
>>
>> Regards, Coywolf
>>
>> ------------------------------------------------------------------------
>>
>> --- arch/i386/boot/setup.S.orig 2003-11-29 02:26:20.000000000 +0800
>> +++ arch/i386/boot/setup.S 2004-02-17 01:15:42.000000000 +0800
>> @@ -1093,7 +1093,7 @@
>> .word 0 # idt limit = 0
>> .word 0, 0 # idt base = 0L
>> gdt_48:
>> - .word 0x8000 # gdt limit=2048,
>> + .word 0x800 # gdt limit=2048,
>> # 256 GDT entries
>>
>> .word 0, 0 # gdt base (filled in later)
>>
>>
>>
>
> Hello all hackers, from 2.0 to 2.4,
>
> In setup.S, from the very beginning (in boot/boot.s for 0.01 kernel),
> all boot GDT limits are set to 0x800. GDT limit is the LIMIT, not SIZE.
> So all these 0x800 should be 0x7ff. And actually in the current 2.4.24,
> it is even an odd 0x8000 which I previously just sent a patch to fix to
> 0x800. But it should be set to 0x7ff really. Until now only 2.6 sets it
> properly. Although these will never cause any runtime problem at all,
> they are ugly. Please consider fix them.
>
> Since it is always 0x800, i even get used to 0x800 rather then the
> proper 0x7ff. If leave it 0x800, it's useful to distinguish the boot GDT
> from the later final GDT setting in arch/i386/kernel/head.S. So fix it
> or not.
>
>
> Regards,
> Coywolf
>
hello,
Since still no one cares, here follows a cut from the intel bible which
every one should show his RESPECT to.
IA-32 Intel Architecture Software Developer's Manual
Volume 3: System Programming Guide
3.5.1. Segment Descriptor Tables
3-17 Page:81
"Because segment descriptors are always 8 bytes long, the GDT limit
should always be one less than an integral multiple of eight(that is,
8N-1)."
Please fix 0x8000 to 0x800 in 2.4, and 0x800 to 0x7ff in 2.0~2.4, ok?
This is my last appeal.
Coywolf
--
Coywolf Qi Hunt
Admin of http://GreatCN.org and http://LoveCN.org
next prev parent reply other threads:[~2004-02-21 3:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 19:07 [PATCH 2.4.24] Fix GDT limit in setup.S Coywolf Qi Hunt
2004-02-16 20:44 ` Richard B. Johnson
2004-02-19 0:54 ` Coywolf Qi Hunt
2004-02-19 1:18 ` Coywolf Qi Hunt
2004-02-19 8:33 ` { Linux not only practical, but an ideal. } " Coywolf Qi Hunt
2004-02-17 3:51 ` [2.0.40 2.2.25 2.4.25] Fix boot GDT limit 0x800 to 0x7ff in setup.S or not Coywolf Qi Hunt
2004-02-21 3:39 ` Coywolf Qi Hunt [this message]
2004-02-21 4:12 ` H. Peter Anvin
2004-02-23 5:30 ` Coywolf Qi Hunt
2004-02-23 14:02 ` [PATCH] Fix GDT limit in setup.S for 2.0 and 2.2 Coywolf Qi Hunt
2004-02-23 14:21 ` David Weinehall
2004-02-25 0:10 ` Pavel Machek
2004-02-23 14:43 ` Richard B. Johnson
2004-02-23 15:28 ` Richard B. Johnson
2004-02-23 16:21 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4036D2EB.1090709@greatcn.org \
--to=coywolf@greatcn.org \
--cc=Linux-Kernel@vger.kernel.org \
--cc=Riley@Williams.Name \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davej@codemonkey.org.uk \
--cc=hpa@zytor.com \
--cc=root@chaos.analogic.com \
--cc=tao@acc.umu.se \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox