Show HN:我更新了我的 Linux 系统调用网站和 API

Hacker News Top 工具

摘要

Show HN:更新版网站和 API(syscall.sh),汇总了 27 种架构的 Linux 系统调用表,涵盖 Linux 3.3 至 7.3,包含系统调用号、参数、寄存器、调用约定,并为每种架构提供机器可读的 JSON 导出。

我最早在 2020 年发布了这些内容,现在终于添加了更多架构、内核选择器、系统调用说明以及其他一些贴心功能。它在移动设备上的体验应该也会好一些,不过我并不是 CSS 专家。<p>API 地址是 <a href="https:&#x2F;&#x2F;api.syscall.sh" rel="nofollow">https:&#x2F;&#x2F;api.syscall.sh</a>
查看原文
查看缓存全文

缓存时间: 2026/11/02 12:34

# 按架构分类的 Linux 系统调用表 · syscall.sh 来源:https://syscall.sh/ 所有 Linux 系统调用表汇集一处,按架构分组:涵盖从 Linux 3\.3 到 7\.3 的 27 种架构的系统调用及其编号、参数和寄存器。 ## 架构 - **x64**x86\_64,369 个系统调用 · 自 3\.3 起 (https://syscall.sh/x64/) - **x86**i386,32 位 x86,441 个系统调用 · 自 3\.3 起 (https://syscall.sh/x86/) - **arm64**AArch64,326 个系统调用 · 自 3\.7 起 (https://syscall.sh/arm64/) - **arm**ARM EABI,32 位,426 个系统调用 · 自 4\.10 起 (https://syscall.sh/arm/) - **riscv64**RISC\-V,64 位,327 个系统调用 · 自 4\.15 起 (https://syscall.sh/riscv64/) - **ia32**x86\_64 上的 IA\-32 兼容模式,439 个系统调用 · 自 3\.3 起 (https://syscall.sh/ia32/) - **x32**x86\_64 上的 x32 ABI,369 个系统调用 · 自 3\.4 起 (https://syscall.sh/x32/) - **loongarch64**LoongArch,64 位,323 个系统调用 · 自 5\.19 起 (https://syscall.sh/loongarch64/) - **ppc64**PowerPC,64 位,383 个系统调用 · 自 5\.0 起 (https://syscall.sh/ppc64/) - **ppc**PowerPC,32 位,425 个系统调用 · 自 5\.0 起 (https://syscall.sh/ppc/) - **s390x**IBM Z,378 个系统调用 · 自 4\.16 起 (https://syscall.sh/s390x/) - **mips64**MIPS n64 ABI,363 个系统调用 · 自 5\.0 起 (https://syscall.sh/mips64/) - **mipsn32**MIPS n32 ABI,387 个系统调用 · 自 5\.0 起 (https://syscall.sh/mipsn32/) - **mipso32**MIPS o32 ABI,413 个系统调用 · 自 5\.0 起 (https://syscall.sh/mipso32/) - **alpha**DEC Alpha,403 个系统调用 · 自 5\.0 起 (https://syscall.sh/alpha/) - **arc**Synopsys ARC,350 个系统调用 · 自 3\.9 起 (https://syscall.sh/arc/) - **csky**C\-SKY,346 个系统调用 · 自 4\.20 起 (https://syscall.sh/csky/) - **hexagon**Qualcomm Hexagon,345 个系统调用 · 自 3\.7 起 (https://syscall.sh/hexagon/) - **m68k**Motorola 68000,435 个系统调用 · 自 5\.0 起 (https://syscall.sh/m68k/) - **microblaze**Xilinx MicroBlaze,423 个系统调用 · 自 5\.0 起 (https://syscall.sh/microblaze/) - **nios2**Intel Nios II,346 个系统调用 · 自 3\.19 起 (https://syscall.sh/nios2/) - **openrisc**OpenRISC,346 个系统调用 · 自 3\.7 起 (https://syscall.sh/openrisc/) - **parisc**HP PA\-RISC,404 个系统调用 · 自 5\.0 起 (https://syscall.sh/parisc/) - **sh**SuperH,433 个系统调用 · 自 5\.0 起 (https://syscall.sh/sh/) - **sparc**SPARC,32 位,434 个系统调用 · 自 5\.0 起 (https://syscall.sh/sparc/) - **sparc64**SPARC,64 位,399 个系统调用 · 自 5\.0 起 (https://syscall.sh/sparc64/) - **xtensa**Tensilica Xtensa,388 个系统调用 · 自 5\.0 起 (https://syscall.sh/xtensa/) 每种架构的系统调用表还以纯 JSON 文件的形式提供,位于`//syscalls\.json`,其中包含各个系统调用何时引入、何时移除的完整历史,例如 /x64/syscalls\.json (https://syscall.sh/x64/syscalls.json)。 ## 调用约定 编号放在 *NR* 中,参数放在 *ARG0* 至 *ARG5* 中,然后执行指令。结果通过 *RETURN* 返回。架构指令NRRETURNARG0ARG1ARG2ARG3ARG4ARG5x64 (https://syscall.sh/x64/)`syscall`raxraxrdirsirdxr10r8r9x86 (https://syscall.sh/x86/)`int 0x80`eaxeaxebxecxedxesiediebparm64 (https://syscall.sh/arm64/)`svc \#0`x8x0x0x1x2x3x4x5arm (https://syscall.sh/arm/)`svc \#0`r7r0r0r1r2r3r4r5riscv64 (https://syscall.sh/riscv64/)`ecall`a7a0a0a1a2a3a4a5ia32 (https://syscall.sh/ia32/)`int 0x80`eaxeaxebxecxedxesiediebpx32 (https://syscall.sh/x32/)`syscall`raxraxrdirsirdxr10r8r9loongarch64 (https://syscall.sh/loongarch64/)`syscall 0`a7a0a0a1a2a3a4a5ppc64 (https://syscall.sh/ppc64/)`sc`r0r3r3r4r5r6r7r8ppc (https://syscall.sh/ppc/)`sc`r0r3r3r4r5r6r7r8s390x (https://syscall.sh/s390x/)`svc 0`r1r2r2r3r4r5r6r7mips64 (https://syscall.sh/mips64/)`syscall`v0v0a0a1a2a3a4a5mipsn32 (https://syscall.sh/mipsn32/)`syscall`v0v0a0a1a2a3a4a5mipso32 (https://syscall.sh/mipso32/)`syscall`v0v0a0a1a2a3sp\+16sp\+20alpha (https://syscall.sh/alpha/)`callsys`v0v0a0a1a2a3a4a5arc (https://syscall.sh/arc/)`trap0`r8r0r0r1r2r3r4r5csky (https://syscall.sh/csky/)`trap 0`r7a0a0a1a2a3r4r5hexagon (https://syscall.sh/hexagon/)`trap0\(\#1\)`r6r0r0r1r2r3r4r5m68k (https://syscall.sh/m68k/)`trap \#0`d0d0d1d2d3d4d5a0microblaze (https://syscall.sh/microblaze/)`brki r14,8`r12r3r5r6r7r8r9r10nios2 (https://syscall.sh/nios2/)`trap`r2r2r4r5r6r7r8r9openrisc (https://syscall.sh/openrisc/)`l\.sys 1`r11r11r3r4r5r6r7r8parisc (https://syscall.sh/parisc/)`ble 0x100\(%sr2, %r0\)`r20r28r26r25r24r23r22r21sh (https://syscall.sh/sh/)`trapa \#31`r3r0r4r5r6r7r0r1sparc (https://syscall.sh/sparc/)`t 0x10`g1o0o0o1o2o3o4o5sparc64 (https://syscall.sh/sparc64/)`t 0x6d`g1o0o0o1o2o3o4o5xtensa (https://syscall.sh/xtensa/)`syscall`a2a2a6a3a4a5a8a9 ## API `` curl https://api.syscall.sh/v2/syscalls/x64/read `` 任意内核版本、版本间的差异及更多内容,请参阅 API 文档 (https://api.syscall.sh/docs)。 ## 不同内核版本的系统调用表 版本之间会新增条目,偶尔也会移除条目。每个架构页面都有内核版本选择器,其 JSON 下载文件会记录每个条目首次出现的版本 \(`since`\) 和被移除的版本 \(`removed\_in`\)。已移除的条目仍然可见:在内核版本选择器中选择“全部,包含已移除”,每个已移除的系统调用都会标注移除它的版本。 ## 数据来源 本站所有内容均直接从内核源码中读取。对于每种架构,生成器会遍历其扫描的每个主线版本中的系统调用表和 `SYSCALL\_DEFINE` 宏,因此这里的编号就是内核实际用于分派调用的编号。它还会记录每种架构的调用约定,即进入内核的指令,从而让每张系统调用表都能准确显示编号和参数应放在哪里。如果某个系统调用的 `since` 等于该架构扫描的首个版本,说明它在当时就已经存在,实际引入时间可能早得多。 ### 描述与完整历史 简短描述来自 Linux man-pages 项目 (https://www.kernel.org/doc/man-pages/),而 `io\_uring` 的描述来自 liburing (https://github.com/axboe/liburing)。每当数据发生变化,网站都会根据 syscall API (https://api.syscall.sh/docs) 重新构建。

相似文章

Show HN: Things to Do API

Hacker News Top

Show HN: Things To Do API —— 一个快速、本地化的活动知识库,涵盖演出、讲座、快闪店和集市,可通过自然语言搜索、REST 和 MCP 访问,适用于智能体(agent)应用。