* [uml-devel] Subject: [PATCH 09/91] um: don't rely on sc.fpstate not having been reassigned prior to rt_sigreturn()
@ 2011-08-18 19:00 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2011-08-18 19:00 UTC (permalink / raw)
To: richard; +Cc: linux-kernel, user-mode-linux-devel
native rt_sigreturn() doesn't...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/um/sys-x86_64/signal.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 581b64d..ccfa554 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -44,10 +44,10 @@ void copy_sc(struct uml_pt_regs *regs, void *from)
}
static int copy_sc_from_user(struct pt_regs *regs,
- struct sigcontext __user *from,
- struct _fpstate __user *fpp)
+ struct sigcontext __user *from)
{
struct user_i387_struct fp;
+ void __user *buf;
int err = 0;
#define GETREG(regs, regno, sc, regname) \
@@ -78,7 +78,11 @@ static int copy_sc_from_user(struct pt_regs *regs,
#undef GETREG
- err = copy_from_user(&fp, fpp, sizeof(struct user_i387_struct));
+ err = __get_user(buf, &from->fpstate);
+ if (err)
+ return 1;
+
+ err = copy_from_user(&fp, buf, sizeof(struct user_i387_struct));
if (err)
return 1;
@@ -272,8 +276,7 @@ long sys_rt_sigreturn(struct pt_regs *regs)
sigdelsetmask(&set, ~_BLOCKABLE);
set_current_blocked(&set);
- if (copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext,
- &frame->fpstate))
+ if (copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext))
goto segfault;
/* Avoid ERESTART handling */
--
1.7.2.5
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-18 19:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 19:00 [uml-devel] Subject: [PATCH 09/91] um: don't rely on sc.fpstate not having been reassigned prior to rt_sigreturn() Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox