]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/syscall.2: x86-64 + x32 syscall numbers go in eax
authorBen Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Sun, 18 May 2025 23:45:07 +0000 (19:45 -0400)
committerAlejandro Colomar <alx@kernel.org>
Thu, 22 May 2025 12:32:31 +0000 (14:32 +0200)
The kernel sign-extends eax before dispatching syscalls.
From arch/x86/entry/entry_64.S:
> movslq %eax, %rsi
> IBRS_ENTER
> UNTRAIN_RET
> CLEAR_BRANCH_HISTORY
>
> call do_syscall_64 /* returns with IRQs disabled */

This patch updates syscall.2 to document this. ARM64 exhibits a
similar behavior (w8 is extended), which is already documented.

Signed-off-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu>
Message-ID: <20250518234507.404608-1-benjamin.p.kallus.gr@dartmouth.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/syscall.2

index f50d7cfc7bcaaaf00ac10477d48521fb46105058..be645c0f4a977372e945ffea2088b414bb048515 100644 (file)
@@ -190,8 +190,8 @@ superh      trapa #31       r3      r0      r1      -       4, 6
 sparc/32       t 0x10  g1      o0      o1      psr/csr 1, 6
 sparc/64       t 0x6d  g1      o0      o1      psr/csr 1, 6
 tile   swint1  R10     R00     -       R01     1
-x86-64 syscall rax     rax     rdx     -       5
-x32    syscall rax     rax     rdx     -       5
+x86-64 syscall eax     rax     rdx     -       5
+x32    syscall eax     rax     rdx     -       5
 xtensa syscall a2      a2      -       -
 .TE
 .P