bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] fix address fault for 32-on-64-bit syscall


From: Luca Dariz
Subject: [PATCH 1/5] fix address fault for 32-on-64-bit syscall
Date: Wed, 19 Apr 2023 21:46:59 +0200

* x86_64/locore.S: the faulty address is found in %rbp and not in
  %rsi, so copy that in CR2
---
 x86_64/locore.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86_64/locore.S b/x86_64/locore.S
index 47d9085c..ea5c71d6 100644
--- a/x86_64/locore.S
+++ b/x86_64/locore.S
@@ -1213,7 +1213,7 @@ mach_call_call:
 mach_call_addr_push:
        movq    %r11,%rsp               /* clean parameters from stack */
 mach_call_addr:
-       movq    %rsi,R_CR2(%rbx)        /* set fault address */
+       movq    %rbp,R_CR2(%rbx)        /* set fault address */
        movq    $(T_PAGE_FAULT),R_TRAPNO(%rbx)
                                        /* set page-fault trap */
        movq    $(T_PF_USER),R_ERR(%rbx)
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]