Commit cc1a8521 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] Replace extramask with a full copy of the sigmask

There's not much point in splitting the sigmask between two different
locations, so copy it entirely into a proper sigset_t.  This will
eventually allow rt_sigframe and sigframe to share more code.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ce7a3fdc
...@@ -194,7 +194,7 @@ struct aux_sigframe { ...@@ -194,7 +194,7 @@ struct aux_sigframe {
*/ */
struct sigframe { struct sigframe {
struct sigcontext sc; struct sigcontext sc;
unsigned long extramask[_NSIG_WORDS-1]; 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,10 +264,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) ...@@ -264,10 +264,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 (__get_user(set.sig[0], &frame->sc.oldmask) if (__copy_from_user(&set, &frame->sigmask, sizeof(set)))
|| (_NSIG_WORDS > 1
&& __copy_from_user(&set.sig[1], &frame->extramask,
sizeof(frame->extramask))))
goto badframe; goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
...@@ -486,11 +483,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg ...@@ -486,11 +483,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
return 1; return 1;
err |= setup_sigcontext(&frame->sc, &frame->aux, regs, set->sig[0]); err |= setup_sigcontext(&frame->sc, &frame->aux, regs, set->sig[0]);
err |= __copy_to_user(&frame->sigmask, set, sizeof(*set));
if (_NSIG_WORDS > 1) {
err |= __copy_to_user(frame->extramask, &set->sig[1],
sizeof(frame->extramask));
}
if (err == 0) if (err == 0)
err = setup_return(regs, ka, frame->retcode, frame, usig); err = setup_return(regs, ka, frame->retcode, frame, usig);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment