qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user/signal.c: Use target address instead of host address for microblaze restorer
@ 2016-03-29 14:13 chengang
  2016-05-04 16:05 ` Peter Maydell
  2016-05-04 17:46 ` Laurent Vivier
  0 siblings, 2 replies; 6+ messages in thread
From: chengang @ 2016-03-29 14:13 UTC (permalink / raw)
  To: rth, peter.maydell, cmetcalf, laurent, edgar.iglesias
  Cc: walt, Chen Gang, riku.voipio, qemu-devel, Chen Gang

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

The return address is in target space, so the restorer address needs to
be target space, too.

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

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 4157154..c0a6f7e 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -3532,7 +3532,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
 
         /* Return from sighandler will jump to the tramp.
            Negative 8 offset because return is rtsd r15, 8 */
-        env->regs[15] = ((unsigned long)frame->tramp) - 8;
+        env->regs[15] = frame_addr + offsetof(struct target_signal_frame, tramp)
+                                   - 8;
     }
 
     /* Set up registers for signal handler */
-- 
1.9.3

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

end of thread, other threads:[~2016-05-14  3:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29 14:13 [Qemu-devel] [PATCH] linux-user/signal.c: Use target address instead of host address for microblaze restorer chengang
2016-05-04 16:05 ` Peter Maydell
2016-05-05 14:48   ` Chen Gang
2016-05-05 16:11     ` Edgar E. Iglesias
2016-05-14  3:19       ` Chen Gang
2016-05-04 17:46 ` Laurent Vivier

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).