[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 19/24] linux-user: fix x86_64 safe_syscall
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL v2 19/24] linux-user: fix x86_64 safe_syscall |
Date: |
Tue, 28 Jun 2016 22:12:53 +0300 |
From: Richard Henderson <address@hidden>
Do what the comment says, test for signal_pending non-zero,
rather than the current code which tests for bit 0 non-zero.
Signed-off-by: Richard Henderson <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
linux-user/host/x86_64/safe-syscall.inc.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux-user/host/x86_64/safe-syscall.inc.S
b/linux-user/host/x86_64/safe-syscall.inc.S
index e09368d..f36992d 100644
--- a/linux-user/host/x86_64/safe-syscall.inc.S
+++ b/linux-user/host/x86_64/safe-syscall.inc.S
@@ -67,8 +67,8 @@ safe_syscall_base:
*/
safe_syscall_start:
/* if signal_pending is non-zero, don't do the call */
- testl $1, (%rbp)
- jnz return_ERESTARTSYS
+ cmpl $0, (%rbp)
+ jnz 1f
syscall
safe_syscall_end:
/* code path for having successfully executed the syscall */
@@ -78,7 +78,7 @@ safe_syscall_end:
.cfi_restore rbp
ret
-return_ERESTARTSYS:
+1:
/* code path when we didn't execute the syscall */
.cfi_restore_state
mov $-TARGET_ERESTARTSYS, %rax
--
2.1.4
- [Qemu-devel] [PULL v2 15/24] linux-user: update get_thread_area/set_thread_area strace, (continued)
- [Qemu-devel] [PULL v2 15/24] linux-user: update get_thread_area/set_thread_area strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 14/24] linux-user: fix clone() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 12/24] linux-user: add socketcall() strace, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 17/24] linux-user: fd_trans_host_to_target_data() must process only received data, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 18/24] linux-user: don't swap NLMSG_DATA() fields, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 16/24] linux-user: add missing return in netlink switch statement, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 21/24] linux-user: Provide safe_syscall for arm, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 20/24] linux-user: Provide safe_syscall for i386, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 22/24] linux-user: Provide safe_syscall for aarch64, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 24/24] linux-user: Provide safe_syscall for ppc64, riku . voipio, 2016/06/28
- [Qemu-devel] [PULL v2 19/24] linux-user: fix x86_64 safe_syscall,
riku . voipio <=
- [Qemu-devel] [PULL v2 23/24] linux-user: Provide safe_syscall for s390x, riku . voipio, 2016/06/28
- Re: [Qemu-devel] [PULL v2 00/24] linux-user changes for v2.7, Peter Maydell, 2016/06/29