qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target/ppc: fix signal delivery for ppc64abi32
@ 2019-09-11  9:39 Alex Bennée
  2019-09-11 14:33 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bennée @ 2019-09-11  9:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Riku Voipio, richard.henderson, Laurent Vivier, qemu-ppc,
	Alex Bennée, rth

We were incorrectly setting NIP resulting in a segfault. This fixes
linux-test for this ABI.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 linux-user/ppc/signal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
index 619a56950df..5b82af6cb62 100644
--- a/linux-user/ppc/signal.c
+++ b/linux-user/ppc/signal.c
@@ -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 =
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] target/ppc: fix signal delivery for ppc64abi32
  2019-09-11  9:39 [Qemu-devel] [PATCH] target/ppc: fix signal delivery for ppc64abi32 Alex Bennée
@ 2019-09-11 14:33 ` Richard Henderson
  2019-09-16  1:48   ` [Qemu-devel] [Qemu-ppc] " David Gibson
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2019-09-11 14:33 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: Riku Voipio, qemu-ppc, Laurent Vivier, rth

On 9/11/19 5:39 AM, Alex Bennée wrote:
> 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.

?

> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  linux-user/ppc/signal.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Anyway,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: fix signal delivery for ppc64abi32
  2019-09-11 14:33 ` Richard Henderson
@ 2019-09-16  1:48   ` David Gibson
  2019-09-16  7:22     ` Alex Bennée
  0 siblings, 1 reply; 5+ messages in thread
From: David Gibson @ 2019-09-16  1:48 UTC (permalink / raw)
  To: Richard Henderson
  Cc: qemu-ppc, Riku Voipio, Alex Bennée, qemu-devel, rth

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

On Wed, Sep 11, 2019 at 10:33:45AM -0400, Richard Henderson wrote:
> On 9/11/19 5:39 AM, Alex Bennée wrote:
> > 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.

> 
> ?
> 
> > 
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > ---
> >  linux-user/ppc/signal.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Anyway,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> 

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: fix signal delivery for ppc64abi32
  2019-09-16  1:48   ` [Qemu-devel] [Qemu-ppc] " David Gibson
@ 2019-09-16  7:22     ` Alex Bennée
  2019-09-17  2:03       ` David Gibson
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bennée @ 2019-09-16  7:22 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Riku Voipio, Richard Henderson, qemu-devel, rth


David Gibson <david@gibson.dropbear.id.au> writes:

> On Wed, Sep 11, 2019 at 10:33:45AM -0400, Richard Henderson wrote:
>> On 9/11/19 5:39 AM, Alex Bennée wrote:
>> > 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.

Should you be added to linux-user/ppc/ in MAINTAINERS?

>
>>
>> ?
>>
>> >
>> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> > ---
>> >  linux-user/ppc/signal.c | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> Anyway,
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>


--
Alex Bennée


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc: fix signal delivery for ppc64abi32
  2019-09-16  7:22     ` Alex Bennée
@ 2019-09-17  2:03       ` David Gibson
  0 siblings, 0 replies; 5+ messages in thread
From: David Gibson @ 2019-09-17  2:03 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-ppc, Riku Voipio, Richard Henderson, qemu-devel, rth

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

On Mon, Sep 16, 2019 at 08:22:42AM +0100, Alex Bennée wrote:
> 
> David Gibson <david@gibson.dropbear.id.au> writes:
> 
> > On Wed, Sep 11, 2019 at 10:33:45AM -0400, Richard Henderson wrote:
> >> On 9/11/19 5:39 AM, Alex Bennée wrote:
> >> > 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.
> 
> 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.


> 
> >
> >>
> >> ?
> >>
> >> >
> >> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >> > ---
> >> >  linux-user/ppc/signal.c | 4 +++-
> >> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> Anyway,
> >> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> >>
> 
> 

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-17  2:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-11  9:39 [Qemu-devel] [PATCH] target/ppc: fix signal delivery for ppc64abi32 Alex Bennée
2019-09-11 14:33 ` Richard Henderson
2019-09-16  1:48   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2019-09-16  7:22     ` Alex Bennée
2019-09-17  2:03       ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).