linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 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: Sun, 11 May 2003 17:22:40 +0000	[thread overview]
Message-ID: <20030511172240.A957@mrt-lx1.iram.es> (raw)
In-Reply-To: <200305102353_MC3-1-385A-BC35@compuserve.com>

On Sat, May 10, 2003 at 11:50:07PM -0400, Chuck Ebbert wrote:
> Gabriel Paubert wrote:
> 
> > The devil is in the details: you have to edit the TSS, clear the busy bit
> > of the previous TSS, LTR, clear the busy bit of the debug TSS, restore
> > many registers from the previous TSS image, switch to the kernel stack of
> > the interrupted process, push a lot of stuff on the stack to be used by iret.
> > (depending on whether you return to kernel/user/v86 modes). All of this in the 
> > right order, of course (and after having cleared your own NT flag).
> 
>  And this is the way to do it right, but...

And you don't need to keep cr3 in the TSS.
> 
> > Doable I believe but not simple, and there is still the TS issue.
> 
>  I finally realized the TS problem is basically unsolvable.  There is no
> way to know what the value was before a switch happened.

I believe the TS value can be inferred from the thread flags except
between kernel_fpu_begin() and kernel_fpu_end().
 
>  (BTW some other Free kernel has interesting things in its descriptor
> tables: DPL 1 execute-only code segments, conforming code, expand-down
> data, multiple LDTs etc...  It uncovered a bug in my code, too.)

Interesting, but using 3 privilege levels is not very portable, and
you'll need another per process stack.

Multiple LDT, how can this be useful and what are the semantics? 
There are enough problems with LDT eating up vmalloc space (I believe 
I have a solution to that particular problem).

	Gabriel.

  reply	other threads:[~2003-05-11 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-11  3:50 desc v0.61 found a 2.5 kernel bug Chuck Ebbert
2003-05-11 17:22 ` paubert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09  8:58 Chuck Ebbert
2003-04-30 20:08 Chuck Ebbert
2003-05-08 22:54 ` paubert
2003-04-30  2:33 Chuck Ebbert
2003-04-30 17:10 ` Gabriel Paubert
2003-04-27 21:09 Chuck Ebbert
2003-04-28 10:34 ` Gabriel 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=20030511172240.A957@mrt-lx1.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;
as well as URLs for NNTP newsgroup(s).