Re: [PATCH -tip] kmemcheck: fix crash in PnP BIOS calls

From: Alan Cox
Date: Sun Oct 05 2008 - 14:18:41 EST


> It turns out that BIOS calls are made with a different code segment. So
> when kmemcheck tries to dereference the EIP/RIP (using the kernel data
> segment register), we get the unhandled page fault.
>
> I think we can solve this by verifying (in the page fault handler) that
> the faulting code is using the kernel CS.

That isn't an entirely safe assumption and some services such as BIOS32
are 32bit. Would it be better wrap BIOS calls with a kmemcheck wrapper
which changes the way kmemcheck works/dumps stuff and also gives you a
hook after BIOS calls to do stuff like corruption scans or change
detection on kernel pages ?

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