Re: [GIT PULL] x86/paravirt for v2.6.33

From: Linus Torvalds
Date: Wed Dec 09 2009 - 16:59:01 EST




On Wed, 9 Dec 2009, Jeremy Fitzhardinge wrote:

> On 12/08/09 13:34, Linus Torvalds wrote:
> > I do _not_ want to add any more task_pt_regs() crap, please.
> >
> > Why? It's wrong for at least vm86 mode (and from kernel system calls).
> >
>
> Would the stack frame version work in these cases?

It would "work" in the sense that at least it wouldn't corrupt the "outer"
stack frame - it would only change the inner one. For vm86 mode, that
would actually matter (iopl is meaningful), but as Peter also said, I
don't think we actually allow direct system calls from vm86 mode.

For me it's actually more of a conceptual complaint: I really think
'task_pt_regs()' is only reliable for ptrace and is simply _wrong_ in
other situations. On other architectures, you literally need to set up the
stack _differently_ on the signal handling path - which is what ptrace
does - than on regular system call paths.

So conceptually, the system call stack layout is simply _different_ than
the ptrace stack. And I'd hate to have x86 code that teaches people to do
things that really don't work in general.

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