The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: eliad lubovsky <eliadl@013.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Handle kernel page faults using task gate
Date: Thu, 30 Jun 2005 12:53:30 -0400	[thread overview]
Message-ID: <200506301256_MC3-1-A31A-142@compuserve.com> (raw)

On Thu, 30 Jun 2005 at 09:11:01 +0200, Ingo Molnar wrote:

> * eliad lubovsky <eliadl@013.net> wrote:
> 
> > How do I clear the 'busy' bit?
> > I set my TSS descriptor with
> > __set_tss_desc(cpu, GDT_ENTRY_PAGE_FAULT_TSS, &pagefault_tss);
> 
> i suspect you have to clear the busy bit in the pagefault handler 
> itself. The CPU marks it as busy upon fault. I guess it would be OK to 
> just do the above __set_tss_desc() for _every_ pagefault, that too will 
> clear the busy bit, but you are probably better off just clearing that 
> bit manually:
> 
>     cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;


  Tasks are not reentrant.  Clearing the busy bit could let a second
instance of the handler overwrite the stack of the current one.

  Since recursive page faults should never occur, this should be OK.
Each CPU needs its own TSS for concurrent fault handling on SMP, though.


--
Chuck

             reply	other threads:[~2005-06-30 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 16:53 Chuck Ebbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-07-01  4:40 Handle kernel page faults using task gate Chuck Ebbert
2005-06-30 16:53 Chuck Ebbert
2005-06-28 22:18 eliad lubovsky
2005-06-29 13:09 ` Ingo Molnar
2005-06-29 15:43   ` eliad lubovsky
2005-06-29 19:27   ` Ingo Molnar
2005-06-30  6:57     ` eliad lubovsky
2005-06-30  7:11       ` Ingo Molnar
2005-07-01  1:23         ` eliad lubovsky

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=200506301256_MC3-1-A31A-142@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=eliadl@013.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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