aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32_signal.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 452d4dd0a95a..8c77c64fbd27 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -251,7 +251,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
251 251
252 get_user_ex(tmp, &sc->fpstate); 252 get_user_ex(tmp, &sc->fpstate);
253 buf = compat_ptr(tmp); 253 buf = compat_ptr(tmp);
254 err |= restore_i387_xstate_ia32(buf); 254 err |= restore_xstate_sig(buf, 1);
255 255
256 get_user_ex(*pax, &sc->ax); 256 get_user_ex(*pax, &sc->ax);
257 } get_user_catch(err); 257 } get_user_catch(err);
@@ -382,9 +382,12 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
382 sp = (unsigned long) ka->sa.sa_restorer; 382 sp = (unsigned long) ka->sa.sa_restorer;
383 383
384 if (used_math()) { 384 if (used_math()) {
385 sp = sp - sig_xstate_ia32_size; 385 unsigned long fx_aligned, math_size;
386
387 sp = alloc_mathframe(sp, 1, &fx_aligned, &math_size);
386 *fpstate = (struct _fpstate_ia32 __user *) sp; 388 *fpstate = (struct _fpstate_ia32 __user *) sp;
387 if (save_i387_xstate_ia32(*fpstate) < 0) 389 if (save_xstate_sig(*fpstate, (void __user *)fx_aligned,
390 math_size) < 0)
388 return (void __user *) -1L; 391 return (void __user *) -1L;
389 } 392 }
390 393