From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akugj-00066V-GN for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akugf-0003Ww-8V for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:32:09 -0400 Received: from out114-136.biz.mail.alibaba.com ([205.204.114.136]:49678 helo=out21.biz.mail.alibaba.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuge-0003Wm-QX for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:32:05 -0400 Message-ID: <56FA92E1.1070703@emindsoft.com.cn> Date: Tue, 29 Mar 2016 22:36:17 +0800 From: Chen Gang MIME-Version: 1.0 References: <1459260105-5536-1-git-send-email-chengang@emindsoft.com.cn> <56FA9049.3090803@vivier.eu> In-Reply-To: <56FA9049.3090803@vivier.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] linux-user/signal.c: Use frame->retcode instead of frame address for alpha target restorer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , rth@twiddle.net, peter.maydell@linaro.org, cmetcalf@ezchip.com Cc: walt@tilera.com, riku.voipio@iki.fi, qemu-devel@nongnu.org, Chen Gang On 3/29/16 22:25, Laurent Vivier wrote: > Le 29/03/2016 16:01, chengang@emindsoft.com.cn a écrit : >> The restorer needs the return code address which is frame->retcode, not >> frame itself. >> >> Signed-off-by: Chen Gang >> --- >> linux-user/signal.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/linux-user/signal.c b/linux-user/signal.c >> index e487f9e..4157154 100644 >> --- a/linux-user/signal.c >> +++ b/linux-user/signal.c >> @@ -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) { >> > > If you change setup_rt_frame(), you must update setup_frame() too. > Oh, yes, thanks. > It seems correct. > > Richard, as you have written the original code, could you check this is > correct? > Please give a check when you have time. Thanks. -- Chen Gang (陈刚) Managing Natural Environments is the Duty of Human Beings.