[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/24] linux-user: Make ipc syscall's third argument
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 14/24] linux-user: Make ipc syscall's third argument an abi_long |
Date: |
Fri, 15 Aug 2014 14:01:32 +0300 |
From: Tom Musta <address@hidden>
For those target ABIs that use the ipc system call (e.g. POWER),
the third argument is used in the shmat path as a pointer. It
therefore must be declared as an abi_long (versus int) so that
the address bits are not lost in truncation. In fact, all arguments
to do_ipc should be declared as abit_long.
In fact, it makes more sense for all of the arguments to be declaried
as abi_long (except call).
Signed-off-by: Tom Musta <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ba9dfc5..db40829 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3130,8 +3130,8 @@ static inline abi_long do_shmdt(abi_ulong shmaddr)
#ifdef TARGET_NR_ipc
/* ??? This only works with linear mappings. */
/* do_ipc() must return target values and target errnos. */
-static abi_long do_ipc(unsigned int call, int first,
- int second, int third,
+static abi_long do_ipc(unsigned int call, abi_long first,
+ abi_long second, abi_long third,
abi_long ptr, abi_long fifth)
{
int version;
@@ -3153,9 +3153,9 @@ static abi_long do_ipc(unsigned int call, int first,
/* The semun argument to semctl is passed by value, so dereference the
* ptr argument. */
abi_ulong atptr;
- get_user_ual(atptr, (abi_ulong)ptr);
+ get_user_ual(atptr, ptr);
ret = do_semctl(first, second, third,
- (union target_semun)(abi_ulong) atptr);
+ (union target_semun) atptr);
break;
}
--
2.0.1
- [Qemu-devel] [PULL 00/24] Linux-user updates, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 02/24] linux-user: redirect openat calls, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 09/24] linux-user: support {name_to, open_by}_handle_at syscalls, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 06/24] linux-user: fix readlink handling with magic exe symlink, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 16/24] linux-user: Detect Negative Message Sizes in msgsnd System Call, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 07/24] linux-user: support timerfd_{create, gettime, settime} syscalls, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 11/24] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 13/24] linux-user: Properly Handle semun Structure In Cross-Endian Situations, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 17/24] linux-user: Handle NULL sched_param argument to sched_*, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 05/24] linux-user: Fix conversion of sigevent argument to timer_create, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 14/24] linux-user: Make ipc syscall's third argument an abi_long,
riku . voipio <=
- [Qemu-devel] [PULL 03/24] linux-user: make binfmt flag O require P, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 10/24] linux-user: add setns and unshare, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 08/24] linux-user: support ioprio_{get, set} syscalls, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 12/24] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 15/24] linux-user: Conditionally Pass Attribute Pointer to mq_open(), riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 24/24] linux-user: check return value of malloc(), riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 23/24] linux-user: writev Partial Writes, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 18/24] linux-user: Detect fault in sched_rr_get_interval, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 04/24] linux-user: Fix syscall instruction usermode emulation on X86_64, riku . voipio, 2014/08/15
- [Qemu-devel] [PULL 01/24] linux-user: /proc/self/maps content, riku . voipio, 2014/08/15