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

From: Pavel Machek
Date: Fri Apr 10 2009 - 06:44:09 EST


On Fri 2009-04-10 12:39:34, Ingo Molnar wrote:
>
> * Pavel Machek <pavel@xxxxxx> wrote:
>
> > Hi!
> >
> > > x86, setup: "glove box" BIOS calls -- infrastructure
> > >
> > > Impact: new interfaces (not yet used)
> > >
> > > For all the platforms out there, there is an infinite number of buggy
> > > BIOSes. This adds infrastructure to treat BIOS interrupts more like
> > > toxic waste and "glove box" them -- we switch out the register set,
> > > perform the BIOS interrupt, and then restore the previous state.
> > >
> > > LKML-Reference: <49DE7F79.4030106@xxxxxxxxx>
> > > Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
> > > Cc: Pavel Machek <pavel@xxxxxx>
> >
> > Sounds quite sane. Disadvantage is that we will no longer detect
> > those buggy BIOSen.
>
> I'd call that an advantage: sandboxing BIOS calls as much as we can
> and trusting all data from it as if it were a random packet from the
> Internet is the only sane way forward IMHO.

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

> If we really care we could put in checks for unexpected register
> state changes ... but is it worth the trouble?

So maybe we do need to cooperate with BIOS people, making them fix
their code. Checking for unexpected changes would certainly be good
idea for firmware testing kit... and it would probably make sense to
complain during regular boot, too.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/