Skip to content

Commit c3b484c

Browse files
amlutoIngo Molnar
authored andcommitted
x86/syscalls: Document the fact that syscalls 512-547 are a legacy mistake
Since this commit: 6365b84 ("x86/syscalls: Split the x32 syscalls into their own table") there is no need for special x32-specific syscall numbers. I forgot to update the comments in syscall_64.tbl. Add comments to make it clear to future contributors that this range is a legacy wart. Reported-by: Jessica Clarke <jrtc27@jrtc27.com> Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/6c56fb4ddd18fc60a238eb4d867e4b3d97c6351e.1602471055.git.luto@kernel.org
1 parent f2ac57a commit c3b484c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

arch/x86/entry/syscalls/syscall_64.tbl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,10 @@
363363
439 common faccessat2 sys_faccessat2
364364

365365
#
366-
# x32-specific system call numbers start at 512 to avoid cache impact
367-
# for native 64-bit operation. The __x32_compat_sys stubs are created
368-
# on-the-fly for compat_sys_*() compatibility system calls if X86_X32
369-
# is defined.
366+
# Due to a historical design error, certain syscalls are numbered differently
367+
# in x32 as compared to native x86_64. These syscalls have numbers 512-547.
368+
# Do not add new syscalls to this range. Numbers 548 and above are available
369+
# for non-x32 use.
370370
#
371371
512 x32 rt_sigaction compat_sys_rt_sigaction
372372
513 x32 rt_sigreturn compat_sys_x32_rt_sigreturn
@@ -404,3 +404,5 @@
404404
545 x32 execveat compat_sys_execveat
405405
546 x32 preadv2 compat_sys_preadv64v2
406406
547 x32 pwritev2 compat_sys_pwritev64v2
407+
# This is the end of the legacy x32 range. Numbers 548 and above are
408+
# not special and are not to be used for x32-specific syscalls.

0 commit comments

Comments
 (0)