Re: Something very strange on x86_64 2.6.X kernels

From: Petr Vandrovec
Date: Fri Jan 21 2005 - 13:36:03 EST


On Fri, Jan 21, 2005 at 05:49:25PM +0100, Eric Dumazet wrote:
> Petr Vandrovec wrote:
>
> >
> >Maybe I already missed answer, but try patch below. It is definitely bad
> >to mark syscall page as global one...
> >
>
> Hi Petr
>
> If I follow you, any 64 bits program is corrupted as soon one 32bits
> program using sysenter starts ?

Yes. As soon as 32bit app touches sysenter page (execution, read, whatever),
it is loaded to the processor's TLB, and as page is marked global it is not
flushed when kernel switches address space to another app - like 64bit
one. Fortunately TLB is not that big, so for most of real-world workloads
you'll not notice, but if you are doing context switches really often,
sooner or later you'll hit vsyscall page instead of data page your process
has mapped, and bad things happen.

To get your app (or any other 64bit app...) to work reliably on unpatched
kernels you should mmap one page at 0xffffe000 and forget about that page
forever...
Petr

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