linux/arch/arm64
Catalin Marinas 676b72e20d arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
commit 9d42d48a34 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>
History 2015-03-06 14:43:31 -08:00
..
boot arm64: dts: Reduce size of virtio block device for foundation model 2013-12-20 16:20:21 +00:00
configs arm64: defconfig: Expand default enabled features 2014-02-07 17:17:28 +00:00
include arm64: Fix up /proc/cpuinfo 2015-02-11 14:54:48 +08:00
kernel arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian 2015-03-06 14:43:31 -08:00
kvm ARM/ARM64: KVM: Nuke Hyp-mode tlbs before enabling MMU 2014-10-05 14:52:10 -07:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-21 09:23:02 -08:00
mm arm64: mm: Make icache synchronisation logic huge page aware 2014-07-09 11:18:26 -07:00
xen xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
Kconfig locking/mutex: Disable optimistic spinning on some architectures 2014-07-28 08:06:03 -07:00
Kconfig.debug arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
Makefile arm64: big-endian: add big-endian support to top-level arch Makefile 2013-10-25 15:59:31 +01:00