diff --git a/arch/x86/include/uapi/asm/sigcontext.h b/arch/x86/include/uapi/asm/sigcontext.h index 3591cef6d7d2..d0def259d545 100644 --- a/arch/x86/include/uapi/asm/sigcontext.h +++ b/arch/x86/include/uapi/asm/sigcontext.h @@ -218,7 +218,7 @@ struct sigcontext_32 { * of extended memory layout. See comments at the definition of * (struct _fpx_sw_bytes) */ - void __user *fpstate; /* Zero when no FPU/extended context */ + __u32 fpstate; /* Zero when no FPU/extended context */ __u32 oldmask; __u32 cr2; }; @@ -258,7 +258,7 @@ struct sigcontext_64 { * of extended memory layout. See comments at the definition of * (struct _fpx_sw_bytes) */ - void __user *fpstate; /* Zero when no FPU/extended context */ + __u64 fpstate; /* Zero when no FPU/extended context */ __u64 reserved1[8]; }; diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index da52e6bb5c7f..3724ff38033e 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -63,6 +63,7 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) { + unsigned long buf_val; void __user *buf; unsigned int tmpflags; unsigned int err = 0; @@ -107,7 +108,8 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); regs->orig_ax = -1; /* disable syscall checks */ - get_user_ex(buf, &sc->fpstate); + get_user_ex(buf_val, &sc->fpstate); + buf = (void __user *)buf_val; } get_user_catch(err); err |= fpu__restore_sig(buf, config_enabled(CONFIG_X86_32));