Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113300
b: refs/heads/master
c: 69e13ad
h: refs/heads/master
v: v3
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Oct 3, 2008
1 parent 46dd0ed commit 32ee1bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2e8d3dcfd420177aaa0c53aca60a869bad75f4b
refs/heads/master: 69e13ad56f9e2cd81c4f8bfd6267211c10c14c08
21 changes: 7 additions & 14 deletions trunk/arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ static int
restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
unsigned long *pax)
{
void __user *buf;
unsigned int tmpflags;
unsigned int err = 0;

/* Always make any pending restarted system calls return -EINTR */
Expand All @@ -156,21 +158,12 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
COPY_SEG_STRICT(cs);
COPY_SEG_STRICT(ss);

{
unsigned int tmpflags;
err |= __get_user(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
regs->orig_ax = -1; /* disable syscall checks */

err |= __get_user(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) |
(tmpflags & FIX_EFLAGS);
regs->orig_ax = -1; /* disable syscall checks */
}

{
void __user *buf;

err |= __get_user(buf, &sc->fpstate);
err |= restore_i387_xstate(buf);
}
err |= __get_user(buf, &sc->fpstate);
err |= restore_i387_xstate(buf);

err |= __get_user(*pax, &sc->ax);
return err;
Expand Down
19 changes: 7 additions & 12 deletions trunk/arch/x86/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ static int
restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
unsigned long *pax)
{
void __user *buf;
unsigned int tmpflags;
unsigned int err = 0;

/* Always make any pending restarted system calls return -EINTR */
Expand All @@ -90,19 +92,12 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
* App's signal handler can save/restore other segments if needed. */
COPY_SEG_STRICT(cs);

{
unsigned int tmpflags;
err |= __get_user(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
regs->orig_ax = -1; /* disable syscall checks */
}

{
void __user *buf;
err |= __get_user(tmpflags, &sc->flags);
regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
regs->orig_ax = -1; /* disable syscall checks */

err |= __get_user(buf, &sc->fpstate);
err |= restore_i387_xstate(buf);
}
err |= __get_user(buf, &sc->fpstate);
err |= restore_i387_xstate(buf);

err |= __get_user(*pax, &sc->ax);
return err;
Expand Down

0 comments on commit 32ee1bf

Please sign in to comment.