Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-16 Thread Richard Henderson
On 5/16/20 5:58 AM, Peter Maydell wrote: > On Sat, 16 May 2020 at 05:12, Richard Henderson > wrote: >> >> On 5/15/20 2:25 PM, Peter Maydell wrote: You also need to call arm_rebuild_hflags() after modifying CPSR_E otherwise the change doesn't take effect. >>> >>> Hmm. I was expecting cpsr

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-16 Thread Peter Maydell
On Sat, 16 May 2020 at 05:12, Richard Henderson wrote: > > On 5/15/20 2:25 PM, Peter Maydell wrote: > >> You also need to call arm_rebuild_hflags() after modifying CPSR_E > >> otherwise the change doesn't take effect. > > > > Hmm. I was expecting cpsr_write() to take care of that if we > > updated

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-15 Thread Richard Henderson
On 5/15/20 2:25 PM, Peter Maydell wrote: >> You also need to call arm_rebuild_hflags() after modifying CPSR_E >> otherwise the change doesn't take effect. > > Hmm. I was expecting cpsr_write() to take care of that if we > updated a cpsr flag that was in the hflags, but it looks like > the rebuild_

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-15 Thread Peter Maydell
On Fri, 15 May 2020 at 21:41, Amanieu d'Antras wrote: > On Fri, May 15, 2020 at 7:34 PM Peter Maydell > wrote: > > I was just looking at the signal code's handling of CPSR for a different > > reason, and I noticed that at the moment we don't allow CPSR.E to be > > updated from the signal frame w

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-15 Thread Amanieu d'Antras
On Fri, May 15, 2020 at 7:34 PM Peter Maydell wrote: > > On Thu, 7 May 2020 at 21:25, Amanieu d'Antras wrote: > > > > This fixes signal handlers running with the wrong endianness if the > > interrupted code used SETEND to dynamically switch endianness. > > > > Signed-off-by: Amanieu d'Antras > >

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-15 Thread Peter Maydell
On Thu, 7 May 2020 at 21:25, Amanieu d'Antras wrote: > > This fixes signal handlers running with the wrong endianness if the > interrupted code used SETEND to dynamically switch endianness. > > Signed-off-by: Amanieu d'Antras > --- > linux-user/arm/signal.c | 9 - > 1 file changed, 8 ins

Re: [PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-11 Thread Peter Maydell
On Thu, 7 May 2020 at 21:25, Amanieu d'Antras wrote: > > This fixes signal handlers running with the wrong endianness if the > interrupted code used SETEND to dynamically switch endianness. > > Signed-off-by: Amanieu d'Antras > --- > linux-user/arm/signal.c | 9 - > 1 file changed, 8 ins

[PATCH] linux-user/arm: Reset CPSR_E when entering a signal handler

2020-05-07 Thread Amanieu d'Antras
This fixes signal handlers running with the wrong endianness if the interrupted code used SETEND to dynamically switch endianness. Signed-off-by: Amanieu d'Antras --- linux-user/arm/signal.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-user/arm/signal.c b/lin