[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] x86 page fault handler not interrupt safe

On Mon, 7 May 2001, Alan Cox wrote:
> I dont see that we will get a valid value in both cases.
> get_user
> fault - set %cr2
> vmalloc
> fault
> set %cr2
> fixup runs
> end IRQ
> cr2 is corrupt

Wrong. "%cr2" is _not_ "corrupt". It has a well-defined value.

So what happens is

get_user (or user-mode access)
fault - set %cr2 to fault1
vmalloc fault - set %cr2 to fault2
fixup runs, iret
irq runs, iret
%cr2 is still %fault2
vmalloc fault - nothing to do
"false fixup" runs, iret
get_user (or user-mode access)
fault - set %cr2 to fault1
... get the right behaviour now ...

> There are a whole set of races with the vmalloc fixups.

As far as I can tell, there are no races anywhere. Just silly bugs that
are hard to see.


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:52    [W:2.164 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site