Hi Andrew.
Attached patch works around the corruption
of the high word of the ESP register, which
is the official bug of x86 CPUs. The bug
triggers only when the one is using the
16bit stack segment.
Patch helps running many apps under dosemu,
and, according to the comments found in
Wine sources, also helps Wine.
The patch defines the per-CPU 16bit stacks,
and every time the process that uses 16bit
stack, returns to the userspace, we switch
to our 16bit stack and preload the high word
of ESP.
This also closes the "informational leak",
which is that the user process is not
supposed to know the kernel's ESP value.
Can this please be applied?
Acked-by: Linus Torvalds <[email protected]>
|Signed-off-by: Stas Sergeev <[email protected]>|
On Tue, 4 Jan 2005, Stas Sergeev wrote:
>
> Can this please be applied?
Please don't do it like this - you made the patch now depend on the
ugliest code in the universe, namely that horribly crappy kgdb-ga sh*t
("Don't hold back, Linus, tell us how you really feel").
The 16-bit stack code may not be the prettiest either, but it doesn't hold
a candle to the asm-crap that is entry.S after kgdb-ga.
"resume_kernelX"? What crud.
Linus
Hi Linus.
Linus Torvalds wrote:
> Please don't do it like this - you made the patch now depend on the
> ugliest code in the universe, namely that horribly crappy kgdb-ga sh*t
I didn't do that. I just re-targeted the
patch to -mm tree and it clashed with the
kgdb-ga patch. And somehow it happened
that a few lines I would have to insert
myself otherwise anyway, appeared to be
already there for me to re-use. I wouldn't
call that a dependancy. Only 3 lines are
re-used in fact.
> The 16-bit stack code may not be the prettiest either, but it doesn't hold
> a candle to the asm-crap that is entry.S after kgdb-ga.
>From what I can see, kgdb-ga have only
3 small hunks in entry.S, so the crap is
probably very dense there.
Clashing into one of these hunks looks
unavoidable for my needs.
> "resume_kernelX"? What crud.
Does "restore_nocheck" sound better?
Yes, maybe, but then I don't see the way
to provide my patch for -mm. So the attached
one is for plain 2.6.10. I don't know how
Andrew can apply it, so maybe you will?
Signed-off-by: Stas Sergeev <[email protected]>