From 19a894ba777fa45c6f89ae007570311384204a69 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:09 +0400 Subject: linux-user: fixed s390x clone() argument order It was broken by 4ce6243dc6216e35b5b691078ffa856463bfa8db, where TARGET_CLONE_BACKWARDS was specified instead of TARGET_CLONE_BACKWARDS2. Signed-off-by: Pavel Zbitskiy Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/s390x/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/s390x/syscall.h b/linux-user/s390x/syscall.h index ea8c304..e5ce30b 100644 --- a/linux-user/s390x/syscall.h +++ b/linux-user/s390x/syscall.h @@ -22,4 +22,4 @@ struct target_pt_regs { #define UNAME_MACHINE "s390x" -#define TARGET_CLONE_BACKWARDS +#define TARGET_CLONE_BACKWARDS2 -- cgit v1.1 From fe54b24930f94bdfbc3d38eccd7adedf35f2f26f Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:10 +0400 Subject: linux-user: fixed getsockopt() optlen optlen parameter of getsockopt() of type socklen_t* was read into variable of type socklen_t, that caused zeroing out of upper 4 bytes when running s390x on top of x86_64. This patch changes optlen type to abi_ulong. Signed-off-by: Pavel Zbitskiy Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0ac05b8..a9ce6ba 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2406,7 +2406,7 @@ static abi_long do_socketcall(int num, abi_ulong vptr) abi_ulong level; abi_ulong optname; abi_ulong optval; - socklen_t optlen; + abi_ulong optlen; if (get_user_ual(sockfd, vptr) || get_user_ual(level, vptr + n) -- cgit v1.1 From a39ca6a124267dcfc6bc5276fff9c4b02e5c2215 Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Sat, 11 Jan 2014 13:34:11 +0400 Subject: linux-user: fixed recvfrom() addrlen addrlen parameter of recvfrom() of type socklen_t* was read into variable of type socklen_t, that caused zeroing out of upper 4 bytes when running s390x on top of x86_64. This patch changes addrlen type to abi_ulong. Signed-off-by: Pavel Zbitskiy Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a9ce6ba..bc0ac98 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2340,7 +2340,7 @@ static abi_long do_socketcall(int num, abi_ulong vptr) size_t len; abi_ulong flags; abi_ulong addr; - socklen_t addrlen; + abi_ulong addrlen; if (get_user_ual(sockfd, vptr) || get_user_ual(msg, vptr + n) -- cgit v1.1