Re: [tip:x86/setup] x86, setup: "glove box" BIOS calls -- infrastructure

From: Avi Kivity
Date: Sat Apr 11 2009 - 12:15:14 EST


Pavel Machek wrote:
Hi!

Well, difference is that you can defend against arbitrary network packet, but you can't defend against arbitrarily broken BIOS. If it loops forever, or overwrites random memory place, we lost...
We could protect against random memory corruption too, if it ever became a widespread problem: by executing the BIOS call in a virtual machine. (We can probably use the KVM code to properly emulate big real mode, etc.)

We already have problems where bios corrupts low memory area during
suspend/resume. Not sure how KVM helps.


kvm might help detecting these issues, but not in fixing them. If you isolate the BIOS, then you've prevented corruption, but you've also prevented it from doing whatever it is it was supposed to do. If you give it access to memory and the rest of the system, then whatever evil it has wrought affects the system.

You could try to allow the BIOS access to selected pieces of memory and hardware, virtualizing the rest, but it seems to me it would be more like a recipe for a giant headache that a solution.


--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
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/