Skip to contentSkip to conversation

Automatically generate syscalls.h

PATCH Superseded Andrea Cervesato 3 participants 8 messages Sep 30, 2024 – Oct 9, 2024

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v3 cover Automatically generate syscalls.h

The problem we have at the moment is that all syscalls input files must be changed by hand each time we need to test a new syscall. The idea is to simplify this process, providing a script that is able to read from kernel sources and to generate all syscalls files we need.

This patch set adds a new command inside the syscalls folder and it refactors the previous regen.sh code.
The new way we have to generate the syscalls.h file is the following:

include/lapi/syscalls/generate_arch.sh path/to/kernel/source
include/lapi/syscalls/generate_syscalls.sh path/to/syscalls.h

Scripts are independent and they can be run separately. generate_syscalls.sh is the equivalent of regen.sh, but its code has been cleaned up.

---
Changes in v3:
- fix generate_arch.sh to work properly for all architectures
- rename some arch .in files and handle renaming inside
generate_syscalls.sh using the right gcc directives
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- refactor regen.sh
- split syscalls.h and syscalls .in files creation
- updated syscalls .in files
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Andrea Cervesato (4):
Refactor regen.sh script to generate syscalls Add script to generate arch(s) dependant syscalls Delete obsolete strip_syscall.awk file Update syscalls files

 configure.ac                                       |   2 +-
 include/lapi/syscalls/arc.in                       |  41 +-
 include/lapi/syscalls/arm.in                       | 819 +++++++++++----------
 include/lapi/syscalls/{loongarch.in => arm64.in}   |  12 +-
 include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
 include/lapi/syscalls/generate_arch.sh             | 210 ++++++
 include/lapi/syscalls/generate_syscalls.sh         | 118 +++
 include/lapi/syscalls/hppa.in                      |  52 --
 include/lapi/syscalls/i386.in                      |  18 +-
 include/lapi/syscalls/ia64.in                      |  10 +-
 .../lapi/syscalls/{aarch64.in => loongarch64.in}   |  20 +-
 include/lapi/syscalls/{mips_n64.in => mips64.in}   |  13 +-
 .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |  13 +-
 include/lapi/syscalls/{mips_o32.in => mipso32.in}  |  21 +-
 include/lapi/syscalls/parisc.in                    | 397 ++++++++++
 include/lapi/syscalls/powerpc.in                   |  19 +-
 include/lapi/syscalls/powerpc64.in                 |  47 +-
 include/lapi/syscalls/regen.sh                     | 129 ----
 include/lapi/syscalls/s390.in                      |  15 +-
 include/lapi/syscalls/s390x.in                     |  15 +-
 include/lapi/syscalls/sh.in                        |  15 +-
 include/lapi/syscalls/sparc.in                     |  14 +-
 include/lapi/syscalls/sparc64.in                   |  16 +-
 include/lapi/syscalls/strip_syscall.awk            |  19 -
 .../lapi/syscalls/{order => supported-arch.txt}    |  12 +-
 include/lapi/syscalls/x86_64.in                    |  51 +-
 26 files changed, 1367 insertions(+), 737 deletions(-)

---
base-commit: 08cb938197e82eddce146662a47ff990827ff60a
change-id: 20240923-generate_syscalls-780dc2227bdb

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

PATCH v3 1/4 Refactor regen.sh script to generate syscalls

From: Andrea Cervesato <[email protected]>

Rename regen.sh into a more meaningful generate_syscalls.sh name, rename order into a more meaningful supported-syscalls.txt name and rewrite part of the regen.sh script code in order to execute it from anywhere in the filesystem, without need to be in its own folder. The new code is also more clear and concise, using native sh features which are simplifying the code.

---
 configure.ac                                       |   2 +-
 include/lapi/syscalls/generate_syscalls.sh         | 115 ++++++++++++++++++
 include/lapi/syscalls/regen.sh                     | 129 ---------------------
 .../lapi/syscalls/{order => supported-arch.txt}    |   0
 4 files changed, 116 insertions(+), 130 deletions(-)
configure.ac +1 -1
index ebbf49e28..45f92477f 100644
@@ -384,7 +384,7 @@ else
     AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
 fi
 
-AC_CONFIG_COMMANDS([syscalls.h], [cd ${ac_top_srcdir}/include/lapi/syscalls; ./regen.sh])
+AC_CONFIG_COMMANDS([syscalls.h], [cd ${ac_top_srcdir}/include/lapi/syscalls; ./generate_syscalls.sh ../syscalls.h])
 
 # custom functions
 # NOTE: don't create custom functions for simple checks, put them into this file
include/lapi/syscalls/generate_syscalls.sh new file +115 -0

115 lines not on this page · raw message

include/lapi/syscalls/regen.sh deleted +0 -129

129 lines not on this page · raw message

include/lapi/syscalls/supported-arch.txt renamed from include/lapi/syscalls/order +0 -0
similarity index 100%
rename from include/lapi/syscalls/order
rename to include/lapi/syscalls/supported-arch.txt
Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

PATCH v3 2/4 Add script to generate arch(s) dependant syscalls

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

Add generate_arch.sh script which can be used to generate arch(s) dependant syscalls file. The way it works is pretty simple: for each architecture defined into supported-arch.txt, compile kernel headers, extract the list of syscalls and generate a .in file containing all of them, associated with their own syscall's number.
The way syscalls files are generated, passes through a C application which is automatically checking the availability of the syscalls in the user space environment.

---
 include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
 include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
 include/lapi/syscalls/generate_arch.sh             | 210 +++++++++++++++++++++
 include/lapi/syscalls/generate_syscalls.sh         |   9 +-
 .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
 include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
 .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
 include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
 include/lapi/syscalls/{hppa.in => parisc.in}       |   0
 include/lapi/syscalls/supported-arch.txt           |  12 +-
 10 files changed, 228 insertions(+), 9 deletions(-)
include/lapi/syscalls/arm64.in renamed from include/lapi/syscalls/aarch64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/aarch64.in
rename to include/lapi/syscalls/arm64.in
include/lapi/syscalls/blacklist-syscalls.txt new file +6 -0
new file mode 100644
index 000000000..e1ae5f76f
@@ -0,0 +1,6 @@
+arch_specific_syscall
+available
+ni_syscall
+reserved
+SYSCALL_MASK
+unused
include/lapi/syscalls/generate_arch.sh new file +210 -0

210 lines not on this page · raw message

