Re: [patch] lazy TSS's I/O bitmap copy ...

From: Davide Libenzi
Date: Mon Aug 23 2004 - 17:28:36 EST


On Mon, 23 Aug 2004, Linus Torvalds wrote:

> On Mon, 23 Aug 2004, Davide Libenzi wrote:
> >
> > The eventually double GPF would happen only on TSS-IObmp-lazy tasks, ie
> > tasks using the I/O bitmap.
>
> You could also check for the error code (at least the low 16 bits) being
> 0, I guess, just to cut down the noise.

Yep, that's right there available.



> > The check for the I/O opcode can certainly be
> > done though, even if it'd make the code a little bit more complex.
>
> Have to be very careful there to avoid nasty security issues. And with
> ins/outs, you can have various prefixes etc, so decoding is not as trivial
> as it could otherwise be. Even the regular in/out can have a data size
> overrides..
>
> in/out is also commonly used from vm86 mode, so decoding it really needs
> to get all of the segmentation base crap right too. Nasty nasty nasty.
>
> In short, I think that if we do this at all, I'd much rather just do the
> simple "trap twice" thing that Davide did. It's too easy to get it wrong
> otherwise.

IMHO since the GPF path is not a fast path like a page fault, we shouldn't
be in bad shape with the current approach. No?



- Davide

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