]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/compat: correct uc_sigmask of the compat signal frame
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 8 Sep 2015 13:25:39 +0000 (15:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:14 +0000 (14:43 -0700)
commite5864e3711404b6c277cd1f69d5ebe197e4f0b95
tree77036d0e63d390100c5a5f017ec66630888f81fd
parent8210b9199f66447513b63c9a5aef988ee60c4319
s390/compat: correct uc_sigmask of the compat signal frame

commit 8d4bd0ed0439dfc780aab801a085961925ed6838 upstream.

The uc_sigmask in the ucontext structure is an array of words to keep
the 64 signal bits (or 1024 if you ask glibc but the kernel sigset_t
only has 64 bits).

For 64 bit the sigset_t contains a single 8 byte word, but for 31 bit
there are two 4 byte words. The compat signal handler code uses a
simple copy of the 64 bit sigset_t to the 31 bit compat_sigset_t.
As s390 is a big-endian architecture this is incorrect, the two words
in the 31 bit sigset_t array need to be swapped.

Reported-by: Stefan Liebler <stli@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/compat_signal.c