Hi Richard, On 2016/3/18 6:21, Richard Weinberger wrote: > Where exactly are the FPU regs restored in the sigregturn case? > Not sure if I fully understand the error scenario.
Well, sys_sigreturn() or sys_rt_sigreturn() calls copy_sc_from_user(), and the latter copies fpstate, which is the saved FPU state before the signal handler was invoked, from sigframe and restores it. That is correct: after returning from the signal handler, the process is in the same FPU state before it was invoked. However, userspace() saves the FPU state before a system call and restores it after. In the sigreturn case, after sys_sigreturn() returns, which has already made FPU in the right state, userspace() overwrites it by making it in the state prior to the sigreturn was called (i.e., the signal handler's state). That leaves the process in question a corrupted FPU state. Eli ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel