[lkml]   [2001]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: meaning of vmalloc shortcut comment in fault.c
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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.057 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site