From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfuuD-0006CU-M9 for qemu-devel@nongnu.org; Thu, 01 May 2014 13:36:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfuuC-0003MH-Sk for qemu-devel@nongnu.org; Thu, 01 May 2014 13:36:21 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfuuC-0003M5-Lm for qemu-devel@nongnu.org; Thu, 01 May 2014 13:36:20 -0400 From: Peter Maydell Date: Thu, 1 May 2014 18:36:17 +0100 Message-Id: <1398965777-7694-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] linux-user/signal.c: Set fault address in AArch64 signal info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , patches@linaro.org Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests. Signed-off-by: Peter Maydell --- This would be a candidate for stable except that it depends on the a64 system rework which added exception.vaddress. Hopefully not many guests care about the fault address information... Riku: I'm assuming you'll put this in your tree; I can put it in target-arm if you prefer, but I know you have those other pending signal.c changes... linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 7d6246f..5b8a01f 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1242,8 +1242,7 @@ static int target_setup_sigframe(struct target_rt_sigframe *sf, __put_user(env->pc, &sf->uc.tuc_mcontext.pc); __put_user(pstate_read(env), &sf->uc.tuc_mcontext.pstate); - __put_user(/*current->thread.fault_address*/ 0, - &sf->uc.tuc_mcontext.fault_address); + __put_user(env->exception.vaddress, &sf->uc.tuc_mcontext.fault_address); for (i = 0; i < TARGET_NSIG_WORDS; i++) { __put_user(set->sig[i], &sf->uc.tuc_sigmask.sig[i]); -- 1.9.2