diff mbox

Fix ABI incompatibility between Qemu-aarch64 and Linux Kernel in signal handling.

Message ID 54CF811A.1020405@partner.samsung.com
State New
Headers show

Commit Message

max Feb. 2, 2015, 1:52 p.m. UTC
Peter,

thank you for review and sorry for sign. I've updated the patch, is it 
ok now?

 From 5b035df58f9f17e64b35311b6b5f55097c7f8ce1 Mon Sep 17 00:00:00 2001
From: Max Ostapenko <m.ostapenko@partner.samsung.com>
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 for S390X, SPARC, ALPHA and AARCH64 according to
Linux Kernel 3.19 c59c961ca511dc7ee2f4f7e9c224d16f5c76ca6e revision.
---
  linux-user/syscall_defs.h | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

  #ifdef TARGET_MIPS

Comments

Peter Maydell Feb. 2, 2015, 2:56 p.m. UTC | #1
On 2 February 2015 at 13:52, Maxim Ostapenko
<m.ostapenko@partner.samsung.com> wrote:
> Peter,
>
> thank you for review and sorry for sign. I've updated the patch, is it ok
> now?

The code looks ok, but...

> From 5b035df58f9f17e64b35311b6b5f55097c7f8ce1 Mon Sep 17 00:00:00 2001
> From: Max Ostapenko <m.ostapenko@partner.samsung.com>
> 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 for S390X, SPARC, ALPHA and AARCH64 according to
> Linux Kernel 3.19 c59c961ca511dc7ee2f4f7e9c224d16f5c76ca6e revision.

Your signed-off-by line should go here, in the commit message
(one blank line, then the signoff; look at other commits in
git to see how this should look).

Also that part about s390x/sparc/alpha/aarch64 in the commit
message isn't accurate now the code has changed.

It's also best to send new versions of a patch as complete
new emails, not as followups to the previous one. That way
automated tools for tracking and downloading patches from
the mailing list will function correctly.

thanks
-- PMM
diff mbox

Patch

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 {