Skip to content

Commit

Permalink
updated x64 syscall for mmap2 on 32 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbo committed Apr 11, 2024
1 parent 7dbcbff commit a3a7439
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/linux/ptrace/x64/x64.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ ptrace_alloc(pid_t pid, size_t bits, size_t size, int prot)
long alloc;
ptrace_syscall_t ptsys;

if (bits == 32) {
ptsys.syscall_num = 90; /* x86_32 mmap syscall number */
} else {
if (bits == 64) {
ptsys.syscall_num = SYS_mmap;
} else {
ptsys.syscall_num = 192; /* x86_64 mmap syscall number */
}

/* Setup mmap arguments */
Expand Down

0 comments on commit a3a7439

Please sign in to comment.