0xAX / 0xAX/linux-insides

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

未关闭
#855 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:syscalls todo
主要语言
Python
星标
33.5k
派生
3.6k
平均合并
8 小时 41 分钟
30 天内合并 PR
11

描述

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](https://github.com/user-attachments/assets/7ed318b3-2eb9-44d3-8dd6-d75b23bf4476)
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

贡献指南

打开贡献指南

调研方向

该 issue 指向系统调用系列第一部分中的特定图表以及 Linux 内核源代码中的引用 (arch/x86/entry/entry_64.S)。要修正文档,请在书籍的源文件中(很可能在系统调用第一部分的 Markdown 或 AsciiDoc 文件中)找到具有误导性的图表或文本。与第二部分描述的正确寄存器用法以及链接的汇编代码进行比较。修复方法是更新文本或图片,以反映系统调用使用不同的参数寄存器(例如,ECX 用于 RIP,而不是作为参数)。

由索引模型根据 Issue 内容生成。

评估

领域
documentation
Issue 类型
文档
难度
1/5
预计耗时
1 小时以内
活跃度
停滞
描述清晰度
描述清楚
新手友好度
40/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。