[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2] Fix ABI incompatibility between Qemu-aarch64 and
From: |
Maxim Ostapenko |
Subject: |
[Qemu-devel] [PATCH v2] Fix ABI incompatibility between Qemu-aarch64 and Linux Kernel in signal handling. |
Date: |
Mon, 02 Feb 2015 18:18:29 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
Thanks again,
I've updated the patch. Is this correct now?
-Maxim
From 5b035df58f9f17e64b35311b6b5f55097c7f8ce1 Mon Sep 17 00:00:00 2001
From: Max Ostapenko <address@hidden>
Date: Mon, 2 Feb 2015 12:03:20 +0400
Subject: [PATCH] linux-user: wrong TARGET_SI_PAD_SIZE value for some
targets.
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>
---
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
--
1.8.5.2.2930.gf745acb
- [Qemu-devel] [PATCH v2] Fix ABI incompatibility between Qemu-aarch64 and Linux Kernel in signal handling.,
Maxim Ostapenko <=