linux-user/signal.c: Set fault address in AArch64 signal info
PATCH 1/1 linux-user/signal.c: Set fault address in AArch64 signal info
Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests.
---
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(-)
linux-user/signal.c +1 -2
@@ -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]);
Signature · 1 line
1.9.2
Quoted 4 lines · Peter Maydell
Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests.
Signed-off-by Peter Maydell <[email protected]>
Quoted 9 lines
---
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.cchanges...
I've put in the linux-user que now, the signal.c changes didn't get any review yet,
and I want to at least submit them with better descriptions.
Riku
Quoted 25 lines
linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)linux-user/signal.c +1
-2@@ -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--
Riku Voipio