[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/16] linux-user: fix ssetmask() system call
From: |
Miloš Stojanović |
Subject: |
[Qemu-devel] [PATCH 03/16] linux-user: fix ssetmask() system call |
Date: |
Fri, 12 May 2017 13:02:11 +0200 |
Fix the ssetmask() system call by removing the invocation of sigorset().
The ssetmask() system call should replace the old signal mask
with the new and return the old mask. It shouldn't combine
the old and the new mask with sigorset(). Fetching the old
mask for sigorset() is also no longer needed.
The problem was detected after running LTP test group syscalls
for the MIPS EL 32 R2 architecture where the test ssetmask01 failed
with exit code 1. The test passes now that the ssetmask() system call
is fixed.
Signed-off-by: Miloš Stojanović <address@hidden>
---
linux-user/syscall.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index cec8428..abba3d8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8592,17 +8592,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
arg1,
#ifdef TARGET_NR_ssetmask /* not on alpha */
case TARGET_NR_ssetmask:
{
- sigset_t set, oset, cur_set;
+ sigset_t set, oset;
abi_ulong target_set = arg1;
- /* We only have one word of the new mask so we must read
- * the rest of it with do_sigprocmask() and OR in this word.
- * We are guaranteed that a do_sigprocmask() that only queries
- * the signal mask will not fail.
- */
- ret = do_sigprocmask(0, NULL, &cur_set);
- assert(!ret);
target_to_host_old_sigset(&set, &target_set);
- sigorset(&set, &set, &cur_set);
ret = do_sigprocmask(SIG_SETMASK, &set, &oset);
if (!ret) {
host_to_target_old_sigset(&target_set, &oset);
--
1.9.1
- [Qemu-devel] [PATCH 00/16] Augment support for signal handling, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 07/16] linux-user: add rt_tgsigqueueinfo() strace, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 13/16] [RFC] linux-user: add functions for working with the target signal mask, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 03/16] linux-user: fix ssetmask() system call,
Miloš Stojanović <=
- [Qemu-devel] [PATCH 08/16] linux-user: fix inconsistent spaces in print_siginfo() output, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 12/16] [RFC] linux-user: fix sigismember() check, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 01/16] linux-user: add strace for getuid(), gettid(), getppid(), geteuid(), Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 10/16] [RFC] linux-user: add support for tracking the target signal mask, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 05/16] linux-user: fix argument type declaration of rt_sigqueinfo() syscall, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 02/16] linux-user: add tkill(), tgkill() and rt_sigqueueinfo() strace, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 11/16] [RFC] linux-user: add target_sigdelset() and target_sigorset(), Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 06/16] linux-user: add support for rt_tgsigqueueinfo() system call, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 04/16] linux-user: fix mismatch of lock/unlock_user() invocations in rt_sigqueinfo() syscall, Miloš Stojanović, 2017/05/12
- [Qemu-devel] [PATCH 15/16] [RFC] linux-user: add support for multiplexing larger target signals, Miloš Stojanović, 2017/05/12