[BUG] The syscall argument registers are misleading in syscalls part one
Author: k4lizenCreated Sep 14, 2024Updated Jun 10, 2026
Labelstodoarea:syscalls
In part two (https://0xax.gitbooks.io/linux-insides/content/SysCall/linux-syscall-2.html section "Preparation before system call handler will be called") its clear that for example ECX is not used as an argument register since RIP is stored in it. However in part 1 of the syscall series:
This is the order used when calling functions yes, but not when calling syscalls. Also I think syscalls don't take arguments from the stack. This is a useful reference: https://elixir.bootlin.com/linux/v6.10.10/source/arch/x86/entry/entry_64.S#L69
Source: 0xAX/linux-insides