Re: Pentium emulation

Linus Torvalds (
29 Jul 1997 03:26:15 GMT

In article <>,
Mike Jagdis <> wrote:
>On Fri, 25 Jul 1997, Alan Cox wrote:
>> Not really. Except for BSWAP the 386/486/586 user mode stuff is basically
>> all down to how you order instructions and how you align them not to new
>> instructions
>I thought there was some problem with 386s not write faulting
>correctly when you had kernel level privileges? Hence the 386/486
>differences in verify_area.

Well, Alan did say "user mode stuff".

The i386 is indeed very very broken when it comes to read-only pages in
kernel space. The kernel tries to handle this, but the i386 braindamage
does result in threads being inherently unsafe because there are various
nasty race conditions that a thread library could hit.

This is fixed in the i486 and up, and the threads race problem only
shows up for code that tries to be malicious on purpose, so it is mostly
harmless (hint: if you're using a 386 as a server that accepts logins,
you should probably try to hit somebody for a 486 - there must be tons
of them lying around).