All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Bjorn Wesen <bjorn@sparta.lu.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: meaning of vmalloc shortcut comment in fault.c
Date: Tue, 05 Jun 2001 11:11:06 -0400	[thread overview]
Message-ID: <3B1CF68A.65AB5108@didntduck.org> (raw)
In-Reply-To: <Pine.LNX.3.96.1010605145320.9033B-100000@medusa.sparta.lu.se>

Bjorn Wesen wrote:
> 
> Can someone elaborate on why it's bad to refer to tsk directly below (this
> is a 2.4.5 change in x86) and why it's needed on x86 and not other archs..
> 
> What should I do for an arch that does not have a "cr3" machine register
> to check with ?

%cr3 is the page table pointer on the x86.  Changing the page table
pointer and changing the stack pointer (from which tsk is derived) is
not done atomically during a task switch.  If an interrupt happens in
between and causes a page fault on a vmalloced area, using tsk may refer
to the wrong page tables.  %cr3 by definition always has the current
page table pointer.

--

				Brian Gerst

      reply	other threads:[~2001-06-05 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-05 12:56 meaning of vmalloc shortcut comment in fault.c Bjorn Wesen
2001-06-05 15:11 ` Brian Gerst [this message]

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=3B1CF68A.65AB5108@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=bjorn@sparta.lu.se \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.