]> git.baikalelectronics.ru Git - kernel.git/commit
signal: Unify and correct copy_siginfo_from_user32
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 31 Jul 2017 22:15:31 +0000 (17:15 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 15 Jan 2018 23:55:59 +0000 (17:55 -0600)
commit82f6bf4571875966ca778046531af2af1f6a4667
tree943b3454aad156b37e2396ac314e6afc2d43c84c
parent89489c0540adb938a86dd3cc2bdfd56a61c7ad4e
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>
arch/arm64/kernel/signal32.c
arch/mips/kernel/signal32.c
arch/parisc/kernel/signal32.c
arch/parisc/kernel/signal32.h
arch/powerpc/kernel/signal_32.c
arch/s390/kernel/compat_signal.c
arch/sparc/kernel/signal32.c
arch/tile/kernel/compat_signal.c
arch/x86/kernel/signal_compat.c
include/linux/compat.h
kernel/signal.c