diff mbox series

[4/4] hurd: Fix computing user stack pointer

Message ID 20230515083323.1358039-5-bugaevc@gmail.com
State New
Headers show
Series x86_64-gnu signal fixes | expand

Commit Message

Sergey Bugaev May 15, 2023, 8:33 a.m. UTC
Fixes b574ae0a2876ee94e4fe617f878407bf818c2df0
"hurd: Implement sigreturn for x86_64"

Checked on x86_64-gnu.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/x86_64/sigreturn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Samuel Thibault May 15, 2023, 4:29 p.m. UTC | #1
Applied, thanks!

Sergey Bugaev, le lun. 15 mai 2023 11:33:23 +0300, a ecrit:
> Fixes b574ae0a2876ee94e4fe617f878407bf818c2df0
> "hurd: Implement sigreturn for x86_64"
> 
> Checked on x86_64-gnu.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/x86_64/sigreturn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sysdeps/mach/hurd/x86_64/sigreturn.c b/sysdeps/mach/hurd/x86_64/sigreturn.c
> index 82247e3c..5d3a4d31 100644
> --- a/sysdeps/mach/hurd/x86_64/sigreturn.c
> +++ b/sysdeps/mach/hurd/x86_64/sigreturn.c
> @@ -126,7 +126,7 @@ __sigreturn (struct sigcontext *scp)
>         copy the registers onto the user's stack, switch there, pop and
>         return.  */
>  
> -    uintptr_t *usp = (uintptr_t *) scp->sc_ursp - 128;
> +    uintptr_t *usp = (uintptr_t *) (scp->sc_ursp - 128);
>  
>      *--usp = scp->sc_rip;
>      *--usp = scp->sc_rfl;
> -- 
> 2.40.1
> 
>
diff mbox series

Patch

diff --git a/sysdeps/mach/hurd/x86_64/sigreturn.c b/sysdeps/mach/hurd/x86_64/sigreturn.c
index 82247e3c..5d3a4d31 100644
--- a/sysdeps/mach/hurd/x86_64/sigreturn.c
+++ b/sysdeps/mach/hurd/x86_64/sigreturn.c
@@ -126,7 +126,7 @@  __sigreturn (struct sigcontext *scp)
        copy the registers onto the user's stack, switch there, pop and
        return.  */
 
-    uintptr_t *usp = (uintptr_t *) scp->sc_ursp - 128;
+    uintptr_t *usp = (uintptr_t *) (scp->sc_ursp - 128);
 
     *--usp = scp->sc_rip;
     *--usp = scp->sc_rfl;