Dmitry V. Levin fbb77611e9 Fix compat_sys_sigpending breakage
The latest change of compat_sys_sigpending in commit 8f13621abced
("sigpending(): move compat to native") has broken it in two ways.

First, it tries to write 4 bytes more than userspace expects:
sizeof(old_sigset_t) == sizeof(long) == 8 instead of
sizeof(compat_old_sigset_t) == sizeof(u32) == 4.

Second, on big endian architectures these bytes are being written in the
wrong order.

This bug was found by strace test suite.

Reported-by: Anatoly Pugachev <matorola@gmail.com>
Inspired-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Fixes: 8f13621abced ("sigpending(): move compat to native")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-08-06 11:48:27 -07:00
..
2017-05-12 15:57:15 -07:00
2017-05-23 10:01:37 +02:00
2017-06-12 18:07:43 -04:00
2017-05-18 10:30:19 -06:00
2017-05-08 17:15:12 -07:00
2017-07-14 15:05:13 -07:00
2017-07-12 17:22:01 -07:00
2017-08-02 16:34:46 -07:00
2017-08-06 11:48:27 -07:00
2017-07-12 09:15:00 -07:00