[ARM] Merge sigcontext and sigmask members of sigframe
ucontext contains both the sigcontext and sigmask structures, and is also used for rt signal contexts. Re-use this structure for non-rt signals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
cc1a852137
commit
7d4fdc19fc
@@ -193,8 +193,7 @@ struct aux_sigframe {
|
|||||||
* Do a signal return; undo the signal stack. These are aligned to 64-bit.
|
* Do a signal return; undo the signal stack. These are aligned to 64-bit.
|
||||||
*/
|
*/
|
||||||
struct sigframe {
|
struct sigframe {
|
||||||
struct sigcontext sc;
|
struct ucontext uc;
|
||||||
sigset_t sigmask;
|
|
||||||
unsigned long retcode[2];
|
unsigned long retcode[2];
|
||||||
struct aux_sigframe aux __attribute__((aligned(8)));
|
struct aux_sigframe aux __attribute__((aligned(8)));
|
||||||
};
|
};
|
||||||
@@ -264,7 +263,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
|
|||||||
|
|
||||||
if (!access_ok(VERIFY_READ, frame, sizeof (*frame)))
|
if (!access_ok(VERIFY_READ, frame, sizeof (*frame)))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
if (__copy_from_user(&set, &frame->sigmask, sizeof(set)))
|
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
|
|
||||||
sigdelsetmask(&set, ~_BLOCKABLE);
|
sigdelsetmask(&set, ~_BLOCKABLE);
|
||||||
@@ -273,7 +272,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
|
|||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
if (restore_sigcontext(regs, &frame->sc, &frame->aux))
|
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &frame->aux))
|
||||||
goto badframe;
|
goto badframe;
|
||||||
|
|
||||||
/* Send SIGTRAP if we're single-stepping */
|
/* Send SIGTRAP if we're single-stepping */
|
||||||
@@ -482,8 +481,8 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
|
|||||||
if (!frame)
|
if (!frame)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
err |= setup_sigcontext(&frame->sc, &frame->aux, regs, set->sig[0]);
|
err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->aux, regs, set->sig[0]);
|
||||||
err |= __copy_to_user(&frame->sigmask, set, sizeof(*set));
|
err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
|
||||||
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
err = setup_return(regs, ka, frame->retcode, frame, usig);
|
err = setup_return(regs, ka, frame->retcode, frame, usig);
|
||||||
|
Reference in New Issue
Block a user