From: Ben Kallus Date: Sun, 18 May 2025 23:45:07 +0000 (-0400) Subject: man/man2/syscall.2: x86-64 + x32 syscall numbers go in eax X-Git-Tag: man-pages-6.15~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=125f3b3c3ee3b99f94e08214f610bde06a9bb754;p=thirdparty%2Fman-pages.git man/man2/syscall.2: x86-64 + x32 syscall numbers go in eax 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 Message-ID: <20250518234507.404608-1-benjamin.p.kallus.gr@dartmouth.edu> Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/syscall.2 b/man/man2/syscall.2 index f50d7cfc7..be645c0f4 100644 --- a/man/man2/syscall.2 +++ b/man/man2/syscall.2 @@ -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