diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-07-31 17:15:31 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-15 17:55:59 -0600 |
commit | 212a36a17efe4d696d1e3c31ebd79a9fb0cbb14b (patch) | |
tree | 943b3454aad156b37e2396ac314e6afc2d43c84c /arch/powerpc | |
parent | 56b81456f4ee048699f72edc02b369a33d1b94e6 (diff) | |
download | linux-212a36a17efe4d696d1e3c31ebd79a9fb0cbb14b.tar.bz2 |
signal: Unify and correct copy_siginfo_from_user32
The function copy_siginfo_from_user32 is used for two things, in ptrace
since the dawn of siginfo for arbirarily modifying a signal that
user space sees, and in sigqueueinfo to send a signal with arbirary
siginfo data.
Create a single copy of copy_siginfo_from_user32 that all architectures
share, and teach it to handle all of the cases in the siginfo union.
In the generic version of copy_siginfo_from_user32 ensure that all
of the fields in siginfo are initialized so that the siginfo structure
can be safely copied to userspace if necessary.
When copying the embedded sigval union copy the si_int member. That
ensures the 32bit values passes through the kernel unchanged.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 9ffd73296f64..ee62ff7b296c 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -933,15 +933,6 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *d, const siginfo_t *s) #define copy_siginfo_to_user copy_siginfo_to_user32 -int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from) -{ - if (copy_from_user(to, from, 3*sizeof(int)) || - copy_from_user(to->_sifields._pad, - from->_sifields._pad, SI_PAD_SIZE32)) - return -EFAULT; - - return 0; -} #endif /* CONFIG_PPC64 */ /* |