powerpc: switch to generic compat rt_sigaction()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
a31dd96ff7
commit
5aa1cde2ed
@ -145,6 +145,7 @@ config PPC
|
|||||||
select MODULES_USE_ELF_RELA
|
select MODULES_USE_ELF_RELA
|
||||||
select CLONE_BACKWARDS
|
select CLONE_BACKWARDS
|
||||||
select GENERIC_SIGALTSTACK
|
select GENERIC_SIGALTSTACK
|
||||||
|
select GENERIC_COMPAT_RT_SIGACTION
|
||||||
select GENERIC_COMPAT_RT_SIGQUEUEINFO
|
select GENERIC_COMPAT_RT_SIGQUEUEINFO
|
||||||
select GENERIC_COMPAT_RT_SIGPROCMASK
|
select GENERIC_COMPAT_RT_SIGPROCMASK
|
||||||
select GENERIC_COMPAT_RT_SIGPENDING
|
select GENERIC_COMPAT_RT_SIGPENDING
|
||||||
|
@ -25,15 +25,6 @@ struct __old_sigaction32 {
|
|||||||
compat_uptr_t sa_restorer; /* not used by Linux/SPARC yet */
|
compat_uptr_t sa_restorer; /* not used by Linux/SPARC yet */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct sigaction32 {
|
|
||||||
compat_uptr_t sa_handler; /* Really a pointer, but need to deal with 32 bits */
|
|
||||||
unsigned int sa_flags;
|
|
||||||
compat_uptr_t sa_restorer; /* Another 32 bit pointer */
|
|
||||||
compat_sigset_t sa_mask; /* A 32 bit mask */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct pt_regs32 {
|
struct pt_regs32 {
|
||||||
unsigned int gpr[32];
|
unsigned int gpr[32];
|
||||||
unsigned int nip;
|
unsigned int nip;
|
||||||
|
@ -579,36 +579,6 @@ static long restore_user_regs(struct pt_regs *regs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act,
|
|
||||||
struct sigaction32 __user *oact, size_t sigsetsize)
|
|
||||||
{
|
|
||||||
struct k_sigaction new_ka, old_ka;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* XXX: Don't preclude handling different sized sigset_t's. */
|
|
||||||
if (sigsetsize != sizeof(compat_sigset_t))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (act) {
|
|
||||||
compat_uptr_t handler;
|
|
||||||
|
|
||||||
ret = get_user(handler, &act->sa_handler);
|
|
||||||
new_ka.sa.sa_handler = compat_ptr(handler);
|
|
||||||
ret |= get_sigset_t(&new_ka.sa.sa_mask, &act->sa_mask);
|
|
||||||
ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
|
|
||||||
if (ret)
|
|
||||||
return -EFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
|
|
||||||
if (!ret && oact) {
|
|
||||||
ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler);
|
|
||||||
ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask);
|
|
||||||
ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s)
|
int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
Loading…
Reference in New Issue
Block a user