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