-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3459 from Sonicadvance1/fix_591
Capture a 64-bit process trying to jump to 32-bit syscall handler
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
%ifdef CONFIG | ||
{ | ||
"RegData": { | ||
"RAX": "0" | ||
} | ||
} | ||
%endif | ||
|
||
; 32-bit: | ||
; 265 = clock_gettime | ||
; 64-bit | ||
; 265 = linkat | ||
|
||
; rax = syscall on both 32-bit and 64-bit | ||
mov rax, 265 | ||
|
||
; rdi/rbx = first argument on 64-bit and 32-bit respectively | ||
mov rdi, 0 | ||
mov rbx, 0 | ||
|
||
; rsi/rcx = second argument on 64-bit and 32-bit respectively | ||
lea rsi, [rel .data] | ||
lea rcx, [rel .data] | ||
|
||
; Do a 32-bit syscall | ||
; On a real linux kernel this will execute clock_gettime | ||
; Under FEX without 32-bit syscall support this might try to execute linkat and return -ENOENT. | ||
int 0x80 | ||
hlt | ||
|
||
.data: | ||
dq 0, 0, 0, 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# FPREM is incorrect | ||
Test_X87/D9_F5_2.asm | ||
Test_X87/D9_F5_3.asm | ||
|
||
Test_FEX_bugs/32bit_syscall.asm |