qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] Use frame->retcode instead of frame address for alpha target restorer
@ 2016-03-30 15:42 chengang
  2016-03-30 16:08 ` Richard Henderson
  2016-03-30 16:09 ` Laurent Vivier
  0 siblings, 2 replies; 5+ messages in thread
From: chengang @ 2016-03-30 15:42 UTC (permalink / raw)
  To: rth, peter.maydell, cmetcalf, laurent
  Cc: Chen Gang, riku.voipio, qemu-devel, Chen Gang

From: Chen Gang <chengang@emindsoft.com.cn>

The restorer needs the return code address which is frame->retcode, not
frame itself.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 linux-user/signal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index e487f9e..34367ce 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5396,7 +5396,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
                    &frame->retcode[1]);
         __put_user(INSN_CALLSYS, &frame->retcode[2]);
         /* imb() */
-        r26 = frame_addr;
+        r26 = frame_addr + offsetof(struct target_sigframe, retcode);
     }
 
     unlock_user_struct(frame, frame_addr, 1);
@@ -5455,7 +5455,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
                    &frame->retcode[1]);
         __put_user(INSN_CALLSYS, &frame->retcode[2]);
         /* imb(); */
-        r26 = frame_addr;
+        r26 = frame_addr + offsetof(struct target_rt_sigframe, retcode);
     }
 
     if (err) {
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-17  9:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 15:42 [Qemu-devel] [PATCH v2] Use frame->retcode instead of frame address for alpha target restorer chengang
2016-03-30 16:08 ` Richard Henderson
2016-03-30 16:09 ` Laurent Vivier
2016-03-31 13:57   ` Chen Gang
2016-04-17  9:32     ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).