Re: X86 fpu registers in a signal handler's ucontext

From: Andi Kleen
Date: Mon Apr 29 2013 - 13:57:58 EST

"Warlich, Christof" <christof.warlich@xxxxxxxxxxx> writes:
> First, this link:
> suggests that unlike the GPRs, the FP registers are _not_ restored after
> returnung from the signal handler.

The FP registers are restored lazily, but the state for this is kept in
the kernel.

One easy way may be to catch the FPU exception too and clear from there?

There can be some complications with different save formats too (XSAVE
vs FXSAVE). So your solution may not be necessarily 100% portable
to all systems.


ak@xxxxxxxxxxxxxxx -- Speaking for myself only
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