Re: Pentium bug fix

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Thu, 18 Dec 1997 09:02:25 +0100


> I'm already running 2.0.32 which fixes the f00f bug. However, I'm very
> curious as to exactly how the invalid opcode was trapped. I have the
> source code, but can we just have some description on how the fix works?
> I'd really like to know.

Please search the linux-kernel archives, you'll find a lot of
discussion about this question.

In short, the best known fix masks the interrupt descriptor table as
read-only. When the processor executes this invalid instruction, it
apparently requires write permissions for the IDT, which in turn
leads to a page fault. The protection fault handler checks whether
it accessed the IDT, then produces SIGILL, otherwise SIGSEGV.

Older versions of the patch completely unmapped this part of the
IDT, causing a page fault for every of the first six faults.

Regards,
Martin