Skip to content

RFC x86: Generate system calls from a simple table

H. Peter Anvin lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8kbuild: Add support for installing generated asm headersscripts/Makefile.headersinst+8 -21 reply
2/8kbuild: Add support for an "archheaders" targetDocumentation/kbuild/makefiles.txt Makefile scripts/headers.sh+39 -214 replies
3/8x86-64, syscall: Adjust comment spacing and remove typoarch/x86/kernel/syscall_64.c+3 -31 reply
4/8x86-64, ia32: Move compat_ni_syscall into C and its own filearch/x86/ia32/Makefile arch/x86/ia32/ia32entry.S arch/x86/ia32/nosyscall.c+8 -30 replies
5/8trace: Include <asm/asm-offsets.h> in trace_syscalls.ckernel/trace/trace_syscalls.c+1 -03 replies
6/8x86: Machine-readable syscall tables and scripts to process themarch/x86/syscalls/Makefile arch/x86/syscalls/syscall_32.tbl arch/x86/syscalls/syscall_64.tbl +2 more+771 -04 replies
7/8checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as sourcescripts/checksyscalls.sh+10 -51 reply
8/8x86: Generate system call tables and unistd_*.h from tablesarch/x86/Makefile arch/x86/ia32/Makefile arch/x86/ia32/ia32entry.S +13 more+154 -18960 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchDavid WoodhouseMichal Marek
1/8A-b A-b
2/8Reported-and-tested-by
3/8
4/8
5/8
6/8
7/8A-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] RFC x86: Generate system calls from a simple table

From: "H. Peter Anvin" <[email protected]>

This patch series generates all the files that depend on the x86 system call numbers -- specifically unistd_*.h and the system call tables themselves -- from a simple text file table. Furthermore, it unifies the multiple different ways that the system call tables are generated. Although this is an x86-specific patch, the scripts are intended to be generic enough that it should be easy for other architectures to use them as well.

The "ABI" column in the text file is currently unused, however, it is intended to support the new x32 ABI, and may be helpful for other architectures that have multiple system call ABI ranges as well.

Special thanks to David Woodhouse, Michal Marek and Sam Ravnborg for helping me straight out the maze of Kbuild dependencies.

 Documentation/kbuild/makefiles.txt |   50 ++-
 Makefile                           |    9 +-
 arch/x86/Makefile                  |    6 +
 arch/x86/ia32/Makefile             |    1 +
 arch/x86/ia32/ia32entry.S          |  359 ------------------
 arch/x86/ia32/nosyscall.c          |    7 +
 arch/x86/ia32/syscall_ia32.c       |   25 ++
 arch/x86/include/asm/Kbuild        |    5 +-
 arch/x86/include/asm/ia32_unistd.h |   13 +-
 arch/x86/include/asm/unistd.h      |   54 +++-
 arch/x86/include/asm/unistd_32.h   |  401 --------------------
 arch/x86/include/asm/unistd_64.h   |  732 ------------------------------------
 arch/x86/kernel/Makefile           |    3 +-
 arch/x86/kernel/asm-offsets_32.c   |    8 +
 arch/x86/kernel/asm-offsets_64.c   |   19 +-
 arch/x86/kernel/entry_32.S         |   37 +--
 arch/x86/kernel/syscall_32.c       |   25 ++
 arch/x86/kernel/syscall_64.c       |   20 +-
 arch/x86/kernel/syscall_table_32.S |  350 -----------------
 arch/x86/syscalls/Makefile         |   43 +++
 arch/x86/syscalls/syscall_32.tbl   |  357 ++++++++++++++++++
 arch/x86/syscalls/syscall_64.tbl   |  320 ++++++++++++++++
 arch/x86/syscalls/syscallhdr.sh    |   36 ++
 arch/x86/syscalls/syscalltbl.sh    |   15 +
 kernel/trace/trace_syscalls.c      |    1 +
 scripts/Makefile.headersinst       |   10 +-
 scripts/checksyscalls.sh           |   15 +-
 scripts/headers.sh                 |    1 +
 28 files changed, 993 insertions(+), 1929 deletions(-)