From: Gabriel Paubert <paubert@iram.es>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: desc v0.61 found a 2.5 kernel bug
Date: Mon, 28 Apr 2003 12:34:20 +0200 [thread overview]
Message-ID: <20030428103420.GB7396@iram.es> (raw)
In-Reply-To: <200304271711_MC3-1-3647-1A8A@compuserve.com>
On Sun, Apr 27, 2003 at 05:09:04PM -0400, Chuck Ebbert wrote:
>
>
> desc v0.61 running on Linux 2.5.68-rel:
>
> GDT at c0306300, 32 entries:
>
> GDT# 12: base:00000000 limit:ffffffff flags:c09b <P:1 DPL:0 32-bit Code>
> GDT# 13: base:00000000 limit:ffffffff flags:c093 <P:1 DPL:0 RW Data>
> GDT# 14: base:00000000 limit:ffffffff flags:c0fb <P:1 DPL:3 32-bit Code>
> GDT# 15: base:00000000 limit:ffffffff flags:c0f3 <P:1 DPL:3 RW Data>
> GDT# 16: base:c0353800 limit:000eb flags:008b <P:1 DPL:0 Busy TSS>
>
> TSS at c0353800, 236 bytes:
>
> CS:0000 <GDT#00,RPL0> EIP:00000000 eflags:00000000
> SS0:0068 <GDT#13,RPL0> ESP0:c2806000
> SS:0000 <GDT#00,RPL0> ESP:00000000
> DS:0000 <GDT#00,RPL0> ES:0000 <GDT#00,RPL0>
> FS:0000 <GDT#00,RPL0> GS:0000 <GDT#00,RPL0>
> LDT:0011 <GDT#02,RPL1> CR3:00000000
> ^^^^ ^^^^^^^^
>
>
> The LDT in the kernel's TSS is wrong -- it's shifted right by three
It would only be used if we ever performed a hardware task switch
back to the kernel's default TSS. However, it's clearly wrong.
>
> bits and should be 0088 <GDT entry #17, RPL 0>
>
> And shouldn't CR3 be intitialized in case anyone actually wants to
> switch back to the kernel TSS?
For now no, since the only task gate ever taken (double fault), never
returns (you don't want to update the TSS's CR3 field on every
switch_to() so you would have to do it in the task gate return
path, as well as having a correct LDT field).
However, returning from a task gate is so much fraught with races wrt
segment registers that the best thing to do is to avoid it. Read out
the details on how segment registers are reloaded on a hardware task
switch to convince yourself.
Gabriel
>
>
> ------
> Chuck
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2003-04-28 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-27 21:09 desc v0.61 found a 2.5 kernel bug Chuck Ebbert
2003-04-28 10:34 ` Gabriel Paubert [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-04-30 2:33 Chuck Ebbert
2003-04-30 17:10 ` Gabriel Paubert
2003-04-30 20:08 Chuck Ebbert
2003-05-08 22:54 ` paubert
2003-05-09 8:58 Chuck Ebbert
2003-05-11 3:50 Chuck Ebbert
2003-05-11 17:22 ` paubert
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=20030428103420.GB7396@iram.es \
--to=paubert@iram.es \
--cc=76306.1226@compuserve.com \
--cc=linux-kernel@vger.kernel.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