aboutsummaryrefslogtreecommitdiff
path: root/fs/ioprio.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2015-02-23 15:13:40 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 14:40:52 -0800
commit424180f54384dd24cbd81e503d41eaa531ca0580 (patch)
treeda3dbcef97bf8db9b2344f22ecfe51d7e9095464 /fs/ioprio.c
parent09fc2667f76b53fabf9af2cc6ebd936fecfe6ffe (diff)
arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
commit 9d42d48a342aee208c1154696196497fdc556bbf upstream. The native (64-bit) sigval_t union contains sival_int (32-bit) and sival_ptr (64-bit). When a compat application invokes a syscall that takes a sigval_t value (as part of a larger structure, e.g. compat_sys_mq_notify, compat_sys_timer_create), the compat_sigval_t union is converted to the native sigval_t with sival_int overlapping with either the least or the most significant half of sival_ptr, depending on endianness. When the corresponding signal is delivered to a compat application, on big endian the current (compat_uptr_t)sival_ptr cast always returns 0 since sival_int corresponds to the top part of sival_ptr. This patch fixes copy_siginfo_to_user32() so that sival_int is copied to the compat_siginfo_t structure. Reported-by: Bamvor Jian Zhang <bamvor.zhangjian@huawei.com> Tested-by: Bamvor Jian Zhang <bamvor.zhangjian@huawei.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ioprio.c')
0 files changed, 0 insertions, 0 deletions