[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pentium bug Q

Thomas Ruedas:
> > When booting I noticed the following message:
> > Intel Pentium with F0 0F bug
> > Workaround enabled.
> > Does somebody know what bug this is and what workaround is implemented.

R. Brock Lynn:
> Have a look at the kernel code:
> (I'm referring to kernel 2.2.3 but it may be exactly the same for 2.0.34 for
> this particular feature.)
> See arch/i386/kernel/traps.c
> I don't know what it means, but there are two "F0 0F"'s mentioned in that file.
> And a function called trap_init_f00f_bug(void)

The other half of that code is in arch/i386/mm/fault.c (at least in 2.0.36)

If memory serves (and judging by the source code it does), what happens is
that when a particular invalid instruction is executed, the CPU freezes.
This is bad because the instruction happens to be a user-level one (ie,
anyone may execute it).

The workaround is kinda cute: just before freezing, the CPU looks up a
value from some table ("IDT", I guess). The workaround arranges for that
particular part of the table to be permanently swapped out - that's what
trap_init_f00f_bug() does. That way, when somebody tries that trick, the
memory manager will be invoked, see what's happened and regain control.
That bit is part of do_page_fault().

We'll know the future has arrived when every mailer transparently
quotes lines that begin with "From ", but no-one remembers why.

Reply to: