[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user/signal.c: Use frame->retcode instead
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user/signal.c: Use frame->retcode instead of frame address for alpha target restorer |
Date: |
Tue, 29 Mar 2016 16:25:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Le 29/03/2016 16:01, address@hidden a écrit :
> From: Chen Gang <address@hidden>
>
> The restorer needs the return code address which is frame->retcode, not
> frame itself.
>
> Signed-off-by: Chen Gang <address@hidden>
> ---
> 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.
It seems correct.
Richard, as you have written the original code, could you check this is
correct?
Laurent