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

From: Andi Kleen
Date: Mon May 19 2008 - 11:08:59 EST

> The de-facto ABI for signal delivery and sigreturn is unfortunately
> based on fairly fixed-layout structs on the stack (sigframes). The
> only flexibility there that I've found is the sigcontext's fpstate
> pointer which allows the fpstate to be located elsewhere.

One sure 100% compatible way would be to only change the signal layout once
the application used anything that needs XSAVE/XRSTOR. But implementing
that would be likely complicated and I'm not sure it's worth it.

I don't remember that much breakage when the FXSAVE support was
introduced on i386. That already changed these data structures.

> Another idea is that marking non-siginfo sigframes could be done
> by adding a sys_xsave_sigreturn() and letting those sigframes
> have a return address pointing to a vsyscall that invokes this
> new syscall.

That sounds easy enough. x86-64 right now doesn't use signal vsyscalls but
there is no principle reason it can't.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at