From 6b6d49a71f016a4ea60c4ae63af8dfd8c76f55ba Mon Sep 17 00:00:00 2001 From: Luca Dariz Date: Wed, 19 Apr 2023 21:46:59 +0200 Subject: fix address fault for 32-on-64-bit syscall * x86_64/locore.S: the faulty address is found in %rbp and not in %rsi, so copy that in CR2 Message-Id: <20230419194703.410575-1-luca@orpolo.org> --- x86_64/locore.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86_64/locore.S b/x86_64/locore.S index 47d9085c..bffdea63 100644 --- a/x86_64/locore.S +++ b/x86_64/locore.S @@ -1208,12 +1208,12 @@ mach_call_call: /* * Address out of range. Change to page fault. - * %rsi holds failing address. + * %rbp holds failing address. */ 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) -- cgit v1.2.3