diff options
author | James Morse <james.morse@arm.com> | 2017-06-29 17:26:37 +0100 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-05-29 17:52:50 +0200 |
commit | 87abf0fd22e18699505977f3af98606b4ef7481e (patch) | |
tree | 2ae1c22c025a9649ab6a1351813b53e42ca9d4aa /arch/unicore32/Kconfig | |
parent | a61894742ffa62a140938686340f848ea2522ca5 (diff) |
ptrace: Add compat PTRACE_{G,S}ETSIGMASK handlers
compat_ptrace_request() lacks handlers for PTRACE_{G,S}ETSIGMASK,
instead using those in ptrace_request(). The compat variant should
read a compat_sigset_t from userspace instead of ptrace_request()s
sigset_t.
While compat_sigset_t is the same size as sigset_t, it is defined as
2xu32, instead of a single u64. On a big-endian CPU this means that
compat_sigset_t is passed to user-space using middle-endianness,
where the least-significant u32 is written most significant byte
first.
If ptrace_request()s code is used userspace will read the most
significant u32 where it expected the least significant.
Instead of duplicating ptrace_request()s code as a special case in
the arch code, handle it here.
Fixes: 29000caecbe87 ("ptrace: add ability to get/set signal-blocked mask")
CC: Andrey Vagin <avagin@openvz.org>
Reported-by: Zhou Chengming <zhouchengming1@huawei.com>
Signed-off-by: James Morse <james.morse@arm.com>
Yury:
Replace sigset_{to,from}_compat() with new {get,put}_compat_sigset()
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Diffstat (limited to 'arch/unicore32/Kconfig')
0 files changed, 0 insertions, 0 deletions