include/lapi/syscalls/generate_syscalls.sh +6 -3
index 863f52253..05f3d6e24 100755
@@ -74,9 +74,12 @@ tst_ret; \
 			sparc64) echo "#if defined(__sparc__) && defined(__arch64__)" ;;
 			sparc) echo "#if defined(__sparc__) && !defined(__arch64__)" ;;
 			s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
-			mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
-			mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
-			mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+			mips64n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
+			mips64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
+			mipso32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+			parisc) echo "#ifdef __hppa__" ;;
+			loongarch64) echo "#ifdef __loongarch__" ;;
+			arm64) echo "#ifdef __aarch64__" ;;
 			*) echo "#ifdef __${arch}__" ;;
 			esac
 
include/lapi/syscalls/loongarch64.in renamed from include/lapi/syscalls/loongarch.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/loongarch.in
rename to include/lapi/syscalls/loongarch64.in
include/lapi/syscalls/mips64.in renamed from include/lapi/syscalls/mips_n64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n64.in
rename to include/lapi/syscalls/mips64.in
include/lapi/syscalls/mips64n32.in renamed from include/lapi/syscalls/mips_n32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n32.in
rename to include/lapi/syscalls/mips64n32.in
include/lapi/syscalls/mipso32.in renamed from include/lapi/syscalls/mips_o32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_o32.in
rename to include/lapi/syscalls/mipso32.in
include/lapi/syscalls/parisc.in renamed from include/lapi/syscalls/hppa.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/hppa.in
rename to include/lapi/syscalls/parisc.in
include/lapi/syscalls/supported-arch.txt +6 -6
index c18aa38cf..c5c5191ac 100644
@@ -1,13 +1,13 @@
-aarch64
 arc
+arm64
 arm
-hppa
 i386
 ia64
-loongarch
-mips_n32
-mips_n64
-mips_o32
+loongarch64
+mips64n32
+mips64
+mipso32
+parisc
 powerpc64
 powerpc
 s390x
Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Re: [LTP] [PATCH v3 2/4] Add script to generate arch(s) dependant syscalls

Quoted 36 lines · Andrea Cervesato

From: Andrea Cervesato <[email protected]>

Add generate_arch.sh script which can be used to generate arch(s) dependant syscalls file. The way it works is pretty simple: for each architecture defined into supported-arch.txt, compile kernel headers, extract the list of syscalls and generate a .in file containing all of them, associated with their own syscall's number.
The way syscalls files are generated, passes through a C application which is automatically checking the availability of the syscalls in the user space environment.

---
 include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
 include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
 include/lapi/syscalls/generate_arch.sh             | 210 +++++++++++++++++++++
 include/lapi/syscalls/generate_syscalls.sh         |   9 +-
 .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
 include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
 .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
 include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
 include/lapi/syscalls/{hppa.in => parisc.in}       |   0
 include/lapi/syscalls/supported-arch.txt           |  12 +-
 10 files changed, 228 insertions(+), 9 deletions(-)
include/lapi/syscalls/arm64.in renamed from include/lapi/syscalls/aarch64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/aarch64.in
rename to include/lapi/syscalls/arm64.in
include/lapi/syscalls/blacklist-syscalls.txt new file +0 -0
new file mode 100644
index 000000000..e1ae5f76f

include/lapi/syscalls/blacklist-syscalls.txt line 3

Quoted 3 lines
include/lapi/syscalls/blacklist-syscalls.txt new file +3 -0
@@ -0,0 +1,6 @@
+arch_specific_syscall
+available
+ni_syscall

Overall I like v3, it appears to correct many mistakes we made manually.

But I'm not sure we want to blacklist "ni_syscall" entries. It's still a valid syscall number, and the define is still provided in kernel headers.

If we have a test for syscall, that upstream deprecates, the test would become unbuildable after we update syscalls with this script (which drops the define).

Regards,
Jan

