[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/19] linux-user: Fix sa_flags byte swaps for mips
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 19/19] linux-user: Fix sa_flags byte swaps for mips |
Date: |
Fri, 3 Feb 2012 16:49:32 +0200 |
From: Andreas Färber <address@hidden>
sa_flags is uint32_t for mips{,n32,64}, so don't use tswapal().
edited by Riku Voipio: likewise on alpha
Reported-by: Khansa Butt <address@hidden>
Suggested-by: Richard Henderson <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Cc: Ehsan Ul Haq <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/signal.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index ded12ca..79a39dc 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -587,7 +587,11 @@ int do_sigaction(int sig, const struct target_sigaction
*act,
#endif
if (oact) {
oact->_sa_handler = tswapal(k->_sa_handler);
+#if defined(TARGET_MIPS) || defined (TARGET_ALPHA)
+ oact->sa_flags = bswap32(k->sa_flags);
+#else
oact->sa_flags = tswapal(k->sa_flags);
+#endif
#if !defined(TARGET_MIPS)
oact->sa_restorer = tswapal(k->sa_restorer);
#endif
@@ -596,7 +600,11 @@ int do_sigaction(int sig, const struct target_sigaction
*act,
if (act) {
/* FIXME: This is not threadsafe. */
k->_sa_handler = tswapal(act->_sa_handler);
+#if defined(TARGET_MIPS) || defined (TARGET_ALPHA)
+ k->sa_flags = bswap32(act->sa_flags);
+#else
k->sa_flags = tswapal(act->sa_flags);
+#endif
#if !defined(TARGET_MIPS)
k->sa_restorer = tswapal(act->sa_restorer);
#endif
--
1.7.5.4
- [Qemu-devel] [PULL] [PATCH 00/19] linux-user update, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 15/19] linux-user: Add default-configs for mipsn32[el], riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 02/19] linux-user: save auxv length, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 17/19] linux-user: Define TARGET_QEMU_ESIGRETURN for mipsn32, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 19/19] linux-user: Fix sa_flags byte swaps for mips,
riku . voipio <=
- [Qemu-devel] [PATCH 01/19] linux-user: stack_base is now mandatory on all targets, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 06/19] linux-user: fake /proc/self/auxv, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 16/19] linux-user: Add default configs for mips64[el], riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 03/19] linux-user: add open() hijack infrastructure, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 07/19] linux-user/main.c: Add option to user-mode emulation so that user can specify log file name, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 05/19] linux-user: fake /proc/self/stat, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 08/19] linux-user: add SO_PEERCRED support for getsockopt, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 11/19] linux-user: fix wait* syscall status returns, riku . voipio, 2012/02/03
- [Qemu-devel] [PATCH 13/19] linux-user/syscall.c: Implement f and l versions of set/get/removexattr, riku . voipio, 2012/02/03