[BUG] The syscall argument registers are misleading in syscalls part one
- Dominant language
- Python
- Stars
- 33.5k
- Forks
- 3.6k
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 11
Description
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
Contributor guide
Research direction
The issue points to a specific figure in part one of the syscall series and a reference in the Linux kernel source (arch/x86/entry/entry_64.S). To correct the documentation, locate the misleading diagram or text in the book's source files (likely in a Markdown or AsciiDoc file for the syscall part one). Compare with the correct register usage described in part two and the linked assembly code. The fix is to update the text or image to reflect that syscalls use different argument registers (e.g., ECX is used for RIP, not as an argument).
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 40/100