Quoted 291 lines
include/lapi/syscalls/blacklist-syscalls.txt new file +3 -0
+reserved
+SYSCALL_MASK
+unused
include/lapi/syscalls/generate_arch.sh new file +210 -0
new file mode 100755
index 000000000..d8b36966e
@@ -0,0 +1,210 @@
+#!/bin/sh
+#
+# This is an adaptation of the update-tables.sh script, included in the
+# syscalls-table project (https://github.com/hrw/syscalls-table) and released
+# under the MIT license.
+#
+# Author: Andrea Cervesato <[email protected]>
+
+KERNELSRC=$1
+
+# to keep sorting in order
+export LC_ALL=C
+
+if [ -z $KERNELSRC ]; then
+       echo "Please provide kernel sources:"
+       echo ""
+       echo "$0 path/to/Linux/kernel/sources"
+       echo ""
+       exit 1
+fi
+
+if [ ! -e ${KERNELSRC}/Makefile ]; then
+       echo "No Makefile in $KERNELSRC directory"
+       exit 1
+fi
+
+TEMP=$(mktemp -d)
+KVER=$(make -C ${KERNELSRC} kernelversion -s)
+
+SCRIPT_DIR="$(realpath $(dirname "$0"))"
+SUPPORTED_ARCH="${SCRIPT_DIR}/supported-arch.txt"
+SYSCALLS_BLACKLIST="${SCRIPT_DIR}/blacklist-syscalls.txt"
+LINUX_HEADERS="${TEMP}/headers"
+
+grab_syscall_names_from_tables()
+{
+       for tbl_file in $(find ${KERNELSRC}/arch -name syscall*.tbl); do
+               grep -E -v "(^#|^$|sys_ni_syscall)" $tbl_file |
+                       awk '{ print $3 }' >> ${TEMP}/syscall-names.tosort
+       done
+
+       drop_bad_entries
+}
+
+grab_syscall_names_from_unistd_h()
+{
+       grep -E -h "^#define __NR_" \
+               ${LINUX_HEADERS}/usr/include/asm/unistd*.h \
+               ${LINUX_HEADERS}/usr/include/asm-generic/unistd.h \
+               >${TEMP}/syscall-names.tosort
+
+       drop_bad_entries
+}
+
+drop_bad_entries()
+{
+       grep -E -v "(unistd.h|NR3264|__NR_syscall|__SC_COMP|__NR_.*Linux|__NR_FAST)" \
+               ${TEMP}/syscall-names.tosort |
+               grep -E -vi "(not implemented|available|unused|reserved|xtensa|spill)" |
+               grep -E -v "(__SYSCALL|SYSCALL_BASE|SYSCALL_MASK)" |
+               sed -e "s/#define\s*__NR_//g" -e "s/\s.*//g" |
+               sort -u >${TEMP}/syscall-names.sorted
+
+       grep -w -v -f ${SYSCALLS_BLACKLIST} ${TEMP}/syscall-names.sorted |
+               sort -u >${TEMP}/syscall-names.txt
+}
+
+generate_table()
+{
+       echo "- $arch"
+
+       if [ $bits == 32 ]; then
+               extraflags="${extraflags} -D__BITS_PER_LONG=32"
+       fi
+
+       local uppercase_arch=$(echo "$arch" | tr '[:lower:]' '[:upper:]')
+
+       gcc ${TEMP}/list-syscalls.c -U__LP64__ -U__ILP32__ -U__i386__ \
+               -D${uppercase_arch} \
+               -D__${arch}__ ${extraflags} \
+               -I ${LINUX_HEADERS}/usr/include/ \
+               -o ${TEMP}/list-syscalls &>/dev/null
+
+       ${TEMP}/list-syscalls > "${TEMP}/${arch}.in.tosort"
+
+       sort -k2,2n "${TEMP}/${arch}.in.tosort" > "${TEMP}/${arch}.in"
+}
+
+generate_list_syscalls_c()
+{
+       (
+               echo
+               echo "
+               #include <stdio.h>
+               #include <asm/unistd.h>
+
+               int main(void)
+               {
+               "
+               for syscall in $(cat ${TEMP}/syscall-names.txt); do
+                       echo "
+               #ifdef __NR_$syscall
+                       printf(\"$syscall %d\\n\", __NR_$syscall);
+               #endif
+               "
+               done
+               echo " return 0;
+               }"
+       ) > ${TEMP}/list-syscalls.c
+}
+
+export_headers()
+{
+       make -s -C ${KERNELSRC} ARCH=${arch} O=${LINUX_HEADERS} \
+               headers_install &>/dev/null
+}
+
+do_all_tables()
+{
+       for archdir in ${KERNELSRC}/arch/*; do
+               arch=$(basename $archdir)
+
+               bits=64
+               extraflags=
+
+               case ${arch} in
+               Kconfig)
+                       continue
+                       ;;
+               um)
+                       continue
+                       ;;
+               esac
+
+               export_headers
+               grab_syscall_names_from_unistd_h
+
+               case ${arch} in
+               arm)
+                       bits=32
+                       arch=armoabi extraflags= generate_table
+                       arch=arm extraflags=-D__ARM_EABI__ generate_table
+                       ;;
+               loongarch)
+                       # 32-bit variant of loongarch may appear
+                       arch=loongarch64 extraflags=-D_LOONGARCH_SZLONG=64 generate_table
+                       ;;
+               mips)
+                       arch=mips64 extraflags=-D_MIPS_SIM=_MIPS_SIM_ABI64 generate_table
+                       bits=32
+                       arch=mipso32 extraflags=-D_MIPS_SIM=_MIPS_SIM_ABI32 generate_table
+                       arch=mips64n32 extraflags=-D_MIPS_SIM=_MIPS_SIM_NABI32 generate_table
+                       ;;
+               powerpc)
+                       generate_table
+                       arch=powerpc64 generate_table
+                       ;;
+               riscv)
+                       arch=riscv64 extraflags=-D__LP64__ generate_table
+                       bits=32
+                       arch=riscv32 extraflags=-D__SIZEOF_POINTER__=4 generate_table
+                       ;;
+               s390)
+                       bits=32
+                       generate_table
+                       bits=64
+                       arch=s390x generate_table
+                       ;;
+               sparc)
+                       bits=32
+                       extraflags=-D__32bit_syscall_numbers__ generate_table
+                       bits=64
+                       arch=sparc64 extraflags=-D__arch64__ generate_table
+                       ;;
+               x86)
+                       arch=x86_64 extraflags=-D__LP64__ generate_table
+                       bits=32
+                       arch=i386 generate_table
+                       arch=x32 extraflags=-D__ILP32__ generate_table
+                       ;;
+               arc | csky | hexagon | m68k | microblaze | nios2 | openrisc | sh | xtensa)
+                       bits=32 generate_table
+                       ;;
+               *)
+                       generate_table
+                       ;;
+               esac
+       done
+}
+
+copy_supported_arch()
+{
+       while IFS= read -r arch; do
+               if [ -f "${TEMP}/${arch}.in" ]; then
+                       echo "- ${arch}"
+                       cp "${TEMP}/${arch}.in" "${SCRIPT_DIR}/${arch}.in"
+               fi
+       done < ${SUPPORTED_ARCH}
+}
+
+echo "Temporary directory ${TEMP}"
+echo "Extracting syscalls"
+
+grab_syscall_names_from_tables
+generate_list_syscalls_c
+
+do_all_tables
+
+echo "Copying supported syscalls"
+copy_supported_arch
include/lapi/syscalls/generate_syscalls.sh +6 -3
index 863f52253..05f3d6e24 100755
@@ -74,9 +74,12 @@ tst_ret; \
                        sparc64) echo "#if defined(__sparc__) && defined(__arch64__)" ;;
                        sparc) echo "#if defined(__sparc__) && !defined(__arch64__)" ;;
                        s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
-                       mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
-                       mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
-                       mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+                       mips64n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
+                       mips64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
+                       mipso32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+                       parisc) echo "#ifdef __hppa__" ;;
+                       loongarch64) echo "#ifdef __loongarch__" ;;
+                       arm64) echo "#ifdef __aarch64__" ;;
                        *) echo "#ifdef __${arch}__" ;;
                        esac
 
include/lapi/syscalls/loongarch64.in renamed from include/lapi/syscalls/loongarch.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/loongarch.in
rename to include/lapi/syscalls/loongarch64.in
include/lapi/syscalls/mips64.in renamed from include/lapi/syscalls/mips_n64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n64.in
rename to include/lapi/syscalls/mips64.in
include/lapi/syscalls/mips64n32.in renamed from include/lapi/syscalls/mips_n32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n32.in
rename to include/lapi/syscalls/mips64n32.in
include/lapi/syscalls/mipso32.in renamed from include/lapi/syscalls/mips_o32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_o32.in
rename to include/lapi/syscalls/mipso32.in
include/lapi/syscalls/parisc.in renamed from include/lapi/syscalls/hppa.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/hppa.in
rename to include/lapi/syscalls/parisc.in
include/lapi/syscalls/supported-arch.txt +6 -7
index c18aa38cf..c5c5191ac 100644
@@ -1,13 +1,13 @@
-aarch64
 arc
+arm64
 arm
-hppa
 i386
 ia64
-loongarch
-mips_n32
-mips_n64
-mips_o32
+loongarch64
+mips64n32
+mips64
+mipso32
+parisc
 powerpc64
 powerpc
 s390x
 
--

2.43.0

--
Mailing list info: https://lists.linux.it/listinfo/ltp

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw

Re: [LTP] [PATCH v3 2/4] Add script to generate arch(s) dependant syscalls

Hi,

Quoted 46 lines · Jan Stancek
Quoted 35 lines · Andrea Cervesato

From: Andrea Cervesato <[email protected]>

Add generate_arch.sh script which can be used to generate arch(s) dependant syscalls file. The way it works is pretty simple: for each architecture defined into supported-arch.txt, compile kernel headers, extract the list of syscalls and generate a .in file containing all of them, associated with their own syscall's number.
The way syscalls files are generated, passes through a C application which is automatically checking the availability of the syscalls in the user space environment.

---
  include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
  include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
  include/lapi/syscalls/generate_arch.sh             | 210 +++++++++++++++++++++
  include/lapi/syscalls/generate_syscalls.sh         |   9 +-
  .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
  include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
  .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
  include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
  include/lapi/syscalls/{hppa.in => parisc.in}       |   0
  include/lapi/syscalls/supported-arch.txt           |  12 +-
  10 files changed, 228 insertions(+), 9 deletions(-)
include/lapi/syscalls/arm64.in renamed from include/lapi/syscalls/aarch64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/aarch64.in
rename to include/lapi/syscalls/arm64.in
include/lapi/syscalls/blacklist-syscalls.txt new file +0 -0
new file mode 100644
index 000000000..e1ae5f76f

include/lapi/syscalls/blacklist-syscalls.txt line 3

Quoted 3 lines
include/lapi/syscalls/blacklist-syscalls.txt new file +3 -0
@@ -0,0 +1,6 @@
+arch_specific_syscall
+available
+ni_syscall

Overall I like v3, it appears to correct many mistakes we made manually.

But I'm not sure we want to blacklist "ni_syscall" entries. It's still a valid syscall number, and the define is still provided in kernel headers.

Quoted 6 lines

If we have a test for syscall, that upstream deprecates, the test would become unbuildable after we update syscalls with this script (which drops the define).

Regards,
Jan

This is a good point. So your suggestion is to keep all syscalls defined in blacklist-syscalls.txt available anyway, or just the ni_syscall definition? At this point I would just drop the blacklist-syscalls.txt file and keep all defined syscalls for the LTP syscalls backorts.

Andrea

Quoted 291 lines
Quoted 291 lines
include/lapi/syscalls/blacklist-syscalls.txt new file +3 -0
+reserved
+SYSCALL_MASK
+unused
include/lapi/syscalls/generate_arch.sh new file +210 -0
new file mode 100755
index 000000000..d8b36966e
@@ -0,0 +1,210 @@
+#!/bin/sh
+#
+# This is an adaptation of the update-tables.sh script, included in the
+# syscalls-table project (https://github.com/hrw/syscalls-table) and released
+# under the MIT license.
+#
+# Author: Andrea Cervesato <[email protected]>
+
+KERNELSRC=$1
+
+# to keep sorting in order
+export LC_ALL=C
+
+if [ -z $KERNELSRC ]; then
+       echo "Please provide kernel sources:"
+       echo ""
+       echo "$0 path/to/Linux/kernel/sources"
+       echo ""
+       exit 1
+fi
+
+if [ ! -e ${KERNELSRC}/Makefile ]; then
+       echo "No Makefile in $KERNELSRC directory"
+       exit 1
+fi
+
+TEMP=$(mktemp -d)
+KVER=$(make -C ${KERNELSRC} kernelversion -s)
+
+SCRIPT_DIR="$(realpath $(dirname "$0"))"
+SUPPORTED_ARCH="${SCRIPT_DIR}/supported-arch.txt"
+SYSCALLS_BLACKLIST="${SCRIPT_DIR}/blacklist-syscalls.txt"
+LINUX_HEADERS="${TEMP}/headers"
+
+grab_syscall_names_from_tables()
+{
+       for tbl_file in $(find ${KERNELSRC}/arch -name syscall*.tbl); do
+               grep -E -v "(^#|^$|sys_ni_syscall)" $tbl_file |
+                       awk '{ print $3 }' >> ${TEMP}/syscall-names.tosort
+       done
+
+       drop_bad_entries
+}
+
+grab_syscall_names_from_unistd_h()
+{
+       grep -E -h "^#define __NR_" \
+               ${LINUX_HEADERS}/usr/include/asm/unistd*.h \
+               ${LINUX_HEADERS}/usr/include/asm-generic/unistd.h \
+               >${TEMP}/syscall-names.tosort
+
+       drop_bad_entries
+}
+
+drop_bad_entries()
+{
+       grep -E -v "(unistd.h|NR3264|__NR_syscall|__SC_COMP|__NR_.*Linux|__NR_FAST)" \
+               ${TEMP}/syscall-names.tosort |
+               grep -E -vi "(not implemented|available|unused|reserved|xtensa|spill)" |
+               grep -E -v "(__SYSCALL|SYSCALL_BASE|SYSCALL_MASK)" |
+               sed -e "s/#define\s*__NR_//g" -e "s/\s.*//g" |
+               sort -u >${TEMP}/syscall-names.sorted
+
+       grep -w -v -f ${SYSCALLS_BLACKLIST} ${TEMP}/syscall-names.sorted |
+               sort -u >${TEMP}/syscall-names.txt
+}
+
+generate_table()
+{
+       echo "- $arch"
+
+       if [ $bits == 32 ]; then
+               extraflags="${extraflags} -D__BITS_PER_LONG=32"
+       fi
+
+       local uppercase_arch=$(echo "$arch" | tr '[:lower:]' '[:upper:]')
+
+       gcc ${TEMP}/list-syscalls.c -U__LP64__ -U__ILP32__ -U__i386__ \
+               -D${uppercase_arch} \
+               -D__${arch}__ ${extraflags} \
+               -I ${LINUX_HEADERS}/usr/include/ \
+               -o ${TEMP}/list-syscalls &>/dev/null
+
+       ${TEMP}/list-syscalls > "${TEMP}/${arch}.in.tosort"
+
+       sort -k2,2n "${TEMP}/${arch}.in.tosort" > "${TEMP}/${arch}.in"
+}
+
+generate_list_syscalls_c()
+{
+       (
+               echo
+               echo "
+               #include <stdio.h>
+               #include <asm/unistd.h>
+
+               int main(void)
+               {
+               "
+               for syscall in $(cat ${TEMP}/syscall-names.txt); do
+                       echo "
+               #ifdef __NR_$syscall
+                       printf(\"$syscall %d\\n\", __NR_$syscall);
+               #endif
+               "
+               done
+               echo " return 0;
+               }"
+       ) > ${TEMP}/list-syscalls.c
+}
+
+export_headers()
+{
+       make -s -C ${KERNELSRC} ARCH=${arch} O=${LINUX_HEADERS} \
+               headers_install &>/dev/null
+}
+
+do_all_tables()
+{
+       for archdir in ${KERNELSRC}/arch/*; do
+               arch=$(basename $archdir)
+
+               bits=64
+               extraflags=
+
+               case ${arch} in
+               Kconfig)
+                       continue
+                       ;;
+               um)
+                       continue
+                       ;;
+               esac
+
+               export_headers
+               grab_syscall_names_from_unistd_h
+
+               case ${arch} in
+               arm)
+                       bits=32
+                       arch=armoabi extraflags= generate_table
+                       arch=arm extraflags=-D__ARM_EABI__ generate_table
+                       ;;
+               loongarch)
+                       # 32-bit variant of loongarch may appear
+                       arch=loongarch64 extraflags=-D_LOONGARCH_SZLONG=64 generate_table
+                       ;;
+               mips)
+                       arch=mips64 extraflags=-D_MIPS_SIM=_MIPS_SIM_ABI64 generate_table
+                       bits=32
+                       arch=mipso32 extraflags=-D_MIPS_SIM=_MIPS_SIM_ABI32 generate_table
+                       arch=mips64n32 extraflags=-D_MIPS_SIM=_MIPS_SIM_NABI32 generate_table
+                       ;;
+               powerpc)
+                       generate_table
+                       arch=powerpc64 generate_table
+                       ;;
+               riscv)
+                       arch=riscv64 extraflags=-D__LP64__ generate_table
+                       bits=32
+                       arch=riscv32 extraflags=-D__SIZEOF_POINTER__=4 generate_table
+                       ;;
+               s390)
+                       bits=32
+                       generate_table
+                       bits=64
+                       arch=s390x generate_table
+                       ;;
+               sparc)
+                       bits=32
+                       extraflags=-D__32bit_syscall_numbers__ generate_table
+                       bits=64
+                       arch=sparc64 extraflags=-D__arch64__ generate_table
+                       ;;
+               x86)
+                       arch=x86_64 extraflags=-D__LP64__ generate_table
+                       bits=32
+                       arch=i386 generate_table
+                       arch=x32 extraflags=-D__ILP32__ generate_table
+                       ;;
+               arc | csky | hexagon | m68k | microblaze | nios2 | openrisc | sh | xtensa)
+                       bits=32 generate_table
+                       ;;
+               *)
+                       generate_table
+                       ;;
+               esac
+       done
+}
+
+copy_supported_arch()
+{
+       while IFS= read -r arch; do
+               if [ -f "${TEMP}/${arch}.in" ]; then
+                       echo "- ${arch}"
+                       cp "${TEMP}/${arch}.in" "${SCRIPT_DIR}/${arch}.in"
+               fi
+       done < ${SUPPORTED_ARCH}
+}
+
+echo "Temporary directory ${TEMP}"
+echo "Extracting syscalls"
+
+grab_syscall_names_from_tables
+generate_list_syscalls_c
+
+do_all_tables
+
+echo "Copying supported syscalls"
+copy_supported_arch
include/lapi/syscalls/generate_syscalls.sh +6 -3
index 863f52253..05f3d6e24 100755
@@ -74,9 +74,12 @@ tst_ret; \
                         sparc64) echo "#if defined(__sparc__) && defined(__arch64__)" ;;
                         sparc) echo "#if defined(__sparc__) && !defined(__arch64__)" ;;
                         s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
-                       mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
-                       mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
-                       mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+                       mips64n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
+                       mips64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
+                       mipso32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
+                       parisc) echo "#ifdef __hppa__" ;;
+                       loongarch64) echo "#ifdef __loongarch__" ;;
+                       arm64) echo "#ifdef __aarch64__" ;;
                         *) echo "#ifdef __${arch}__" ;;
                         esac
 
include/lapi/syscalls/loongarch64.in renamed from include/lapi/syscalls/loongarch.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/loongarch.in
rename to include/lapi/syscalls/loongarch64.in
include/lapi/syscalls/mips64.in renamed from include/lapi/syscalls/mips_n64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n64.in
rename to include/lapi/syscalls/mips64.in
include/lapi/syscalls/mips64n32.in renamed from include/lapi/syscalls/mips_n32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_n32.in
rename to include/lapi/syscalls/mips64n32.in
include/lapi/syscalls/mipso32.in renamed from include/lapi/syscalls/mips_o32.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/mips_o32.in
rename to include/lapi/syscalls/mipso32.in
include/lapi/syscalls/parisc.in renamed from include/lapi/syscalls/hppa.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/hppa.in
rename to include/lapi/syscalls/parisc.in
include/lapi/syscalls/supported-arch.txt +6 -7
index c18aa38cf..c5c5191ac 100644
@@ -1,13 +1,13 @@
-aarch64
  arc
+arm64
  arm
-hppa
  i386
  ia64
-loongarch
-mips_n32
-mips_n64
-mips_o32
+loongarch64
+mips64n32
+mips64
+mipso32
+parisc
  powerpc64
  powerpc
  s390x
 
--

2.43.0

--
Mailing list info: https://lists.linux.it/listinfo/ltp

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw

Re: [LTP] [PATCH v3 2/4] Add script to generate arch(s) dependant syscalls

Quoted 53 lines · Andrea Cervesato

Hi,

Quoted 49 lines · Jan Stancek
Quoted 35 lines · Andrea Cervesato

From: Andrea Cervesato <[email protected]>

Add generate_arch.sh script which can be used to generate arch(s) dependant syscalls file. The way it works is pretty simple: for each architecture defined into supported-arch.txt, compile kernel headers, extract the list of syscalls and generate a .in file containing all of them, associated with their own syscall's number.
The way syscalls files are generated, passes through a C application which is automatically checking the availability of the syscalls in the user space environment.

---
  include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
  include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
  include/lapi/syscalls/generate_arch.sh             | 210 +++++++++++++++++++++
  include/lapi/syscalls/generate_syscalls.sh         |   9 +-
  .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
  include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
  .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
  include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
  include/lapi/syscalls/{hppa.in => parisc.in}       |   0
  include/lapi/syscalls/supported-arch.txt           |  12 +-
  10 files changed, 228 insertions(+), 9 deletions(-)
include/lapi/syscalls/arm64.in renamed from include/lapi/syscalls/aarch64.in +0 -0
similarity index 100%
rename from include/lapi/syscalls/aarch64.in
rename to include/lapi/syscalls/arm64.in
include/lapi/syscalls/blacklist-syscalls.txt new file +0 -0
new file mode 100644
index 000000000..e1ae5f76f

include/lapi/syscalls/blacklist-syscalls.txt line 3

Quoted 3 lines
include/lapi/syscalls/blacklist-syscalls.txt new file +3 -0
@@ -0,0 +1,6 @@
+arch_specific_syscall
+available
+ni_syscall

Overall I like v3, it appears to correct many mistakes we made manually.

But I'm not sure we want to blacklist "ni_syscall" entries. It's still a valid syscall number, and the define is still provided in kernel headers.

If we have a test for syscall, that upstream deprecates, the test would become unbuildable after we update syscalls with this script (which drops the define).

Quoted 7 lines
Quoted 3 lines

Regards,
Jan

This is a good point. So your suggestion is to keep all syscalls defined in blacklist-syscalls.txt available anyway, or just the ni_syscall definition? At this point I would just drop the blacklist-syscalls.txt file and keep all defined syscalls for the LTP syscalls backorts.

Sounds good, we can drop the blacklist.

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#6 lore raw

PATCH v3 3/4 Delete obsolete strip_syscall.awk file

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

---
 include/lapi/syscalls/strip_syscall.awk | 19 -------------------
 1 file changed, 19 deletions(-)
include/lapi/syscalls/strip_syscall.awk deleted +0 -19
deleted file mode 100755
index e8dff422e..000000000
@@ -1,19 +0,0 @@
-#!/usr/bin/awk -f
-#
-# Dumb script that can be used to strip all of the syscall information from
-# the arch-respective unistd*.h.
-#
-# Examples:
-#
-# 1. Grab the i386 32-bit syscalls from unistd_32.h and put them in i386.in
-# strip_syscall.awk arch/x86/include/asm/unistd_32.h > i386.in
-#
-
-/^#define[[:space:]]+__NR_[0-9a-z]+/ {
-
-	sub (/#define[[:space:]]+__NR_/, "", $0);
-	sub (/[[:space:]]*(\/\*.*)/, "", $0);
-	sub (/[[:space:]]+/, " ", $0);
-
-	print
-}
Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#7 lore raw

PATCH v3 4/4 Update syscalls files

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

Update syscalls .in files to the newest kernel development branch at commit 075dbe9f6e3c.

---
 include/lapi/syscalls/arc.in         |  41 +-
 include/lapi/syscalls/arm.in         | 819 ++++++++++++++++++-----------------
 include/lapi/syscalls/arm64.in       |  18 +-
 include/lapi/syscalls/i386.in        |  18 +-
 include/lapi/syscalls/ia64.in        |  10 +-
 include/lapi/syscalls/loongarch64.in |  16 +-
 include/lapi/syscalls/mips64.in      |  13 +-
 include/lapi/syscalls/mips64n32.in   |  13 +-
 include/lapi/syscalls/mipso32.in     |  21 +-
 include/lapi/syscalls/parisc.in      | 373 +++++++++++++++-
 include/lapi/syscalls/powerpc.in     |  19 +-
 include/lapi/syscalls/powerpc64.in   |  47 +-
 include/lapi/syscalls/s390.in        |  15 +-
 include/lapi/syscalls/s390x.in       |  15 +-
 include/lapi/syscalls/sh.in          |  15 +-
 include/lapi/syscalls/sparc.in       |  14 +-
 include/lapi/syscalls/sparc64.in     |  16 +-
 include/lapi/syscalls/x86_64.in      |  51 +--
 18 files changed, 989 insertions(+), 545 deletions(-)
include/lapi/syscalls/arc.in +29 -12
index 752cc54fd..f680d4119 100644
@@ -23,7 +23,7 @@ epoll_ctl 21
 epoll_pwait 22
 dup 23
 dup3 24
-fcntl 25
+fcntl64 25
 inotify_init1 26
 inotify_add_watch 27
 inotify_rm_watch 28
@@ -41,10 +41,10 @@ umount2 39
 mount 40
 pivot_root 41
 nfsservctl 42
-statfs 43
-fstatfs 44
-truncate 45
-ftruncate 46
+statfs64 43
+fstatfs64 44
+truncate64 45
+ftruncate64 46
 fallocate 47
 faccessat 48
 chdir 49
@@ -60,7 +60,7 @@ vhangup 58
 pipe2 59
 quotactl 60
 getdents64 61
-lseek 62
+llseek 62
 read 63
 write 64
 readv 65
@@ -69,7 +69,7 @@ pread64 67
 pwrite64 68
 preadv 69
 pwritev 70
-sendfile 71
+sendfile64 71
 pselect6 72
 ppoll 73
 signalfd4 74
@@ -77,12 +77,11 @@ vmsplice 75
 splice 76
 tee 77
 readlinkat 78
-fstatat 79
-fstat 80
+fstatat64 79
+fstat64 80
 sync 81
 fsync 82
 fdatasync 83
-sync_file_range2 84
 sync_file_range 84
 timerfd_create 85
 timerfd_settime 86
@@ -221,8 +220,8 @@ request_key 218
 keyctl 219
 clone 220
 execve 221
-mmap 222
-fadvise64 223
+mmap2 222
+fadvise64_64 223
 swapon 224
 swapoff 225
 mprotect 226
@@ -261,6 +260,11 @@ sendmmsg 269
 process_vm_readv 270
 process_vm_writev 271
 kcmp 272
+finit_module 273
+sched_setattr 274
+sched_getattr 275
+renameat2 276
+seccomp 277
 getrandom 278
 memfd_create 279
 bpf 280
@@ -314,12 +318,25 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/arm.in +415 -404

819 lines not on this page · raw message

include/lapi/syscalls/arm64.in +15 -3
index 61d4450bf..be7e9df64 100644
@@ -77,12 +77,11 @@ vmsplice 75
 splice 76
 tee 77
 readlinkat 78
-fstatat 79
+newfstatat 79
 fstat 80
 sync 81
 fsync 82
 fdatasync 83
-sync_file_range2 84
 sync_file_range 84
 timerfd_create 85
 timerfd_settime 86
@@ -294,13 +293,26 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+memfd_secret 447
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
-_sysctl 1078
include/lapi/syscalls/i386.in +14 -4
index f6e8c7258..13f72e795 100644
@@ -111,7 +111,6 @@ olduname 109
 iopl 110
 vhangup 111
 idle 112
-vm86old 113
 wait4 114
 swapoff 115
 sysinfo 116
@@ -132,7 +131,6 @@ get_kernel_syms 130
 quotactl 131
 getpgid 132
 fchdir 133
-bdflush 134
 sysfs 135
 personality 136
 afs_syscall 137
@@ -164,7 +162,6 @@ nanosleep 162
 mremap 163
 setresuid 164
 getresuid 165
-vm86 166
 query_module 167
 poll 168
 nfsservctl 169
@@ -218,7 +215,6 @@ setfsgid32 216
 pivot_root 217
 mincore 218
 madvise 219
-madvise1 219
 getdents64 220
 fcntl64 221
 gettid 224
@@ -428,12 +424,26 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+memfd_secret 447
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/ia64.in +5 -5
index 8f55029a9..b958d4cd9 100644
@@ -18,6 +18,7 @@ lseek 1040
 getpid 1041
 getppid 1042
 mount 1043
+umount 1044
 umount2 1044
 setuid 1045
 getuid 1046
@@ -109,7 +110,6 @@ quotactl 1137
 bdflush 1138
 sysfs 1139
 personality 1140
-afs_syscall 1141
 setfsuid 1142
 setfsgid 1143
 getdents 1144
@@ -143,7 +143,6 @@ old_getpagesize 1171
 mmap2 1172
 pciconfig_read 1173
 pciconfig_write 1174
-perfmonctl 1175
 sigaltstack 1176
 rt_sigaction 1177
 rt_sigpending 1178
@@ -157,7 +156,6 @@ capget 1185
 capset 1186
 sendfile 1187
 getpmsg 1188
-putpmsg 1189
 socket 1190
 bind 1191
 connect 1192
@@ -237,7 +235,6 @@ mq_timedreceive 1265
 mq_notify 1266
 mq_getsetattr 1267
 kexec_load 1268
-vserver 1269
 waitid 1270
 add_key 1271
 request_key 1272
@@ -341,12 +338,15 @@ close_range 1460
 openat2 1461
 pidfd_getfd 1462
 faccessat2 1463
+process_madvise 1464
 epoll_pwait2 1465
+mount_setattr 1466
 quotactl_fd 1467
 landlock_create_ruleset 1468
 landlock_add_rule 1469
 landlock_restrict_self 1470
+process_mrelease 1472
 futex_waitv 1473
+set_mempolicy_home_node 1474
 cachestat 1475
 fchmodat2 1476
-mseal 1486
include/lapi/syscalls/loongarch64.in +10 -6
index 3df354fce..2c1ecd7ae 100644
@@ -36,7 +36,6 @@ mkdirat 34
 unlinkat 35
 symlinkat 36
 linkat 37
-renameat 38
 umount2 39
 mount 40
 pivot_root 41
@@ -77,12 +76,11 @@ vmsplice 75
 splice 76
 tee 77
 readlinkat 78
-fstatat 79
+newfstatat 79
 fstat 80
 sync 81
 fsync 82
 fdatasync 83
-sync_file_range2 84
 sync_file_range 84
 timerfd_create 85
 timerfd_settime 86
@@ -162,8 +160,6 @@ setgroups 159
 uname 160
 sethostname 161
 setdomainname 162
-getrlimit 163
-setrlimit 164
 getrusage 165
 umask 166
 prctl 167
@@ -301,10 +297,18 @@ quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
-memfd_secret 447
 process_mrelease 448
 futex_waitv 449
 set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/mips64.in +11 -2
index c34a85bbe..8be734158 100644
@@ -175,7 +175,6 @@ nfsservctl 5173
 getpmsg 5174
 putpmsg 5175
 afs_syscall 5176
-reserved177 5177
 gettid 5178
 readahead 5179
 setxattr 5180
@@ -191,7 +190,6 @@ removexattr 5189
 lremovexattr 5190
 fremovexattr 5191
 tkill 5192
-reserved193 5193
 futex 5194
 sched_setaffinity 5195
 sched_getaffinity 5196
@@ -349,7 +347,18 @@ quotactl_fd 5443
 landlock_create_ruleset 5444
 landlock_add_rule 5445
 landlock_restrict_self 5446
+process_mrelease 5448
 futex_waitv 5449
+set_mempolicy_home_node 5450
 cachestat 5451
 fchmodat2 5452
+map_shadow_stack 5453
+futex_wake 5454
+futex_wait 5455
+futex_requeue 5456
+statmount 5457
+listmount 5458
+lsm_get_self_attr 5459
+lsm_set_self_attr 5460
+lsm_list_modules 5461
 mseal 5462
include/lapi/syscalls/mips64n32.in +11 -2
index d85c567c7..153fe50bf 100644
@@ -175,7 +175,6 @@ nfsservctl 6173
 getpmsg 6174
 putpmsg 6175
 afs_syscall 6176
-reserved177 6177
 gettid 6178
 readahead 6179
 setxattr 6180
@@ -191,7 +190,6 @@ removexattr 6189
 lremovexattr 6190
 fremovexattr 6191
 tkill 6192
-reserved193 6193
 futex 6194
 sched_setaffinity 6195
 sched_getaffinity 6196
@@ -373,7 +371,18 @@ quotactl_fd 6443
 landlock_create_ruleset 6444
 landlock_add_rule 6445
 landlock_restrict_self 6446
+process_mrelease 6448
 futex_waitv 6449
+set_mempolicy_home_node 6450
 cachestat 6451
 fchmodat2 6452
+map_shadow_stack 6453
+futex_wake 6454
+futex_wait 6455
+futex_requeue 6456
+statmount 6457
+listmount 6458
+lsm_get_self_attr 6459
+lsm_set_self_attr 6460
+lsm_list_modules 6461
 mseal 6462
include/lapi/syscalls/mipso32.in +11 -10
index 10d77787b..570419fa1 100644
@@ -16,7 +16,6 @@ mknod 4014
 chmod 4015
 lchown 4016
 break 4017
-unused18 4018
 lseek 4019
 getpid 4020
 mount 4021
@@ -26,7 +25,6 @@ getuid 4024
 stime 4025
 ptrace 4026
 alarm 4027
-unused28 4028
 pause 4029
 utime 4030
 stty 4031
@@ -57,7 +55,6 @@ fcntl 4055
 mpx 4056
 setpgid 4057
 ulimit 4058
-unused59 4059
 umask 4060
 chroot 4061
 ustat 4062
@@ -80,9 +77,7 @@ gettimeofday 4078
 settimeofday 4079
 getgroups 4080
 setgroups 4081
-reserved82 4082
 symlink 4083
-unused84 4084
 readlink 4085
 uselib 4086
 swapon 4087
@@ -107,11 +102,9 @@ getitimer 4105
 stat 4106
 lstat 4107
 fstat 4108
-unused109 4109
 iopl 4110
 vhangup 4111
 idle 4112
-vm86 4113
 wait4 4114
 swapoff 4115
 sysinfo 4116
@@ -132,7 +125,6 @@ get_kernel_syms 4130
 quotactl 4131
 getpgid 4132
 fchdir 4133
-bdflush 4134
 sysfs 4135
 personality 4136
 afs_syscall 4137
@@ -148,7 +140,6 @@ writev 4146
 cacheflush 4147
 cachectl 4148
 sysmips 4149
-unused150 4150
 getsid 4151
 fdatasync 4152
 _sysctl 4153
@@ -219,7 +210,6 @@ mincore 4217
 madvise 4218
 getdents64 4219
 fcntl64 4220
-reserved221 4221
 gettid 4222
 readahead 4223
 setxattr 4224
@@ -419,7 +409,18 @@ quotactl_fd 4443
 landlock_create_ruleset 4444
 landlock_add_rule 4445
 landlock_restrict_self 4446
+process_mrelease 4448
 futex_waitv 4449
+set_mempolicy_home_node 4450
 cachestat 4451
 fchmodat2 4452
+map_shadow_stack 4453
+futex_wake 4454
+futex_wait 4455
+futex_requeue 4456
+statmount 4457
+listmount 4458
+lsm_get_self_attr 4459
+lsm_set_self_attr 4460
+lsm_list_modules 4461
 mseal 4462
include/lapi/syscalls/parisc.in +359 -14

406 lines not on this page · raw message

include/lapi/syscalls/powerpc.in +13 -6
index af3ae5c90..faaa75883 100644
@@ -111,7 +111,6 @@ olduname 109
 iopl 110
 vhangup 111
 idle 112
-vm86 113
 wait4 114
 swapoff 115
 sysinfo 116
@@ -132,7 +131,6 @@ get_kernel_syms 130
 quotactl 131
 getpgid 132
 fchdir 133
-bdflush 134
 sysfs 135
 personality 136
 afs_syscall 137
@@ -199,7 +197,6 @@ fstat64 197
 pciconfig_read 198
 pciconfig_write 199
 pciconfig_iobase 200
-multiplexer 201
 getdents64 202
 pivot_root 203
 fcntl64 204
@@ -253,7 +250,6 @@ statfs64 252
 fstatfs64 253
 fadvise64_64 254
 rtas 255
-sys_debug_setcontext 256
 migrate_pages 258
 mbind 259
 get_mempolicy 260
@@ -287,7 +283,6 @@ mkdirat 287
 mknodat 288
 fchownat 289
 futimesat 290
-newfstatat 291
 fstatat64 291
 unlinkat 292
 renameat 293
@@ -374,7 +369,6 @@ pkey_free 385
 pkey_mprotect 386
 rseq 387
 io_pgetevents 388
-semtimedop 392
 semget 393
 semctl 394
 shmget 395
@@ -421,12 +415,25 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/powerpc64.in +13 -34

107 lines not on this page · raw message

include/lapi/syscalls/s390.in +14 -1
index e8e7fff0b..69d7408b7 100644
@@ -112,7 +112,6 @@ get_kernel_syms 130
 quotactl 131
 getpgid 132
 fchdir 133
-bdflush 134
 sysfs 135
 personality 136
 afs_syscall 137
@@ -408,12 +407,26 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+memfd_secret 447
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/s390x.in +14 -1
index 0ee3bd897..fa98054c7 100644
@@ -96,7 +96,6 @@ get_kernel_syms 130
 quotactl 131
 getpgid 132
 fchdir 133
-bdflush 134
 sysfs 135
 personality 136
 afs_syscall 137
@@ -356,12 +355,26 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+memfd_secret 447
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/sh.in +14 -1
index 5701f2285..2e584253c 100644
@@ -115,7 +115,6 @@ delete_module 129
 quotactl 131
 getpgid 132
 fchdir 133
-bdflush 134
 sysfs 135
 personality 136
 setfsuid 138
@@ -357,6 +356,7 @@ pkey_mprotect 384
 pkey_alloc 385
 pkey_free 386
 rseq 387
+sync_file_range2 388
 semget 393
 semctl 394
 shmget 395
@@ -402,12 +402,25 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/sparc.in +13 -1
index 172969f60..fcdb9b812 100644
@@ -221,7 +221,6 @@ create_module 221
 delete_module 222
 get_kernel_syms 223
 getpgid 224
-bdflush 225
 sysfs 226
 afs_syscall 227
 setfsuid 228
@@ -407,12 +406,25 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/sparc64.in +13 -3
index 5b667f10f..4256aaf77 100644
@@ -29,8 +29,6 @@ alarm 27
 sigaltstack 28
 pause 29
 utime 30
-lchown32 31
-fchown32 32
 access 33
 nice 34
 sync 36
@@ -206,7 +204,6 @@ create_module 221
 delete_module 222
 get_kernel_syms 223
 getpgid 224
-bdflush 225
 sysfs 226
 afs_syscall 227
 setfsuid 228
@@ -372,12 +369,25 @@ close_range 436
 openat2 437
 pidfd_getfd 438
 faccessat2 439
+process_madvise 440
 epoll_pwait2 441
+mount_setattr 442
 quotactl_fd 443
 landlock_create_ruleset 444
 landlock_add_rule 445
 landlock_restrict_self 446
+process_mrelease 448
 futex_waitv 449
+set_mempolicy_home_node 450
 cachestat 451
 fchmodat2 452
+map_shadow_stack 453
+futex_wake 454
+futex_wait 455
+futex_requeue 456
+statmount 457
+listmount 458
+lsm_get_self_attr 459
+lsm_set_self_attr 460
+lsm_list_modules 461
 mseal 462
include/lapi/syscalls/x86_64.in +15 -36

69 lines not on this page · raw message

Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp