target/ppc: fix signal delivery for ppc64abi32
PATCH 1/1 target/ppc: fix signal delivery for ppc64abi32
We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI.
--- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
linux-user/ppc/signal.c +3 -1
@@ -501,7 +501,9 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,int i, err =0 ;#if defined(TARGET_PPC64 )struct target_sigcontext *sc =0 ; +#if !defined(TARGET_ABI32 )struct image_info *image = ((TaskState *)thread_cpu->opaque)->info; +#endif #endif rt_sf_addr =get_sigframe (ka, env,sizeof (*rt_sf));
@@ -557,7 +559,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, env->gpr[5 ] = (target_ulong )h2g (&rt_sf->uc); env->gpr[6 ] = (target_ulong )h2g (rt_sf); -#if defined(TARGET_PPC64 ) +#if defined(TARGET_PPC64 ) && !defined(TARGET_ABI32 )if (get_ppc64_abi (image) <2 ) {/* ELFv1 PPC64 function pointers are pointers to OPD entries. */ struct target_func_ptr *handler =
Signature · 1 line
2.20.1
Quoted 2 lines · Alex Bennée
We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI.
Perhaps better:
We were incorrectly using the 64-bit AIX ABI instead of the 32-bit SYSV ABI for setting NIP for the signal handler.
?
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Anyway,
David Gibson
AppliedQuoted 7 lines · Richard Henderson
Quoted 2 lines · Alex Bennée
We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI.
Perhaps better:
We were incorrectly using the 64-bit AIX ABI instead of the 32-bit SYSV ABI for setting NIP for the signal handler.
Applied to ppc-for-4.2, with Richard's updated description.
For future reference, it's better to directly CC me on such patches. I only barely keep on top of the mailing lists, so if you just send it there it's likely to be some time before I pick it up, or even get lost entirely.
Quoted 12 lines
?
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Anyway,
Reviewed-by Richard Henderson <[email protected]>
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 9 lines · David Gibson
Quoted 7 lines · Richard Henderson
Quoted 2 lines · Alex Bennée
We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI.
Perhaps better:
We were incorrectly using the 64-bit AIX ABI instead of the 32-bit SYSV ABI for setting NIP for the signal handler.
Quoted 6 lines
Applied to ppc-for-4.2, with Richard's updated description.
For future reference, it's better to directly CC me on such patches. I only barely keep on top of the mailing lists, so if you just send it there it's likely to be some time before I pick it up, or even get lost entirely.
Should you be added to linux-user/ppc/ in MAINTAINERS?
Quoted 5 lines
Quoted 5 lines
?
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Signed-off-by Alex Bennée <[email protected]>--- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Anyway,
Reviewed-by Richard Henderson <[email protected]>
--
Alex Bennée
Quoted 12 lines · Alex Bennée
Quoted 9 lines · David Gibson
Quoted 7 lines · Richard Henderson
Quoted 2 lines · Alex Bennée
We were incorrectly setting NIP resulting in a segfault. This fixes linux-test for this ABI.
Perhaps better:
We were incorrectly using the 64-bit AIX ABI instead of the 32-bit SYSV ABI for setting NIP for the signal handler.
Quoted 8 lines
Quoted 6 lines
Applied to ppc-for-4.2, with Richard's updated description.
For future reference, it's better to directly CC me on such patches. I only barely keep on top of the mailing lists, so if you just send it there it's likely to be some time before I pick it up, or even get lost entirely.
Should you be added to linux-user/ppc/ in
MAINTAINERS?
Hm, maybe. It's not like I know much about the stuff in there, but it's also not like anyone else is paying any attention to it.
Quoted 16 lines
Quoted 14 lines
Quoted 14 lines
?
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Anyway,
Reviewed-by Richard Henderson <[email protected]>
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson