Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Laurent Vivier
Le 24/03/2021 à 15:14, Andreas Krebbel a écrit : > On 3/24/21 2:06 PM, Laurent Vivier wrote: >> Le 24/03/2021 à 12:26, Andreas Krebbel a écrit : >>> On 3/24/21 11:28 AM, Laurent Vivier wrote: Le 24/03/2021 à 10:17, David Hildenbrand a écrit : > On 24.03.21 09:51, Andreas Krebbel wrote: >>>

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Richard Henderson
On 3/24/21 8:14 AM, Andreas Krebbel wrote: The part I actually needed to fix was in setup_rt_frame and there the fix is correct I think since here we do use 'frame' which is the host address. While doing that change I also stumbled upon the other location in setup_frame. There it is using fram

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Andreas Krebbel
On 3/24/21 2:06 PM, Laurent Vivier wrote: > Le 24/03/2021 à 12:26, Andreas Krebbel a écrit : >> On 3/24/21 11:28 AM, Laurent Vivier wrote: >>> Le 24/03/2021 à 10:17, David Hildenbrand a écrit : On 24.03.21 09:51, Andreas Krebbel wrote: > The sigreturn SVC is put onto the stack by the emula

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Laurent Vivier
Le 24/03/2021 à 12:26, Andreas Krebbel a écrit : > On 3/24/21 11:28 AM, Laurent Vivier wrote: >> Le 24/03/2021 à 10:17, David Hildenbrand a écrit : >>> On 24.03.21 09:51, Andreas Krebbel wrote: The sigreturn SVC is put onto the stack by the emulation code.  Hence the address of it should

[PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Andreas Krebbel
The sigreturn SVC is put onto the stack by the emulation code. Hence the address of it should not be subject to guest_base transformation when fetching it. The fix applies h2g to the address when writing it into the return address register to nullify the transformation applied to it later. Note:

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Andreas Krebbel
On 3/24/21 11:28 AM, Laurent Vivier wrote: > Le 24/03/2021 à 10:17, David Hildenbrand a écrit : >> On 24.03.21 09:51, Andreas Krebbel wrote: >>> The sigreturn SVC is put onto the stack by the emulation code.  Hence >>> the address of it should not be subject to guest_base transformation >>> when fe

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread Laurent Vivier
Le 24/03/2021 à 10:17, David Hildenbrand a écrit : > On 24.03.21 09:51, Andreas Krebbel wrote: >> The sigreturn SVC is put onto the stack by the emulation code.  Hence >> the address of it should not be subject to guest_base transformation >> when fetching it. >> >> The fix applies h2g to the addre

Re: [PATCH 1/1] linux-user/s390x: Apply h2g to address of sigreturn stub

2021-03-24 Thread David Hildenbrand
On 24.03.21 09:51, Andreas Krebbel wrote: The sigreturn SVC is put onto the stack by the emulation code. Hence the address of it should not be subject to guest_base transformation when fetching it. The fix applies h2g to the address when writing it into the return address register to nullify th