Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The syscall argument registers are misleading in syscalls part one #855

Open
k4lizen opened this issue Sep 14, 2024 · 0 comments
Open

Comments

@k4lizen
Copy link

k4lizen commented Sep 14, 2024

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:
image
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant