Hi Alan. 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, and is described here: http://www.intel.com/design/intarch/specupdt/27287402.PDF Patch helps running many apps under dosemu, and, according to the comments found in Wine sources, also helps Wine. Also the patch closes the "information leak", which is that the half of the kernel's %esp value gets leaked to user-space. The initial discussion about the problem can be found here: http://lkml.org/lkml/2004/9/16/254 On a later stages the development of that patch was driven mainly by Linus, but it was in private. This patch adds only 6 instructions for the fast kernel-->user return path, 6 instructions on an exception path and 5 instructions on an NMI path. All the rest of the patch gets executed only for the two apps in that world, namely, dosemu and wine (and VMWare?). That's why it should be relatevely easy to make sure the patch doesn't do any harm for the normal apps, and so it is safe, and probably fits into an -ac tree. How it works: - Allocates the per-cpu data for 16bit stacks and sets the per-cpu GDT entries for them. - On a return to userspace, checks whether the SS is from LDT and is 16 bit. - If it is, the iret frame gets copied to the 16bit per-cpu stack and stack gets switched to the 16bit one, while the higher word of %esp gets preloaded with the proper value. - On an exceptions the check is performed to see if we are on a 16bit stack, and if we are - switch to the 32bit one. Alan, would it be possible to apply that patch to an -ac tree? Acked-by: Linus Torvalds Acked-by: Petr Vandrovec Signed-off-by: Stas Sergeev