Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions

From: Mikael Pettersson
Date: Thu May 22 2008 - 18:23:16 EST


H. Peter Anvin writes:
> > But user can potentially change the _fpstate pointer in sigcontext struct.
>
> If so, they get what they bargained for... I am not even sure the kernel
> will successfully clean up the stack frame if they do that.

Why would that be a problem? The stack is defined by the user's SP,
which is in the integer state part of the sigframe. We do a sigreturn(),
reload SP/PC/etc, and off we go. Where fpstate pointed to doesn't matter,
as long as it was NULL or a valid fpstate image.
--
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/