[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/46] linux-user: wrong TARGET_SI_PAD_SIZE value for
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 20/46] linux-user: wrong TARGET_SI_PAD_SIZE value for some targets. |
Date: |
Tue, 10 Feb 2015 09:34:09 +0300 |
From: Maxim Ostapenko <address@hidden>
Fix TARGET_SI_PAD_SIZE calculation to match the way the kernel does it.
Use different TARGET_SI_PREAMBLE_SIZE for 32-bit and 64-bit targets.
Signed-off-by: Maxim Ostapenko <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
linux-user/syscall_defs.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index ebb3be1..9ed6de8 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -655,7 +655,14 @@ typedef struct {
#endif
#define TARGET_SI_MAX_SIZE 128
-#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3)
+
+#if TARGET_ABI_BITS == 32
+#define TARGET_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#else
+#define TARGET_SI_PREAMBLE_SIZE (4 * sizeof(int))
+#endif
+
+#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE - TARGET_SI_PREAMBLE_SIZE) /
sizeof(int))
typedef struct target_siginfo {
#ifdef TARGET_MIPS
--
2.1.4
- [Qemu-devel] [PULL 31/46] onenand: g_malloc() can't fail, bury dead error handling, (continued)
- [Qemu-devel] [PULL 31/46] onenand: g_malloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 27/46] util/uri: realloc2n() can't fail, drop dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 14/46] cpu-exec: drop dead assignment, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 46/46] virtio: Fix warning caused by missing 'static' attribute, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 40/46] migration: Fix warnings caused by missing 'static' attribute, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 05/46] Add/convert trace calls in pcnet-pci.c., Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 23/46] qemu-option: Pair g_malloc() with g_free(), not free(), Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 33/46] kvm: g_malloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 20/46] linux-user: wrong TARGET_SI_PAD_SIZE value for some targets.,
Michael Tokarev <=
- [Qemu-devel] [PULL 35/46] vnc: g_realloc() can't fail, bury dead error handling, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 15/46] cpu-exec: simplify icount code, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 16/46] qemu-sockets: improve error reporting in unix_listen_opts, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 44/46] stubs: Fix warning caused by missing include statement, Michael Tokarev, 2015/02/10
- [Qemu-devel] [PULL 22/46] qemu-option: Replace pointless use of g_malloc0() by g_malloc(), Michael Tokarev, 2015/02/10