lkml.org 
[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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
> IRQ
> 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
irq
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.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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