[lkml]   [2009]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] x86/paravirt for v2.6.33

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.


 \ /
  Last update: 2009-12-09 23:01    [W:0.092 / U:15.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site