Re: Pentium DEATH in user-mode

Albert D. Cahalan (acahalan@cs.uml.edu)
Sat, 8 Nov 1997 10:50:28 -0500 (EST)


Adam Wiggins writes:

> Is is possible to make a kernel patch or something else to keep an
> eye out for these byte codes? Without some sort of protection this
> could case some major problems with pentium based linux boxes.

Sure, at a cost.

1. Add the patch to stop execution on the stack.
2. Check every page that becomes executable.
3. Check every page that is swapped in as executable.
4. Enforce read-only for executable pages.
5. Watch out for the debugger.

When a process tries to make a page writeable _and_ executable,
remove one permission or the other. (the one that does not
break too many programs)

Watch for opcodes that span pages!

if((testme & 0xf8ffffff) == 0xc8c70ff0) ...

Since a recall (if there is one!) will take some time,
this hack may be of some use. Think how many times someone
can crash your system before you can get a new CPU.
Even a software update of the microcode (which is possible
for recent Pentium chips) will take a long time. Intel
may insist that the update be put in a flash BIOS update.