Obscure kernel bug that (probably) only affects me ...

Stephen Rothwell (sfr@canb.auug.org.au)
Sun, 10 Jan 1999 23:57:37 +1100


Hi all,

In trying to debug an APM problem (actually trying to confirm
yet another faulty BIOS implementation), I have come across
an obscure kernel bug.

The code that prints out the OOPS information looks like
this:

static void show_registers(struct pt_regs *regs)
{
.
printk("\nCode: ");
for(i=0;i<20;i++)
printk("%02x ", ((unsigned char *)regs->eip)[i]);
.
}

This assumes that The code that faulted was being executed out of the
kernel's code segment (and that the code segment and data segment are
the same (which is OK)). Unfortunately, when you fault inside the APM
BIOS, you are in a different code segement. In the current case, this
caused a recursive fault.

I guess I could figure this out given time, but I know that there are
much better hackers out there than me and I suspect that this is the
quickest way to get a result :-)

My problem boils down to the fact that regs->xcs is not KERNEL_CS.

Any solutions appreciated ...

Cheers,
Stephen

--
Stephen Rothwell                    Stephen.Rothwell@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/