diff -Nru libseccomp-2.4.3/CHANGELOG libseccomp-2.5.1/CHANGELOG --- libseccomp-2.4.3/CHANGELOG 2020-03-03 03:58:40.058107971 +1030 +++ libseccomp-2.5.1/CHANGELOG 2020-11-17 10:01:58.811574715 +1030 @@ -2,6 +2,35 @@ =============================================================================== https://github.com/seccomp/libseccomp +* Version 2.5.1 - November 20, 2020 +- Fix a bug where seccomp_load() could only be called once +- Change the notification fd handling to only request a notification fd if + the filter has a _NOTIFY action +- Add documentation about SCMP_ACT_NOTIFY to the seccomp_add_rule(3) manpage +- Clarify the maintainers' GPG keys + +* Version 2.5.0 - July 20, 2020 +- Add support for the seccomp user notifications, see the + seccomp_notify_alloc(3), seccomp_notify_receive(3), seccomp_notify_respond(3) + manpages for more information +- Add support for new filter optimization approaches, including a balanced tree + optimization, see the SCMP_FLTATR_CTL_OPTIMIZE filter attribute for more + information +- Add support for the 64-bit RISC-V architecture +- Performance improvements when adding new rules to a filter thanks to the use + of internal shadow transactions and improved syscall lookup tables +- Properly document the libseccomp API return values and include them in the + stable API promise +- Improvements to the s390 and s390x multiplexed syscall handling +- Multiple fixes and improvements to the libseccomp manpages +- Moved from manually maintained syscall tables to an automatically generated + syscall table in CSV format +- Update the syscall tables to Linux v5.8.0-rc5 +- Python bindings and build now default to Python 3.x +- Improvements to the tests have boosted code coverage to over 93% +- Enable Travis CI testing on the aarch64 and ppc64le architectures +- Add code inspection via lgtm.com + * Version 2.4.3 - March 4, 2020 - Add list of authorized release signatures to README.md - Fix multiplexing issue with s390/s390x shm* syscalls diff -Nru libseccomp-2.4.3/CONTRIBUTING.md libseccomp-2.5.1/CONTRIBUTING.md --- libseccomp-2.4.3/CONTRIBUTING.md 2020-03-03 02:49:57.855374588 +1030 +++ libseccomp-2.5.1/CONTRIBUTING.md 2020-11-17 08:34:59.763209755 +1030 @@ -8,7 +8,7 @@ should have a much easier time getting your work merged with the upstream project. -## Test Your Code +## Test Your Code Using Existing Tests There are three possible tests you can run to verify your code. The first test is used to check the formatting and coding style of your changes, you @@ -38,7 +38,7 @@ ... if there are any faults or errors they will be displayed. -## Make Sure Your Code is Tested +## Add New Tests for New Functionality The libseccomp code includes a fairly extensive test suite and any submissions which add functionality, or significantly change the existing code, should @@ -50,29 +50,6 @@ the "check-code-coverage" make target. Additional details on generating code coverage information can be found in the .travis.yml file. -## Generate the Patch(es) - -Depending on how you decided to work with the libseccomp code base and what -tools you are using there are different ways to generate your patch(es). -However, regardless of what tools you use, you should always generate your -patches using the "unified" diff/patch format and the patches should always -apply to the libseccomp source tree using the following command from the top -directory of the libseccomp sources: - - # patch -p1 < changes.patch - -If you are not using git, stacked git (stgit), or some other tool which can -generate patch files for you automatically, you may find the following command -helpful in generating patches, where "libseccomp.orig/" is the unmodified -source code directory and "libseccomp/" is the source code directory with your -changes: - - # diff -purN libseccomp.orig/ libseccomp/ - -When in doubt please generate your patch and try applying it to an unmodified -copy of the libseccomp sources; if it fails for you, it will fail for the rest -of us. - ## Explain Your Work At the top of every patch you should include a description of the problem you @@ -120,7 +97,37 @@ Signed-off-by: Random J Developer -## Email Your Patch(es) +You can add this to your commit description in `git` with `git commit -s` + +## Post Your Patches Upstream + +The libseccomp project accepts both GitHub pull requests and patches sent via +the mailing list. GitHub pull requests are preferred. This sections below +explain how to contribute via either method. Please read each step and perform +all steps that apply to your chosen contribution method. + +### Submitting via Email + +Depending on how you decided to work with the libseccomp code base and what +tools you are using there are different ways to generate your patch(es). +However, regardless of what tools you use, you should always generate your +patches using the "unified" diff/patch format and the patches should always +apply to the libseccomp source tree using the following command from the top +directory of the libseccomp sources: + + # patch -p1 < changes.patch + +If you are not using git, stacked git (stgit), or some other tool which can +generate patch files for you automatically, you may find the following command +helpful in generating patches, where "libseccomp.orig/" is the unmodified +source code directory and "libseccomp/" is the source code directory with your +changes: + + # diff -purN libseccomp.orig/ libseccomp/ + +When in doubt please generate your patch and try applying it to an unmodified +copy of the libseccomp sources; if it fails for you, it will fail for the rest +of us. Finally, you will need to email your patches to the mailing list so they can be reviewed and potentially merged into the main libseccomp repository. When @@ -132,3 +139,7 @@ yourself an email with your patch and attempting to apply the emailed patch to the libseccomp repository; if it fails for you, it will fail for the rest of us trying to test your patch and include it in the main libseccomp repository. + +### Submitting via GitHub + +See [this guide](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) if you've never done this before. diff -Nru libseccomp-2.4.3/CREDITS libseccomp-2.5.1/CREDITS --- libseccomp-2.4.3/CREDITS 2020-03-03 03:44:08.813783903 +1030 +++ libseccomp-2.5.1/CREDITS 2020-11-17 09:21:08.133273022 +1030 @@ -2,11 +2,14 @@ ======================================================================== https://github.com/seccomp/libseccomp +Alex Murray +Andreas Schwab Andrew Jones Andy Lutomirski Ashley Lai Bogdan Purcareata Brian Cain +Christopher Waldon Chris Waldon Colin Walters Corey Bryant @@ -16,6 +19,7 @@ Fabrice Fontaine Felix Abecassis Felix Geyer +Giuseppe Scrivano Heiko Carstens Helge Deller Jake Edge @@ -25,25 +29,32 @@ Jay Guo Jiannan Guo Joe MacDonald +Jonah Petri Justin Cormack Kees Cook Kyle R. Conway +Kenta Tada Luca Bruno Marcin Juszkiewicz Marcus Meissner Markos Chandras Mathias Krause Michael Forney +Michael Karcher Mike Frysinger Mike Strosaker Miroslav Lichvar Paul Moore +Rodrigo Campos +Rolf Eike Beer +Samanta Navarro Serge Hallyn Stéphane Graber Stephen Coleman Thiago Marcos P. Santos Tobias Klauser Tom Hromatka +Tudor Brindus Tycho Andersen Tyler Hicks valoq diff -Nru libseccomp-2.4.3/Makefile.in libseccomp-2.5.1/Makefile.in --- libseccomp-2.4.3/Makefile.in 2020-03-03 04:15:52.985766451 +1030 +++ libseccomp-2.5.1/Makefile.in 2020-11-17 10:17:44.786797302 +1030 @@ -296,6 +296,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -362,13 +363,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ diff -Nru libseccomp-2.4.3/README.md libseccomp-2.5.1/README.md --- libseccomp-2.4.3/README.md 2020-03-03 02:13:34.185033115 +1030 +++ libseccomp-2.5.1/README.md 2020-11-17 08:34:38.777027338 +1030 @@ -1,10 +1,11 @@ -![Enhanced Seccomp Helper Library](https://github.com/seccomp/libseccomp-artwork/blob/master/logo/libseccomp-color_text.png) +![Enhanced Seccomp Helper Library](https://github.com/seccomp/libseccomp-artwork/blob/main/logo/libseccomp-color_text.png) =============================================================================== https://github.com/seccomp/libseccomp [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/608/badge)](https://bestpractices.coreinfrastructure.org/projects/608) [![Build Status](https://img.shields.io/travis/seccomp/libseccomp/master.svg)](https://travis-ci.org/seccomp/libseccomp) [![Coverage Status](https://img.shields.io/coveralls/github/seccomp/libseccomp/master.svg)](https://coveralls.io/github/seccomp/libseccomp?branch=master) +[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/seccomp/libseccomp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/seccomp/libseccomp/context:cpp) The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism. The libseccomp API is @@ -52,6 +53,7 @@ * 64-bit PowerPC little endian (ppc64le) * 32-bit s390 (s390) * 64-bit s390x (s390x) +* 64-bit RISC-V (riscv64) ## Documentation @@ -72,8 +74,8 @@ # gpg --verify file.asc file -At present, only the following keys are authorized to sign official libseccomp -releases: +At present, only the following keys, specified via the fingerprints below, are +authorized to sign official libseccomp releases: Paul Moore 7100 AADF AE6E 6E94 0D2E 0AD6 55E4 5A5A E8CA 7C8A @@ -81,6 +83,8 @@ Tom Hromatka 47A6 8FCE 37C7 D702 4FD6 5E11 356C E62C 2B52 4099 +More information on GnuPG can be found at their website, https://gnupg.org. + ## Building and Installing the Library If you are building the libseccomp library from an official release tarball, diff -Nru libseccomp-2.4.3/configure libseccomp-2.5.1/configure --- libseccomp-2.4.3/configure 2020-03-03 04:15:52.372769020 +1030 +++ libseccomp-2.5.1/configure 2020-11-17 10:17:44.147791748 +1030 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libseccomp 2.4.3. +# Generated by GNU Autoconf 2.69 for libseccomp 2.5.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libseccomp' PACKAGE_TARNAME='libseccomp' -PACKAGE_VERSION='2.4.3' -PACKAGE_STRING='libseccomp 2.4.3' +PACKAGE_VERSION='2.5.1' +PACKAGE_STRING='libseccomp 2.5.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -648,6 +648,7 @@ COVERITY_FALSE COVERITY_TRUE have_coverity +GPERF ENABLE_PYTHON_FALSE ENABLE_PYTHON_TRUE pkgpyexecdir @@ -659,7 +660,7 @@ PYTHON_PREFIX PYTHON_VERSION PYTHON -have_cython +cython VERSION_MICRO VERSION_MINOR VERSION_MAJOR @@ -1347,7 +1348,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libseccomp 2.4.3 to adapt to many kinds of systems. +\`configure' configures libseccomp 2.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1417,7 +1418,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libseccomp 2.4.3:";; + short | recursive ) echo "Configuration of libseccomp 2.5.1:";; esac cat <<\_ACEOF @@ -1531,7 +1532,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libseccomp configure 2.4.3 +libseccomp configure 2.5.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1809,7 +1810,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libseccomp $as_me 2.4.3, which was +It was created by libseccomp $as_me 2.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2679,7 +2680,7 @@ # Define the identity of the package. PACKAGE='libseccomp' - VERSION='2.4.3' + VERSION='2.5.1' cat >>confdefs.h <<_ACEOF @@ -12181,8 +12182,8 @@ AM_BACKSLASH='\' -AM_CPPFLAGS="-I\${top_srcdir}/include" -AM_CFLAGS="-Wall" +AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include" +AM_CFLAGS="-Wall -Umips" AM_LDFLAGS="-Wl,-z -Wl,relro" @@ -12216,15 +12217,17 @@ -# Extract the first word of "cython", so it can be a program name with args. -set dummy cython; ac_word=$2 +for ac_prog in cython3 cython +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_have_cython+:} false; then : +if ${ac_cv_prog_cython+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$have_cython"; then - ac_cv_prog_have_cython="$have_cython" # Let the user override the test. + if test -n "$cython"; then + ac_cv_prog_cython="$cython" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -12233,7 +12236,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_have_cython=""yes"" + ac_cv_prog_cython="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12241,24 +12244,27 @@ done IFS=$as_save_IFS - test -z "$ac_cv_prog_have_cython" && ac_cv_prog_have_cython=""no"" fi fi -have_cython=$ac_cv_prog_have_cython -if test -n "$have_cython"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_cython" >&5 -$as_echo "$have_cython" >&6; } +cython=$ac_cv_prog_cython +if test -n "$cython"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cython" >&5 +$as_echo "$cython" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test "$have_cython" = yes; then : + test -n "$cython" && break +done +test -n "$cython" || cython=""no"" - $as_echo "checking cython version... $(cython -V 2>&1 | cut -d' ' -f 3)" - CYTHON_VER_MAJ=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1); - CYTHON_VER_MIN=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2); +if test "$cython" != no; then : + + $as_echo "checking cython version... $($cython -V 2>&1 | cut -d' ' -f 3)" + CYTHON_VER_MAJ=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1); + CYTHON_VER_MIN=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2); else @@ -12286,12 +12292,69 @@ - # Find any Python interpreter. - if test -z "$PYTHON"; then - for ac_prog in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3" >&5 +$as_echo_n "checking whether $PYTHON version is >= 3... " >&6; } + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 + ($PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 +fi + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3" >&5 +$as_echo_n "checking for a Python interpreter with version >= 3... " >&6; } +if ${am_cv_pathless_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for am_cv_pathless_PYTHON in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + test "$am_cv_pathless_PYTHON" = none && break + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 + ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then : + break +fi + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 +$as_echo "$am_cv_pathless_PYTHON" >&6; } + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. +set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : @@ -12330,12 +12393,9 @@ fi - test -n "$PYTHON" && break -done -test -n "$PYTHON" || PYTHON=":" - + fi + am_display_PYTHON=$am_cv_pathless_PYTHON fi - am_display_PYTHON=python if test "$PYTHON" = :; then @@ -12503,6 +12563,102 @@ _ACEOF +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gperf", so it can be a program name with args. +set dummy ${ac_tool_prefix}gperf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GPERF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GPERF"; then + ac_cv_prog_GPERF="$GPERF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GPERF="${ac_tool_prefix}gperf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GPERF=$ac_cv_prog_GPERF +if test -n "$GPERF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPERF" >&5 +$as_echo "$GPERF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GPERF"; then + ac_ct_GPERF=$GPERF + # Extract the first word of "gperf", so it can be a program name with args. +set dummy gperf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GPERF+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GPERF"; then + ac_cv_prog_ac_ct_GPERF="$ac_ct_GPERF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GPERF="gperf" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_GPERF=$ac_cv_prog_ac_ct_GPERF +if test -n "$ac_ct_GPERF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GPERF" >&5 +$as_echo "$ac_ct_GPERF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GPERF" = x; then + GPERF="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GPERF=$ac_ct_GPERF + fi +else + GPERF="$ac_cv_prog_GPERF" +fi + +if test -z "$GPERF"; then + as_fn_error $? "please install gperf" "$LINENO" 5 +fi + # Extract the first word of "cov-build", so it can be a program name with args. set dummy cov-build; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -13469,7 +13625,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libseccomp $as_me 2.4.3, which was +This file was extended by libseccomp $as_me 2.5.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13535,7 +13691,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libseccomp config.status 2.4.3 +libseccomp config.status 2.5.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru libseccomp-2.4.3/configure.ac libseccomp-2.5.1/configure.ac --- libseccomp-2.4.3/configure.ac 2020-03-03 04:00:19.313687552 +1030 +++ libseccomp-2.5.1/configure.ac 2020-11-17 10:03:43.291482888 +1030 @@ -19,7 +19,7 @@ dnl #### dnl libseccomp defines dnl #### -AC_INIT([libseccomp], [2.4.3]) +AC_INIT([libseccomp], [2.5.1]) dnl #### dnl autoconf configuration @@ -65,9 +65,11 @@ dnl #### dnl build flags +dnl NOTE: the '-Umips' is here because MIPS GCC compilers "helpfully" define it +dnl for us which wreaks havoc on the build dnl #### -AM_CPPFLAGS="-I\${top_srcdir}/include" -AM_CFLAGS="-Wall" +AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include" +AM_CFLAGS="-Wall -Umips" AM_LDFLAGS="-Wl,-z -Wl,relro" AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_CFLAGS]) @@ -91,11 +93,11 @@ dnl #### dnl cython checks dnl #### -AC_CHECK_PROG(have_cython, cython, "yes", "no") -AS_IF([test "$have_cython" = yes], [ - AS_ECHO("checking cython version... $(cython -V 2>&1 | cut -d' ' -f 3)") - CYTHON_VER_MAJ=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1); - CYTHON_VER_MIN=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2); +AC_CHECK_PROGS(cython, cython3 cython, "no") +AS_IF([test "$cython" != no], [ + AS_ECHO("checking cython version... $($cython -V 2>&1 | cut -d' ' -f 3)") + CYTHON_VER_MAJ=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1); + CYTHON_VER_MIN=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2); ],[ CYTHON_VER_MAJ=0 CYTHON_VER_MIN=0 @@ -112,13 +114,18 @@ AS_IF([test "$CYTHON_VER_MAJ" -eq 0 -a "$CYTHON_VER_MIN" -lt 29], [ AC_MSG_ERROR([python bindings require cython 0.29 or higher]) ]) - AM_PATH_PYTHON + AM_PATH_PYTHON([3]) ]) AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes]) AC_DEFINE_UNQUOTED([ENABLE_PYTHON], [$(test "$enable_python" = yes && echo 1 || echo 0)], [Python bindings build flag.]) +AC_CHECK_TOOL(GPERF, gperf) +if test -z "$GPERF"; then + AC_MSG_ERROR([please install gperf]) +fi + dnl #### dnl coverity checks dnl #### diff -Nru libseccomp-2.4.3/debian/changelog libseccomp-2.5.1/debian/changelog --- libseccomp-2.4.3/debian/changelog 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/changelog 2021-03-01 13:49:23.000000000 +1030 @@ -1,3 +1,22 @@ +libseccomp (2.5.1-1ubuntu1~18.04.1) bionic; urgency=medium + + * Updated to new upstream 2.5.1 version for updated syscalls support + (LP: #1891810) + - Removed the following patches that are now included in the new version: + + d/p/fix-aarch64-syscalls.patch + + d/p/db-consolidate-some-of-the-code-which-adds-rules.patch + + d/p/db-add-shadow-transactions.patch + - Deleted the patch to add a local copy of architecture specific header + files from linux-libc-dev/focal as this is not needed anymore + + d/p/add-5.4-local-syscall-headers.patch + - debian/control: Added gperf to Build-Depends as this is now required + by upstream + - debian/libseccomp2.symbols: Added new symbols + * Add system call headers for powerpc required for backport to xenial + - d/p/add-5.8-powerpc-syscall-headers.patch + + -- Alex Murray Mon, 01 Mar 2021 13:49:23 +1030 + libseccomp (2.4.3-1ubuntu3.18.04.3) bionic; urgency=medium * d/p/db-consolidate-some-of-the-code-which-adds-rules.patch diff -Nru libseccomp-2.4.3/debian/control libseccomp-2.5.1/debian/control --- libseccomp-2.4.3/debian/control 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/control 2020-12-09 22:27:08.000000000 +1030 @@ -4,7 +4,7 @@ Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Kees Cook Uploaders: Luca Bruno -Build-Depends: debhelper (>= 9), dh-autoreconf, linux-libc-dev, valgrind +Build-Depends: debhelper (>= 9), dh-autoreconf, linux-libc-dev, valgrind, gperf Standards-Version: 3.9.7 Homepage: https://github.com/seccomp/libseccomp Vcs-Git: https://anonscm.debian.org/git/collab-maint/libseccomp.git diff -Nru libseccomp-2.4.3/debian/libseccomp2.symbols libseccomp-2.5.1/debian/libseccomp2.symbols --- libseccomp-2.4.3/debian/libseccomp2.symbols 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/libseccomp2.symbols 2020-12-09 22:27:02.000000000 +1030 @@ -26,3 +26,9 @@ seccomp_arch_resolve_name@Base 2.2.1 seccomp_syscall_resolve_name_rewrite@Base 2.2.1 seccomp_version@Base 2.3.0 + seccomp_notify_alloc@Base 2.5.0 + seccomp_notify_fd@Base 2.5.0 + seccomp_notify_free@Base 2.5.0 + seccomp_notify_id_valid@Base 2.5.0 + seccomp_notify_receive@Base 2.5.0 + seccomp_notify_respond@Base 2.5.0 diff -Nru libseccomp-2.4.3/debian/patches/add-5.4-local-syscall-headers.patch libseccomp-2.5.1/debian/patches/add-5.4-local-syscall-headers.patch --- libseccomp-2.4.3/debian/patches/add-5.4-local-syscall-headers.patch 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/add-5.4-local-syscall-headers.patch 1970-01-01 09:30:00.000000000 +0930 @@ -1,6205 +0,0 @@ ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -92,6 +92,8 @@ check_PROGRAMS = \ - 50-sim-hash_collision \ - 52-basic-load - -+CPPFLAGS = -I$(top_srcdir)/tests/include/$(build_triplet) ${AM_CPPFLAGS} -+ - EXTRA_DIST_TESTPYTHON = \ - util.py \ - 01-sim-allow.py \ ---- /dev/null -+++ b/tests/include/powerpc64le-unknown-linux-gnu/asm/unistd.h -@@ -0,0 +1,19 @@ -+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -+/* -+ * This file contains the system call numbers. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version -+ * 2 of the License, or (at your option) any later version. -+ */ -+#ifndef _ASM_POWERPC_UNISTD_H_ -+#define _ASM_POWERPC_UNISTD_H_ -+ -+#ifndef __powerpc64__ -+#include -+#else -+#include -+#endif -+ -+#endif /* _ASM_POWERPC_UNISTD_H_ */ ---- /dev/null -+++ b/tests/include/powerpc64le-unknown-linux-gnu/asm/unistd_32.h -@@ -0,0 +1,423 @@ -+#ifndef _ASM_POWERPC_UNISTD_32_H -+#define _ASM_POWERPC_UNISTD_32_H -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_query_module 166 -+#define __NR_poll 167 -+#define __NR_nfsservctl 168 -+#define __NR_setresgid 169 -+#define __NR_getresgid 170 -+#define __NR_prctl 171 -+#define __NR_rt_sigreturn 172 -+#define __NR_rt_sigaction 173 -+#define __NR_rt_sigprocmask 174 -+#define __NR_rt_sigpending 175 -+#define __NR_rt_sigtimedwait 176 -+#define __NR_rt_sigqueueinfo 177 -+#define __NR_rt_sigsuspend 178 -+#define __NR_pread64 179 -+#define __NR_pwrite64 180 -+#define __NR_chown 181 -+#define __NR_getcwd 182 -+#define __NR_capget 183 -+#define __NR_capset 184 -+#define __NR_sigaltstack 185 -+#define __NR_sendfile 186 -+#define __NR_getpmsg 187 -+#define __NR_putpmsg 188 -+#define __NR_vfork 189 -+#define __NR_ugetrlimit 190 -+#define __NR_readahead 191 -+#define __NR_mmap2 192 -+#define __NR_truncate64 193 -+#define __NR_ftruncate64 194 -+#define __NR_stat64 195 -+#define __NR_lstat64 196 -+#define __NR_fstat64 197 -+#define __NR_pciconfig_read 198 -+#define __NR_pciconfig_write 199 -+#define __NR_pciconfig_iobase 200 -+#define __NR_multiplexer 201 -+#define __NR_getdents64 202 -+#define __NR_pivot_root 203 -+#define __NR_fcntl64 204 -+#define __NR_madvise 205 -+#define __NR_mincore 206 -+#define __NR_gettid 207 -+#define __NR_tkill 208 -+#define __NR_setxattr 209 -+#define __NR_lsetxattr 210 -+#define __NR_fsetxattr 211 -+#define __NR_getxattr 212 -+#define __NR_lgetxattr 213 -+#define __NR_fgetxattr 214 -+#define __NR_listxattr 215 -+#define __NR_llistxattr 216 -+#define __NR_flistxattr 217 -+#define __NR_removexattr 218 -+#define __NR_lremovexattr 219 -+#define __NR_fremovexattr 220 -+#define __NR_futex 221 -+#define __NR_sched_setaffinity 222 -+#define __NR_sched_getaffinity 223 -+#define __NR_tuxcall 225 -+#define __NR_sendfile64 226 -+#define __NR_io_setup 227 -+#define __NR_io_destroy 228 -+#define __NR_io_getevents 229 -+#define __NR_io_submit 230 -+#define __NR_io_cancel 231 -+#define __NR_set_tid_address 232 -+#define __NR_fadvise64 233 -+#define __NR_exit_group 234 -+#define __NR_lookup_dcookie 235 -+#define __NR_epoll_create 236 -+#define __NR_epoll_ctl 237 -+#define __NR_epoll_wait 238 -+#define __NR_remap_file_pages 239 -+#define __NR_timer_create 240 -+#define __NR_timer_settime 241 -+#define __NR_timer_gettime 242 -+#define __NR_timer_getoverrun 243 -+#define __NR_timer_delete 244 -+#define __NR_clock_settime 245 -+#define __NR_clock_gettime 246 -+#define __NR_clock_getres 247 -+#define __NR_clock_nanosleep 248 -+#define __NR_swapcontext 249 -+#define __NR_tgkill 250 -+#define __NR_utimes 251 -+#define __NR_statfs64 252 -+#define __NR_fstatfs64 253 -+#define __NR_fadvise64_64 254 -+#define __NR_rtas 255 -+#define __NR_sys_debug_setcontext 256 -+#define __NR_migrate_pages 258 -+#define __NR_mbind 259 -+#define __NR_get_mempolicy 260 -+#define __NR_set_mempolicy 261 -+#define __NR_mq_open 262 -+#define __NR_mq_unlink 263 -+#define __NR_mq_timedsend 264 -+#define __NR_mq_timedreceive 265 -+#define __NR_mq_notify 266 -+#define __NR_mq_getsetattr 267 -+#define __NR_kexec_load 268 -+#define __NR_add_key 269 -+#define __NR_request_key 270 -+#define __NR_keyctl 271 -+#define __NR_waitid 272 -+#define __NR_ioprio_set 273 -+#define __NR_ioprio_get 274 -+#define __NR_inotify_init 275 -+#define __NR_inotify_add_watch 276 -+#define __NR_inotify_rm_watch 277 -+#define __NR_spu_run 278 -+#define __NR_spu_create 279 -+#define __NR_pselect6 280 -+#define __NR_ppoll 281 -+#define __NR_unshare 282 -+#define __NR_splice 283 -+#define __NR_tee 284 -+#define __NR_vmsplice 285 -+#define __NR_openat 286 -+#define __NR_mkdirat 287 -+#define __NR_mknodat 288 -+#define __NR_fchownat 289 -+#define __NR_futimesat 290 -+#define __NR_fstatat64 291 -+#define __NR_unlinkat 292 -+#define __NR_renameat 293 -+#define __NR_linkat 294 -+#define __NR_symlinkat 295 -+#define __NR_readlinkat 296 -+#define __NR_fchmodat 297 -+#define __NR_faccessat 298 -+#define __NR_get_robust_list 299 -+#define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd_create 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 -+#define __NR_subpage_prot 310 -+#define __NR_timerfd_settime 311 -+#define __NR_timerfd_gettime 312 -+#define __NR_signalfd4 313 -+#define __NR_eventfd2 314 -+#define __NR_epoll_create1 315 -+#define __NR_dup3 316 -+#define __NR_pipe2 317 -+#define __NR_inotify_init1 318 -+#define __NR_perf_event_open 319 -+#define __NR_preadv 320 -+#define __NR_pwritev 321 -+#define __NR_rt_tgsigqueueinfo 322 -+#define __NR_fanotify_init 323 -+#define __NR_fanotify_mark 324 -+#define __NR_prlimit64 325 -+#define __NR_socket 326 -+#define __NR_bind 327 -+#define __NR_connect 328 -+#define __NR_listen 329 -+#define __NR_accept 330 -+#define __NR_getsockname 331 -+#define __NR_getpeername 332 -+#define __NR_socketpair 333 -+#define __NR_send 334 -+#define __NR_sendto 335 -+#define __NR_recv 336 -+#define __NR_recvfrom 337 -+#define __NR_shutdown 338 -+#define __NR_setsockopt 339 -+#define __NR_getsockopt 340 -+#define __NR_sendmsg 341 -+#define __NR_recvmsg 342 -+#define __NR_recvmmsg 343 -+#define __NR_accept4 344 -+#define __NR_name_to_handle_at 345 -+#define __NR_open_by_handle_at 346 -+#define __NR_clock_adjtime 347 -+#define __NR_syncfs 348 -+#define __NR_sendmmsg 349 -+#define __NR_setns 350 -+#define __NR_process_vm_readv 351 -+#define __NR_process_vm_writev 352 -+#define __NR_finit_module 353 -+#define __NR_kcmp 354 -+#define __NR_sched_setattr 355 -+#define __NR_sched_getattr 356 -+#define __NR_renameat2 357 -+#define __NR_seccomp 358 -+#define __NR_getrandom 359 -+#define __NR_memfd_create 360 -+#define __NR_bpf 361 -+#define __NR_execveat 362 -+#define __NR_switch_endian 363 -+#define __NR_userfaultfd 364 -+#define __NR_membarrier 365 -+#define __NR_mlock2 378 -+#define __NR_copy_file_range 379 -+#define __NR_preadv2 380 -+#define __NR_pwritev2 381 -+#define __NR_kexec_file_load 382 -+#define __NR_statx 383 -+#define __NR_pkey_alloc 384 -+#define __NR_pkey_free 385 -+#define __NR_pkey_mprotect 386 -+#define __NR_rseq 387 -+#define __NR_io_pgetevents 388 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_clock_gettime64 403 -+#define __NR_clock_settime64 404 -+#define __NR_clock_adjtime64 405 -+#define __NR_clock_getres_time64 406 -+#define __NR_clock_nanosleep_time64 407 -+#define __NR_timer_gettime64 408 -+#define __NR_timer_settime64 409 -+#define __NR_timerfd_gettime64 410 -+#define __NR_timerfd_settime64 411 -+#define __NR_utimensat_time64 412 -+#define __NR_pselect6_time64 413 -+#define __NR_ppoll_time64 414 -+#define __NR_io_pgetevents_time64 416 -+#define __NR_recvmmsg_time64 417 -+#define __NR_mq_timedsend_time64 418 -+#define __NR_mq_timedreceive_time64 419 -+#define __NR_semtimedop_time64 420 -+#define __NR_rt_sigtimedwait_time64 421 -+#define __NR_futex_time64 422 -+#define __NR_sched_rr_get_interval_time64 423 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+ -+#endif /* _ASM_POWERPC_UNISTD_32_H */ ---- /dev/null -+++ b/tests/include/powerpc64le-unknown-linux-gnu/asm/unistd_64.h -@@ -0,0 +1,395 @@ -+#ifndef _ASM_POWERPC_UNISTD_64_H -+#define _ASM_POWERPC_UNISTD_64_H -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_query_module 166 -+#define __NR_poll 167 -+#define __NR_nfsservctl 168 -+#define __NR_setresgid 169 -+#define __NR_getresgid 170 -+#define __NR_prctl 171 -+#define __NR_rt_sigreturn 172 -+#define __NR_rt_sigaction 173 -+#define __NR_rt_sigprocmask 174 -+#define __NR_rt_sigpending 175 -+#define __NR_rt_sigtimedwait 176 -+#define __NR_rt_sigqueueinfo 177 -+#define __NR_rt_sigsuspend 178 -+#define __NR_pread64 179 -+#define __NR_pwrite64 180 -+#define __NR_chown 181 -+#define __NR_getcwd 182 -+#define __NR_capget 183 -+#define __NR_capset 184 -+#define __NR_sigaltstack 185 -+#define __NR_sendfile 186 -+#define __NR_getpmsg 187 -+#define __NR_putpmsg 188 -+#define __NR_vfork 189 -+#define __NR_ugetrlimit 190 -+#define __NR_readahead 191 -+#define __NR_pciconfig_read 198 -+#define __NR_pciconfig_write 199 -+#define __NR_pciconfig_iobase 200 -+#define __NR_multiplexer 201 -+#define __NR_getdents64 202 -+#define __NR_pivot_root 203 -+#define __NR_madvise 205 -+#define __NR_mincore 206 -+#define __NR_gettid 207 -+#define __NR_tkill 208 -+#define __NR_setxattr 209 -+#define __NR_lsetxattr 210 -+#define __NR_fsetxattr 211 -+#define __NR_getxattr 212 -+#define __NR_lgetxattr 213 -+#define __NR_fgetxattr 214 -+#define __NR_listxattr 215 -+#define __NR_llistxattr 216 -+#define __NR_flistxattr 217 -+#define __NR_removexattr 218 -+#define __NR_lremovexattr 219 -+#define __NR_fremovexattr 220 -+#define __NR_futex 221 -+#define __NR_sched_setaffinity 222 -+#define __NR_sched_getaffinity 223 -+#define __NR_tuxcall 225 -+#define __NR_io_setup 227 -+#define __NR_io_destroy 228 -+#define __NR_io_getevents 229 -+#define __NR_io_submit 230 -+#define __NR_io_cancel 231 -+#define __NR_set_tid_address 232 -+#define __NR_fadvise64 233 -+#define __NR_exit_group 234 -+#define __NR_lookup_dcookie 235 -+#define __NR_epoll_create 236 -+#define __NR_epoll_ctl 237 -+#define __NR_epoll_wait 238 -+#define __NR_remap_file_pages 239 -+#define __NR_timer_create 240 -+#define __NR_timer_settime 241 -+#define __NR_timer_gettime 242 -+#define __NR_timer_getoverrun 243 -+#define __NR_timer_delete 244 -+#define __NR_clock_settime 245 -+#define __NR_clock_gettime 246 -+#define __NR_clock_getres 247 -+#define __NR_clock_nanosleep 248 -+#define __NR_swapcontext 249 -+#define __NR_tgkill 250 -+#define __NR_utimes 251 -+#define __NR_statfs64 252 -+#define __NR_fstatfs64 253 -+#define __NR_rtas 255 -+#define __NR_sys_debug_setcontext 256 -+#define __NR_migrate_pages 258 -+#define __NR_mbind 259 -+#define __NR_get_mempolicy 260 -+#define __NR_set_mempolicy 261 -+#define __NR_mq_open 262 -+#define __NR_mq_unlink 263 -+#define __NR_mq_timedsend 264 -+#define __NR_mq_timedreceive 265 -+#define __NR_mq_notify 266 -+#define __NR_mq_getsetattr 267 -+#define __NR_kexec_load 268 -+#define __NR_add_key 269 -+#define __NR_request_key 270 -+#define __NR_keyctl 271 -+#define __NR_waitid 272 -+#define __NR_ioprio_set 273 -+#define __NR_ioprio_get 274 -+#define __NR_inotify_init 275 -+#define __NR_inotify_add_watch 276 -+#define __NR_inotify_rm_watch 277 -+#define __NR_spu_run 278 -+#define __NR_spu_create 279 -+#define __NR_pselect6 280 -+#define __NR_ppoll 281 -+#define __NR_unshare 282 -+#define __NR_splice 283 -+#define __NR_tee 284 -+#define __NR_vmsplice 285 -+#define __NR_openat 286 -+#define __NR_mkdirat 287 -+#define __NR_mknodat 288 -+#define __NR_fchownat 289 -+#define __NR_futimesat 290 -+#define __NR_newfstatat 291 -+#define __NR_unlinkat 292 -+#define __NR_renameat 293 -+#define __NR_linkat 294 -+#define __NR_symlinkat 295 -+#define __NR_readlinkat 296 -+#define __NR_fchmodat 297 -+#define __NR_faccessat 298 -+#define __NR_get_robust_list 299 -+#define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd_create 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 -+#define __NR_subpage_prot 310 -+#define __NR_timerfd_settime 311 -+#define __NR_timerfd_gettime 312 -+#define __NR_signalfd4 313 -+#define __NR_eventfd2 314 -+#define __NR_epoll_create1 315 -+#define __NR_dup3 316 -+#define __NR_pipe2 317 -+#define __NR_inotify_init1 318 -+#define __NR_perf_event_open 319 -+#define __NR_preadv 320 -+#define __NR_pwritev 321 -+#define __NR_rt_tgsigqueueinfo 322 -+#define __NR_fanotify_init 323 -+#define __NR_fanotify_mark 324 -+#define __NR_prlimit64 325 -+#define __NR_socket 326 -+#define __NR_bind 327 -+#define __NR_connect 328 -+#define __NR_listen 329 -+#define __NR_accept 330 -+#define __NR_getsockname 331 -+#define __NR_getpeername 332 -+#define __NR_socketpair 333 -+#define __NR_send 334 -+#define __NR_sendto 335 -+#define __NR_recv 336 -+#define __NR_recvfrom 337 -+#define __NR_shutdown 338 -+#define __NR_setsockopt 339 -+#define __NR_getsockopt 340 -+#define __NR_sendmsg 341 -+#define __NR_recvmsg 342 -+#define __NR_recvmmsg 343 -+#define __NR_accept4 344 -+#define __NR_name_to_handle_at 345 -+#define __NR_open_by_handle_at 346 -+#define __NR_clock_adjtime 347 -+#define __NR_syncfs 348 -+#define __NR_sendmmsg 349 -+#define __NR_setns 350 -+#define __NR_process_vm_readv 351 -+#define __NR_process_vm_writev 352 -+#define __NR_finit_module 353 -+#define __NR_kcmp 354 -+#define __NR_sched_setattr 355 -+#define __NR_sched_getattr 356 -+#define __NR_renameat2 357 -+#define __NR_seccomp 358 -+#define __NR_getrandom 359 -+#define __NR_memfd_create 360 -+#define __NR_bpf 361 -+#define __NR_execveat 362 -+#define __NR_switch_endian 363 -+#define __NR_userfaultfd 364 -+#define __NR_membarrier 365 -+#define __NR_mlock2 378 -+#define __NR_copy_file_range 379 -+#define __NR_preadv2 380 -+#define __NR_pwritev2 381 -+#define __NR_kexec_file_load 382 -+#define __NR_statx 383 -+#define __NR_pkey_alloc 384 -+#define __NR_pkey_free 385 -+#define __NR_pkey_mprotect 386 -+#define __NR_rseq 387 -+#define __NR_io_pgetevents 388 -+#define __NR_semtimedop 392 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+ -+#endif /* _ASM_POWERPC_UNISTD_64_H */ ---- /dev/null -+++ b/tests/include/s390x-ibm-linux-gnu/asm/unistd.h -@@ -0,0 +1,17 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+/* -+ * S390 version -+ * -+ * Derived from "include/asm-i386/unistd.h" -+ */ -+ -+#ifndef _ASM_S390_UNISTD_H_ -+#define _ASM_S390_UNISTD_H_ -+ -+#ifdef __s390x__ -+#include -+#else -+#include -+#endif -+ -+#endif /* _ASM_S390_UNISTD_H_ */ ---- /dev/null -+++ b/tests/include/s390x-ibm-linux-gnu/asm/unistd_32.h -@@ -0,0 +1,412 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#ifndef _ASM_S390_UNISTD_32_H -+#define _ASM_S390_UNISTD_32_H -+ -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_restart_syscall 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_setpgid 57 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_symlink 83 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_lookup_dcookie 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_query_module 167 -+#define __NR_poll 168 -+#define __NR_nfsservctl 169 -+#define __NR_setresgid 170 -+#define __NR_getresgid 171 -+#define __NR_prctl 172 -+#define __NR_rt_sigreturn 173 -+#define __NR_rt_sigaction 174 -+#define __NR_rt_sigprocmask 175 -+#define __NR_rt_sigpending 176 -+#define __NR_rt_sigtimedwait 177 -+#define __NR_rt_sigqueueinfo 178 -+#define __NR_rt_sigsuspend 179 -+#define __NR_pread64 180 -+#define __NR_pwrite64 181 -+#define __NR_chown 182 -+#define __NR_getcwd 183 -+#define __NR_capget 184 -+#define __NR_capset 185 -+#define __NR_sigaltstack 186 -+#define __NR_sendfile 187 -+#define __NR_getpmsg 188 -+#define __NR_putpmsg 189 -+#define __NR_vfork 190 -+#define __NR_ugetrlimit 191 -+#define __NR_mmap2 192 -+#define __NR_truncate64 193 -+#define __NR_ftruncate64 194 -+#define __NR_stat64 195 -+#define __NR_lstat64 196 -+#define __NR_fstat64 197 -+#define __NR_lchown32 198 -+#define __NR_getuid32 199 -+#define __NR_getgid32 200 -+#define __NR_geteuid32 201 -+#define __NR_getegid32 202 -+#define __NR_setreuid32 203 -+#define __NR_setregid32 204 -+#define __NR_getgroups32 205 -+#define __NR_setgroups32 206 -+#define __NR_fchown32 207 -+#define __NR_setresuid32 208 -+#define __NR_getresuid32 209 -+#define __NR_setresgid32 210 -+#define __NR_getresgid32 211 -+#define __NR_chown32 212 -+#define __NR_setuid32 213 -+#define __NR_setgid32 214 -+#define __NR_setfsuid32 215 -+#define __NR_setfsgid32 216 -+#define __NR_pivot_root 217 -+#define __NR_mincore 218 -+#define __NR_madvise 219 -+#define __NR_getdents64 220 -+#define __NR_fcntl64 221 -+#define __NR_readahead 222 -+#define __NR_sendfile64 223 -+#define __NR_setxattr 224 -+#define __NR_lsetxattr 225 -+#define __NR_fsetxattr 226 -+#define __NR_getxattr 227 -+#define __NR_lgetxattr 228 -+#define __NR_fgetxattr 229 -+#define __NR_listxattr 230 -+#define __NR_llistxattr 231 -+#define __NR_flistxattr 232 -+#define __NR_removexattr 233 -+#define __NR_lremovexattr 234 -+#define __NR_fremovexattr 235 -+#define __NR_gettid 236 -+#define __NR_tkill 237 -+#define __NR_futex 238 -+#define __NR_sched_setaffinity 239 -+#define __NR_sched_getaffinity 240 -+#define __NR_tgkill 241 -+#define __NR_io_setup 243 -+#define __NR_io_destroy 244 -+#define __NR_io_getevents 245 -+#define __NR_io_submit 246 -+#define __NR_io_cancel 247 -+#define __NR_exit_group 248 -+#define __NR_epoll_create 249 -+#define __NR_epoll_ctl 250 -+#define __NR_epoll_wait 251 -+#define __NR_set_tid_address 252 -+#define __NR_fadvise64 253 -+#define __NR_timer_create 254 -+#define __NR_timer_settime 255 -+#define __NR_timer_gettime 256 -+#define __NR_timer_getoverrun 257 -+#define __NR_timer_delete 258 -+#define __NR_clock_settime 259 -+#define __NR_clock_gettime 260 -+#define __NR_clock_getres 261 -+#define __NR_clock_nanosleep 262 -+#define __NR_fadvise64_64 264 -+#define __NR_statfs64 265 -+#define __NR_fstatfs64 266 -+#define __NR_remap_file_pages 267 -+#define __NR_mbind 268 -+#define __NR_get_mempolicy 269 -+#define __NR_set_mempolicy 270 -+#define __NR_mq_open 271 -+#define __NR_mq_unlink 272 -+#define __NR_mq_timedsend 273 -+#define __NR_mq_timedreceive 274 -+#define __NR_mq_notify 275 -+#define __NR_mq_getsetattr 276 -+#define __NR_kexec_load 277 -+#define __NR_add_key 278 -+#define __NR_request_key 279 -+#define __NR_keyctl 280 -+#define __NR_waitid 281 -+#define __NR_ioprio_set 282 -+#define __NR_ioprio_get 283 -+#define __NR_inotify_init 284 -+#define __NR_inotify_add_watch 285 -+#define __NR_inotify_rm_watch 286 -+#define __NR_migrate_pages 287 -+#define __NR_openat 288 -+#define __NR_mkdirat 289 -+#define __NR_mknodat 290 -+#define __NR_fchownat 291 -+#define __NR_futimesat 292 -+#define __NR_fstatat64 293 -+#define __NR_unlinkat 294 -+#define __NR_renameat 295 -+#define __NR_linkat 296 -+#define __NR_symlinkat 297 -+#define __NR_readlinkat 298 -+#define __NR_fchmodat 299 -+#define __NR_faccessat 300 -+#define __NR_pselect6 301 -+#define __NR_ppoll 302 -+#define __NR_unshare 303 -+#define __NR_set_robust_list 304 -+#define __NR_get_robust_list 305 -+#define __NR_splice 306 -+#define __NR_sync_file_range 307 -+#define __NR_tee 308 -+#define __NR_vmsplice 309 -+#define __NR_move_pages 310 -+#define __NR_getcpu 311 -+#define __NR_epoll_pwait 312 -+#define __NR_utimes 313 -+#define __NR_fallocate 314 -+#define __NR_utimensat 315 -+#define __NR_signalfd 316 -+#define __NR_timerfd 317 -+#define __NR_eventfd 318 -+#define __NR_timerfd_create 319 -+#define __NR_timerfd_settime 320 -+#define __NR_timerfd_gettime 321 -+#define __NR_signalfd4 322 -+#define __NR_eventfd2 323 -+#define __NR_inotify_init1 324 -+#define __NR_pipe2 325 -+#define __NR_dup3 326 -+#define __NR_epoll_create1 327 -+#define __NR_preadv 328 -+#define __NR_pwritev 329 -+#define __NR_rt_tgsigqueueinfo 330 -+#define __NR_perf_event_open 331 -+#define __NR_fanotify_init 332 -+#define __NR_fanotify_mark 333 -+#define __NR_prlimit64 334 -+#define __NR_name_to_handle_at 335 -+#define __NR_open_by_handle_at 336 -+#define __NR_clock_adjtime 337 -+#define __NR_syncfs 338 -+#define __NR_setns 339 -+#define __NR_process_vm_readv 340 -+#define __NR_process_vm_writev 341 -+#define __NR_s390_runtime_instr 342 -+#define __NR_kcmp 343 -+#define __NR_finit_module 344 -+#define __NR_sched_setattr 345 -+#define __NR_sched_getattr 346 -+#define __NR_renameat2 347 -+#define __NR_seccomp 348 -+#define __NR_getrandom 349 -+#define __NR_memfd_create 350 -+#define __NR_bpf 351 -+#define __NR_s390_pci_mmio_write 352 -+#define __NR_s390_pci_mmio_read 353 -+#define __NR_execveat 354 -+#define __NR_userfaultfd 355 -+#define __NR_membarrier 356 -+#define __NR_recvmmsg 357 -+#define __NR_sendmmsg 358 -+#define __NR_socket 359 -+#define __NR_socketpair 360 -+#define __NR_bind 361 -+#define __NR_connect 362 -+#define __NR_listen 363 -+#define __NR_accept4 364 -+#define __NR_getsockopt 365 -+#define __NR_setsockopt 366 -+#define __NR_getsockname 367 -+#define __NR_getpeername 368 -+#define __NR_sendto 369 -+#define __NR_sendmsg 370 -+#define __NR_recvfrom 371 -+#define __NR_recvmsg 372 -+#define __NR_shutdown 373 -+#define __NR_mlock2 374 -+#define __NR_copy_file_range 375 -+#define __NR_preadv2 376 -+#define __NR_pwritev2 377 -+#define __NR_s390_guarded_storage 378 -+#define __NR_statx 379 -+#define __NR_s390_sthyi 380 -+#define __NR_kexec_file_load 381 -+#define __NR_io_pgetevents 382 -+#define __NR_rseq 383 -+#define __NR_pkey_mprotect 384 -+#define __NR_pkey_alloc 385 -+#define __NR_pkey_free 386 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_clock_gettime64 403 -+#define __NR_clock_settime64 404 -+#define __NR_clock_adjtime64 405 -+#define __NR_clock_getres_time64 406 -+#define __NR_clock_nanosleep_time64 407 -+#define __NR_timer_gettime64 408 -+#define __NR_timer_settime64 409 -+#define __NR_timerfd_gettime64 410 -+#define __NR_timerfd_settime64 411 -+#define __NR_utimensat_time64 412 -+#define __NR_pselect6_time64 413 -+#define __NR_ppoll_time64 414 -+#define __NR_io_pgetevents_time64 416 -+#define __NR_recvmmsg_time64 417 -+#define __NR_mq_timedsend_time64 418 -+#define __NR_mq_timedreceive_time64 419 -+#define __NR_semtimedop_time64 420 -+#define __NR_rt_sigtimedwait_time64 421 -+#define __NR_futex_time64 422 -+#define __NR_sched_rr_get_interval_time64 423 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_S390_UNISTD_32_H */ ---- /dev/null -+++ b/tests/include/s390x-ibm-linux-gnu/asm/unistd_64.h -@@ -0,0 +1,360 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#ifndef _ASM_S390_UNISTD_64_H -+#define _ASM_S390_UNISTD_64_H -+ -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_restart_syscall 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_brk 45 -+#define __NR_signal 48 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_setpgid 57 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_symlink 83 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_lookup_dcookie 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_getdents 141 -+#define __NR_select 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_query_module 167 -+#define __NR_poll 168 -+#define __NR_nfsservctl 169 -+#define __NR_prctl 172 -+#define __NR_rt_sigreturn 173 -+#define __NR_rt_sigaction 174 -+#define __NR_rt_sigprocmask 175 -+#define __NR_rt_sigpending 176 -+#define __NR_rt_sigtimedwait 177 -+#define __NR_rt_sigqueueinfo 178 -+#define __NR_rt_sigsuspend 179 -+#define __NR_pread64 180 -+#define __NR_pwrite64 181 -+#define __NR_getcwd 183 -+#define __NR_capget 184 -+#define __NR_capset 185 -+#define __NR_sigaltstack 186 -+#define __NR_sendfile 187 -+#define __NR_getpmsg 188 -+#define __NR_putpmsg 189 -+#define __NR_vfork 190 -+#define __NR_getrlimit 191 -+#define __NR_lchown 198 -+#define __NR_getuid 199 -+#define __NR_getgid 200 -+#define __NR_geteuid 201 -+#define __NR_getegid 202 -+#define __NR_setreuid 203 -+#define __NR_setregid 204 -+#define __NR_getgroups 205 -+#define __NR_setgroups 206 -+#define __NR_fchown 207 -+#define __NR_setresuid 208 -+#define __NR_getresuid 209 -+#define __NR_setresgid 210 -+#define __NR_getresgid 211 -+#define __NR_chown 212 -+#define __NR_setuid 213 -+#define __NR_setgid 214 -+#define __NR_setfsuid 215 -+#define __NR_setfsgid 216 -+#define __NR_pivot_root 217 -+#define __NR_mincore 218 -+#define __NR_madvise 219 -+#define __NR_getdents64 220 -+#define __NR_readahead 222 -+#define __NR_setxattr 224 -+#define __NR_lsetxattr 225 -+#define __NR_fsetxattr 226 -+#define __NR_getxattr 227 -+#define __NR_lgetxattr 228 -+#define __NR_fgetxattr 229 -+#define __NR_listxattr 230 -+#define __NR_llistxattr 231 -+#define __NR_flistxattr 232 -+#define __NR_removexattr 233 -+#define __NR_lremovexattr 234 -+#define __NR_fremovexattr 235 -+#define __NR_gettid 236 -+#define __NR_tkill 237 -+#define __NR_futex 238 -+#define __NR_sched_setaffinity 239 -+#define __NR_sched_getaffinity 240 -+#define __NR_tgkill 241 -+#define __NR_io_setup 243 -+#define __NR_io_destroy 244 -+#define __NR_io_getevents 245 -+#define __NR_io_submit 246 -+#define __NR_io_cancel 247 -+#define __NR_exit_group 248 -+#define __NR_epoll_create 249 -+#define __NR_epoll_ctl 250 -+#define __NR_epoll_wait 251 -+#define __NR_set_tid_address 252 -+#define __NR_fadvise64 253 -+#define __NR_timer_create 254 -+#define __NR_timer_settime 255 -+#define __NR_timer_gettime 256 -+#define __NR_timer_getoverrun 257 -+#define __NR_timer_delete 258 -+#define __NR_clock_settime 259 -+#define __NR_clock_gettime 260 -+#define __NR_clock_getres 261 -+#define __NR_clock_nanosleep 262 -+#define __NR_statfs64 265 -+#define __NR_fstatfs64 266 -+#define __NR_remap_file_pages 267 -+#define __NR_mbind 268 -+#define __NR_get_mempolicy 269 -+#define __NR_set_mempolicy 270 -+#define __NR_mq_open 271 -+#define __NR_mq_unlink 272 -+#define __NR_mq_timedsend 273 -+#define __NR_mq_timedreceive 274 -+#define __NR_mq_notify 275 -+#define __NR_mq_getsetattr 276 -+#define __NR_kexec_load 277 -+#define __NR_add_key 278 -+#define __NR_request_key 279 -+#define __NR_keyctl 280 -+#define __NR_waitid 281 -+#define __NR_ioprio_set 282 -+#define __NR_ioprio_get 283 -+#define __NR_inotify_init 284 -+#define __NR_inotify_add_watch 285 -+#define __NR_inotify_rm_watch 286 -+#define __NR_migrate_pages 287 -+#define __NR_openat 288 -+#define __NR_mkdirat 289 -+#define __NR_mknodat 290 -+#define __NR_fchownat 291 -+#define __NR_futimesat 292 -+#define __NR_newfstatat 293 -+#define __NR_unlinkat 294 -+#define __NR_renameat 295 -+#define __NR_linkat 296 -+#define __NR_symlinkat 297 -+#define __NR_readlinkat 298 -+#define __NR_fchmodat 299 -+#define __NR_faccessat 300 -+#define __NR_pselect6 301 -+#define __NR_ppoll 302 -+#define __NR_unshare 303 -+#define __NR_set_robust_list 304 -+#define __NR_get_robust_list 305 -+#define __NR_splice 306 -+#define __NR_sync_file_range 307 -+#define __NR_tee 308 -+#define __NR_vmsplice 309 -+#define __NR_move_pages 310 -+#define __NR_getcpu 311 -+#define __NR_epoll_pwait 312 -+#define __NR_utimes 313 -+#define __NR_fallocate 314 -+#define __NR_utimensat 315 -+#define __NR_signalfd 316 -+#define __NR_timerfd 317 -+#define __NR_eventfd 318 -+#define __NR_timerfd_create 319 -+#define __NR_timerfd_settime 320 -+#define __NR_timerfd_gettime 321 -+#define __NR_signalfd4 322 -+#define __NR_eventfd2 323 -+#define __NR_inotify_init1 324 -+#define __NR_pipe2 325 -+#define __NR_dup3 326 -+#define __NR_epoll_create1 327 -+#define __NR_preadv 328 -+#define __NR_pwritev 329 -+#define __NR_rt_tgsigqueueinfo 330 -+#define __NR_perf_event_open 331 -+#define __NR_fanotify_init 332 -+#define __NR_fanotify_mark 333 -+#define __NR_prlimit64 334 -+#define __NR_name_to_handle_at 335 -+#define __NR_open_by_handle_at 336 -+#define __NR_clock_adjtime 337 -+#define __NR_syncfs 338 -+#define __NR_setns 339 -+#define __NR_process_vm_readv 340 -+#define __NR_process_vm_writev 341 -+#define __NR_s390_runtime_instr 342 -+#define __NR_kcmp 343 -+#define __NR_finit_module 344 -+#define __NR_sched_setattr 345 -+#define __NR_sched_getattr 346 -+#define __NR_renameat2 347 -+#define __NR_seccomp 348 -+#define __NR_getrandom 349 -+#define __NR_memfd_create 350 -+#define __NR_bpf 351 -+#define __NR_s390_pci_mmio_write 352 -+#define __NR_s390_pci_mmio_read 353 -+#define __NR_execveat 354 -+#define __NR_userfaultfd 355 -+#define __NR_membarrier 356 -+#define __NR_recvmmsg 357 -+#define __NR_sendmmsg 358 -+#define __NR_socket 359 -+#define __NR_socketpair 360 -+#define __NR_bind 361 -+#define __NR_connect 362 -+#define __NR_listen 363 -+#define __NR_accept4 364 -+#define __NR_getsockopt 365 -+#define __NR_setsockopt 366 -+#define __NR_getsockname 367 -+#define __NR_getpeername 368 -+#define __NR_sendto 369 -+#define __NR_sendmsg 370 -+#define __NR_recvfrom 371 -+#define __NR_recvmsg 372 -+#define __NR_shutdown 373 -+#define __NR_mlock2 374 -+#define __NR_copy_file_range 375 -+#define __NR_preadv2 376 -+#define __NR_pwritev2 377 -+#define __NR_s390_guarded_storage 378 -+#define __NR_statx 379 -+#define __NR_s390_sthyi 380 -+#define __NR_kexec_file_load 381 -+#define __NR_io_pgetevents 382 -+#define __NR_rseq 383 -+#define __NR_pkey_mprotect 384 -+#define __NR_pkey_alloc 385 -+#define __NR_pkey_free 386 -+#define __NR_semtimedop 392 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_S390_UNISTD_64_H */ ---- /dev/null -+++ b/tests/include/arm-unknown-linux-gnueabihf/asm/unistd-common.h -@@ -0,0 +1,394 @@ -+#ifndef _ASM_ARM_UNISTD_COMMON_H -+#define _ASM_ARM_UNISTD_COMMON_H 1 -+ -+#define __NR_restart_syscall (__NR_SYSCALL_BASE + 0) -+#define __NR_exit (__NR_SYSCALL_BASE + 1) -+#define __NR_fork (__NR_SYSCALL_BASE + 2) -+#define __NR_read (__NR_SYSCALL_BASE + 3) -+#define __NR_write (__NR_SYSCALL_BASE + 4) -+#define __NR_open (__NR_SYSCALL_BASE + 5) -+#define __NR_close (__NR_SYSCALL_BASE + 6) -+#define __NR_creat (__NR_SYSCALL_BASE + 8) -+#define __NR_link (__NR_SYSCALL_BASE + 9) -+#define __NR_unlink (__NR_SYSCALL_BASE + 10) -+#define __NR_execve (__NR_SYSCALL_BASE + 11) -+#define __NR_chdir (__NR_SYSCALL_BASE + 12) -+#define __NR_mknod (__NR_SYSCALL_BASE + 14) -+#define __NR_chmod (__NR_SYSCALL_BASE + 15) -+#define __NR_lchown (__NR_SYSCALL_BASE + 16) -+#define __NR_lseek (__NR_SYSCALL_BASE + 19) -+#define __NR_getpid (__NR_SYSCALL_BASE + 20) -+#define __NR_mount (__NR_SYSCALL_BASE + 21) -+#define __NR_setuid (__NR_SYSCALL_BASE + 23) -+#define __NR_getuid (__NR_SYSCALL_BASE + 24) -+#define __NR_ptrace (__NR_SYSCALL_BASE + 26) -+#define __NR_pause (__NR_SYSCALL_BASE + 29) -+#define __NR_access (__NR_SYSCALL_BASE + 33) -+#define __NR_nice (__NR_SYSCALL_BASE + 34) -+#define __NR_sync (__NR_SYSCALL_BASE + 36) -+#define __NR_kill (__NR_SYSCALL_BASE + 37) -+#define __NR_rename (__NR_SYSCALL_BASE + 38) -+#define __NR_mkdir (__NR_SYSCALL_BASE + 39) -+#define __NR_rmdir (__NR_SYSCALL_BASE + 40) -+#define __NR_dup (__NR_SYSCALL_BASE + 41) -+#define __NR_pipe (__NR_SYSCALL_BASE + 42) -+#define __NR_times (__NR_SYSCALL_BASE + 43) -+#define __NR_brk (__NR_SYSCALL_BASE + 45) -+#define __NR_setgid (__NR_SYSCALL_BASE + 46) -+#define __NR_getgid (__NR_SYSCALL_BASE + 47) -+#define __NR_geteuid (__NR_SYSCALL_BASE + 49) -+#define __NR_getegid (__NR_SYSCALL_BASE + 50) -+#define __NR_acct (__NR_SYSCALL_BASE + 51) -+#define __NR_umount2 (__NR_SYSCALL_BASE + 52) -+#define __NR_ioctl (__NR_SYSCALL_BASE + 54) -+#define __NR_fcntl (__NR_SYSCALL_BASE + 55) -+#define __NR_setpgid (__NR_SYSCALL_BASE + 57) -+#define __NR_umask (__NR_SYSCALL_BASE + 60) -+#define __NR_chroot (__NR_SYSCALL_BASE + 61) -+#define __NR_ustat (__NR_SYSCALL_BASE + 62) -+#define __NR_dup2 (__NR_SYSCALL_BASE + 63) -+#define __NR_getppid (__NR_SYSCALL_BASE + 64) -+#define __NR_getpgrp (__NR_SYSCALL_BASE + 65) -+#define __NR_setsid (__NR_SYSCALL_BASE + 66) -+#define __NR_sigaction (__NR_SYSCALL_BASE + 67) -+#define __NR_setreuid (__NR_SYSCALL_BASE + 70) -+#define __NR_setregid (__NR_SYSCALL_BASE + 71) -+#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72) -+#define __NR_sigpending (__NR_SYSCALL_BASE + 73) -+#define __NR_sethostname (__NR_SYSCALL_BASE + 74) -+#define __NR_setrlimit (__NR_SYSCALL_BASE + 75) -+#define __NR_getrusage (__NR_SYSCALL_BASE + 77) -+#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78) -+#define __NR_settimeofday (__NR_SYSCALL_BASE + 79) -+#define __NR_getgroups (__NR_SYSCALL_BASE + 80) -+#define __NR_setgroups (__NR_SYSCALL_BASE + 81) -+#define __NR_symlink (__NR_SYSCALL_BASE + 83) -+#define __NR_readlink (__NR_SYSCALL_BASE + 85) -+#define __NR_uselib (__NR_SYSCALL_BASE + 86) -+#define __NR_swapon (__NR_SYSCALL_BASE + 87) -+#define __NR_reboot (__NR_SYSCALL_BASE + 88) -+#define __NR_munmap (__NR_SYSCALL_BASE + 91) -+#define __NR_truncate (__NR_SYSCALL_BASE + 92) -+#define __NR_ftruncate (__NR_SYSCALL_BASE + 93) -+#define __NR_fchmod (__NR_SYSCALL_BASE + 94) -+#define __NR_fchown (__NR_SYSCALL_BASE + 95) -+#define __NR_getpriority (__NR_SYSCALL_BASE + 96) -+#define __NR_setpriority (__NR_SYSCALL_BASE + 97) -+#define __NR_statfs (__NR_SYSCALL_BASE + 99) -+#define __NR_fstatfs (__NR_SYSCALL_BASE + 100) -+#define __NR_syslog (__NR_SYSCALL_BASE + 103) -+#define __NR_setitimer (__NR_SYSCALL_BASE + 104) -+#define __NR_getitimer (__NR_SYSCALL_BASE + 105) -+#define __NR_stat (__NR_SYSCALL_BASE + 106) -+#define __NR_lstat (__NR_SYSCALL_BASE + 107) -+#define __NR_fstat (__NR_SYSCALL_BASE + 108) -+#define __NR_vhangup (__NR_SYSCALL_BASE + 111) -+#define __NR_wait4 (__NR_SYSCALL_BASE + 114) -+#define __NR_swapoff (__NR_SYSCALL_BASE + 115) -+#define __NR_sysinfo (__NR_SYSCALL_BASE + 116) -+#define __NR_fsync (__NR_SYSCALL_BASE + 118) -+#define __NR_sigreturn (__NR_SYSCALL_BASE + 119) -+#define __NR_clone (__NR_SYSCALL_BASE + 120) -+#define __NR_setdomainname (__NR_SYSCALL_BASE + 121) -+#define __NR_uname (__NR_SYSCALL_BASE + 122) -+#define __NR_adjtimex (__NR_SYSCALL_BASE + 124) -+#define __NR_mprotect (__NR_SYSCALL_BASE + 125) -+#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126) -+#define __NR_init_module (__NR_SYSCALL_BASE + 128) -+#define __NR_delete_module (__NR_SYSCALL_BASE + 129) -+#define __NR_quotactl (__NR_SYSCALL_BASE + 131) -+#define __NR_getpgid (__NR_SYSCALL_BASE + 132) -+#define __NR_fchdir (__NR_SYSCALL_BASE + 133) -+#define __NR_bdflush (__NR_SYSCALL_BASE + 134) -+#define __NR_sysfs (__NR_SYSCALL_BASE + 135) -+#define __NR_personality (__NR_SYSCALL_BASE + 136) -+#define __NR_setfsuid (__NR_SYSCALL_BASE + 138) -+#define __NR_setfsgid (__NR_SYSCALL_BASE + 139) -+#define __NR__llseek (__NR_SYSCALL_BASE + 140) -+#define __NR_getdents (__NR_SYSCALL_BASE + 141) -+#define __NR__newselect (__NR_SYSCALL_BASE + 142) -+#define __NR_flock (__NR_SYSCALL_BASE + 143) -+#define __NR_msync (__NR_SYSCALL_BASE + 144) -+#define __NR_readv (__NR_SYSCALL_BASE + 145) -+#define __NR_writev (__NR_SYSCALL_BASE + 146) -+#define __NR_getsid (__NR_SYSCALL_BASE + 147) -+#define __NR_fdatasync (__NR_SYSCALL_BASE + 148) -+#define __NR__sysctl (__NR_SYSCALL_BASE + 149) -+#define __NR_mlock (__NR_SYSCALL_BASE + 150) -+#define __NR_munlock (__NR_SYSCALL_BASE + 151) -+#define __NR_mlockall (__NR_SYSCALL_BASE + 152) -+#define __NR_munlockall (__NR_SYSCALL_BASE + 153) -+#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154) -+#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155) -+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156) -+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157) -+#define __NR_sched_yield (__NR_SYSCALL_BASE + 158) -+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159) -+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160) -+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161) -+#define __NR_nanosleep (__NR_SYSCALL_BASE + 162) -+#define __NR_mremap (__NR_SYSCALL_BASE + 163) -+#define __NR_setresuid (__NR_SYSCALL_BASE + 164) -+#define __NR_getresuid (__NR_SYSCALL_BASE + 165) -+#define __NR_poll (__NR_SYSCALL_BASE + 168) -+#define __NR_nfsservctl (__NR_SYSCALL_BASE + 169) -+#define __NR_setresgid (__NR_SYSCALL_BASE + 170) -+#define __NR_getresgid (__NR_SYSCALL_BASE + 171) -+#define __NR_prctl (__NR_SYSCALL_BASE + 172) -+#define __NR_rt_sigreturn (__NR_SYSCALL_BASE + 173) -+#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174) -+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175) -+#define __NR_rt_sigpending (__NR_SYSCALL_BASE + 176) -+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177) -+#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE + 178) -+#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE + 179) -+#define __NR_pread64 (__NR_SYSCALL_BASE + 180) -+#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181) -+#define __NR_chown (__NR_SYSCALL_BASE + 182) -+#define __NR_getcwd (__NR_SYSCALL_BASE + 183) -+#define __NR_capget (__NR_SYSCALL_BASE + 184) -+#define __NR_capset (__NR_SYSCALL_BASE + 185) -+#define __NR_sigaltstack (__NR_SYSCALL_BASE + 186) -+#define __NR_sendfile (__NR_SYSCALL_BASE + 187) -+#define __NR_vfork (__NR_SYSCALL_BASE + 190) -+#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191) -+#define __NR_mmap2 (__NR_SYSCALL_BASE + 192) -+#define __NR_truncate64 (__NR_SYSCALL_BASE + 193) -+#define __NR_ftruncate64 (__NR_SYSCALL_BASE + 194) -+#define __NR_stat64 (__NR_SYSCALL_BASE + 195) -+#define __NR_lstat64 (__NR_SYSCALL_BASE + 196) -+#define __NR_fstat64 (__NR_SYSCALL_BASE + 197) -+#define __NR_lchown32 (__NR_SYSCALL_BASE + 198) -+#define __NR_getuid32 (__NR_SYSCALL_BASE + 199) -+#define __NR_getgid32 (__NR_SYSCALL_BASE + 200) -+#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201) -+#define __NR_getegid32 (__NR_SYSCALL_BASE + 202) -+#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203) -+#define __NR_setregid32 (__NR_SYSCALL_BASE + 204) -+#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205) -+#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206) -+#define __NR_fchown32 (__NR_SYSCALL_BASE + 207) -+#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208) -+#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209) -+#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210) -+#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211) -+#define __NR_chown32 (__NR_SYSCALL_BASE + 212) -+#define __NR_setuid32 (__NR_SYSCALL_BASE + 213) -+#define __NR_setgid32 (__NR_SYSCALL_BASE + 214) -+#define __NR_setfsuid32 (__NR_SYSCALL_BASE + 215) -+#define __NR_setfsgid32 (__NR_SYSCALL_BASE + 216) -+#define __NR_getdents64 (__NR_SYSCALL_BASE + 217) -+#define __NR_pivot_root (__NR_SYSCALL_BASE + 218) -+#define __NR_mincore (__NR_SYSCALL_BASE + 219) -+#define __NR_madvise (__NR_SYSCALL_BASE + 220) -+#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221) -+#define __NR_gettid (__NR_SYSCALL_BASE + 224) -+#define __NR_readahead (__NR_SYSCALL_BASE + 225) -+#define __NR_setxattr (__NR_SYSCALL_BASE + 226) -+#define __NR_lsetxattr (__NR_SYSCALL_BASE + 227) -+#define __NR_fsetxattr (__NR_SYSCALL_BASE + 228) -+#define __NR_getxattr (__NR_SYSCALL_BASE + 229) -+#define __NR_lgetxattr (__NR_SYSCALL_BASE + 230) -+#define __NR_fgetxattr (__NR_SYSCALL_BASE + 231) -+#define __NR_listxattr (__NR_SYSCALL_BASE + 232) -+#define __NR_llistxattr (__NR_SYSCALL_BASE + 233) -+#define __NR_flistxattr (__NR_SYSCALL_BASE + 234) -+#define __NR_removexattr (__NR_SYSCALL_BASE + 235) -+#define __NR_lremovexattr (__NR_SYSCALL_BASE + 236) -+#define __NR_fremovexattr (__NR_SYSCALL_BASE + 237) -+#define __NR_tkill (__NR_SYSCALL_BASE + 238) -+#define __NR_sendfile64 (__NR_SYSCALL_BASE + 239) -+#define __NR_futex (__NR_SYSCALL_BASE + 240) -+#define __NR_sched_setaffinity (__NR_SYSCALL_BASE + 241) -+#define __NR_sched_getaffinity (__NR_SYSCALL_BASE + 242) -+#define __NR_io_setup (__NR_SYSCALL_BASE + 243) -+#define __NR_io_destroy (__NR_SYSCALL_BASE + 244) -+#define __NR_io_getevents (__NR_SYSCALL_BASE + 245) -+#define __NR_io_submit (__NR_SYSCALL_BASE + 246) -+#define __NR_io_cancel (__NR_SYSCALL_BASE + 247) -+#define __NR_exit_group (__NR_SYSCALL_BASE + 248) -+#define __NR_lookup_dcookie (__NR_SYSCALL_BASE + 249) -+#define __NR_epoll_create (__NR_SYSCALL_BASE + 250) -+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251) -+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252) -+#define __NR_remap_file_pages (__NR_SYSCALL_BASE + 253) -+#define __NR_set_tid_address (__NR_SYSCALL_BASE + 256) -+#define __NR_timer_create (__NR_SYSCALL_BASE + 257) -+#define __NR_timer_settime (__NR_SYSCALL_BASE + 258) -+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259) -+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260) -+#define __NR_timer_delete (__NR_SYSCALL_BASE + 261) -+#define __NR_clock_settime (__NR_SYSCALL_BASE + 262) -+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263) -+#define __NR_clock_getres (__NR_SYSCALL_BASE + 264) -+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265) -+#define __NR_statfs64 (__NR_SYSCALL_BASE + 266) -+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267) -+#define __NR_tgkill (__NR_SYSCALL_BASE + 268) -+#define __NR_utimes (__NR_SYSCALL_BASE + 269) -+#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE + 270) -+#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE + 271) -+#define __NR_pciconfig_read (__NR_SYSCALL_BASE + 272) -+#define __NR_pciconfig_write (__NR_SYSCALL_BASE + 273) -+#define __NR_mq_open (__NR_SYSCALL_BASE + 274) -+#define __NR_mq_unlink (__NR_SYSCALL_BASE + 275) -+#define __NR_mq_timedsend (__NR_SYSCALL_BASE + 276) -+#define __NR_mq_timedreceive (__NR_SYSCALL_BASE + 277) -+#define __NR_mq_notify (__NR_SYSCALL_BASE + 278) -+#define __NR_mq_getsetattr (__NR_SYSCALL_BASE + 279) -+#define __NR_waitid (__NR_SYSCALL_BASE + 280) -+#define __NR_socket (__NR_SYSCALL_BASE + 281) -+#define __NR_bind (__NR_SYSCALL_BASE + 282) -+#define __NR_connect (__NR_SYSCALL_BASE + 283) -+#define __NR_listen (__NR_SYSCALL_BASE + 284) -+#define __NR_accept (__NR_SYSCALL_BASE + 285) -+#define __NR_getsockname (__NR_SYSCALL_BASE + 286) -+#define __NR_getpeername (__NR_SYSCALL_BASE + 287) -+#define __NR_socketpair (__NR_SYSCALL_BASE + 288) -+#define __NR_send (__NR_SYSCALL_BASE + 289) -+#define __NR_sendto (__NR_SYSCALL_BASE + 290) -+#define __NR_recv (__NR_SYSCALL_BASE + 291) -+#define __NR_recvfrom (__NR_SYSCALL_BASE + 292) -+#define __NR_shutdown (__NR_SYSCALL_BASE + 293) -+#define __NR_setsockopt (__NR_SYSCALL_BASE + 294) -+#define __NR_getsockopt (__NR_SYSCALL_BASE + 295) -+#define __NR_sendmsg (__NR_SYSCALL_BASE + 296) -+#define __NR_recvmsg (__NR_SYSCALL_BASE + 297) -+#define __NR_semop (__NR_SYSCALL_BASE + 298) -+#define __NR_semget (__NR_SYSCALL_BASE + 299) -+#define __NR_semctl (__NR_SYSCALL_BASE + 300) -+#define __NR_msgsnd (__NR_SYSCALL_BASE + 301) -+#define __NR_msgrcv (__NR_SYSCALL_BASE + 302) -+#define __NR_msgget (__NR_SYSCALL_BASE + 303) -+#define __NR_msgctl (__NR_SYSCALL_BASE + 304) -+#define __NR_shmat (__NR_SYSCALL_BASE + 305) -+#define __NR_shmdt (__NR_SYSCALL_BASE + 306) -+#define __NR_shmget (__NR_SYSCALL_BASE + 307) -+#define __NR_shmctl (__NR_SYSCALL_BASE + 308) -+#define __NR_add_key (__NR_SYSCALL_BASE + 309) -+#define __NR_request_key (__NR_SYSCALL_BASE + 310) -+#define __NR_keyctl (__NR_SYSCALL_BASE + 311) -+#define __NR_semtimedop (__NR_SYSCALL_BASE + 312) -+#define __NR_vserver (__NR_SYSCALL_BASE + 313) -+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314) -+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315) -+#define __NR_inotify_init (__NR_SYSCALL_BASE + 316) -+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317) -+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318) -+#define __NR_mbind (__NR_SYSCALL_BASE + 319) -+#define __NR_get_mempolicy (__NR_SYSCALL_BASE + 320) -+#define __NR_set_mempolicy (__NR_SYSCALL_BASE + 321) -+#define __NR_openat (__NR_SYSCALL_BASE + 322) -+#define __NR_mkdirat (__NR_SYSCALL_BASE + 323) -+#define __NR_mknodat (__NR_SYSCALL_BASE + 324) -+#define __NR_fchownat (__NR_SYSCALL_BASE + 325) -+#define __NR_futimesat (__NR_SYSCALL_BASE + 326) -+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327) -+#define __NR_unlinkat (__NR_SYSCALL_BASE + 328) -+#define __NR_renameat (__NR_SYSCALL_BASE + 329) -+#define __NR_linkat (__NR_SYSCALL_BASE + 330) -+#define __NR_symlinkat (__NR_SYSCALL_BASE + 331) -+#define __NR_readlinkat (__NR_SYSCALL_BASE + 332) -+#define __NR_fchmodat (__NR_SYSCALL_BASE + 333) -+#define __NR_faccessat (__NR_SYSCALL_BASE + 334) -+#define __NR_pselect6 (__NR_SYSCALL_BASE + 335) -+#define __NR_ppoll (__NR_SYSCALL_BASE + 336) -+#define __NR_unshare (__NR_SYSCALL_BASE + 337) -+#define __NR_set_robust_list (__NR_SYSCALL_BASE + 338) -+#define __NR_get_robust_list (__NR_SYSCALL_BASE + 339) -+#define __NR_splice (__NR_SYSCALL_BASE + 340) -+#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE + 341) -+#define __NR_tee (__NR_SYSCALL_BASE + 342) -+#define __NR_vmsplice (__NR_SYSCALL_BASE + 343) -+#define __NR_move_pages (__NR_SYSCALL_BASE + 344) -+#define __NR_getcpu (__NR_SYSCALL_BASE + 345) -+#define __NR_epoll_pwait (__NR_SYSCALL_BASE + 346) -+#define __NR_kexec_load (__NR_SYSCALL_BASE + 347) -+#define __NR_utimensat (__NR_SYSCALL_BASE + 348) -+#define __NR_signalfd (__NR_SYSCALL_BASE + 349) -+#define __NR_timerfd_create (__NR_SYSCALL_BASE + 350) -+#define __NR_eventfd (__NR_SYSCALL_BASE + 351) -+#define __NR_fallocate (__NR_SYSCALL_BASE + 352) -+#define __NR_timerfd_settime (__NR_SYSCALL_BASE + 353) -+#define __NR_timerfd_gettime (__NR_SYSCALL_BASE + 354) -+#define __NR_signalfd4 (__NR_SYSCALL_BASE + 355) -+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 356) -+#define __NR_epoll_create1 (__NR_SYSCALL_BASE + 357) -+#define __NR_dup3 (__NR_SYSCALL_BASE + 358) -+#define __NR_pipe2 (__NR_SYSCALL_BASE + 359) -+#define __NR_inotify_init1 (__NR_SYSCALL_BASE + 360) -+#define __NR_preadv (__NR_SYSCALL_BASE + 361) -+#define __NR_pwritev (__NR_SYSCALL_BASE + 362) -+#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE + 363) -+#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364) -+#define __NR_recvmmsg (__NR_SYSCALL_BASE + 365) -+#define __NR_accept4 (__NR_SYSCALL_BASE + 366) -+#define __NR_fanotify_init (__NR_SYSCALL_BASE + 367) -+#define __NR_fanotify_mark (__NR_SYSCALL_BASE + 368) -+#define __NR_prlimit64 (__NR_SYSCALL_BASE + 369) -+#define __NR_name_to_handle_at (__NR_SYSCALL_BASE + 370) -+#define __NR_open_by_handle_at (__NR_SYSCALL_BASE + 371) -+#define __NR_clock_adjtime (__NR_SYSCALL_BASE + 372) -+#define __NR_syncfs (__NR_SYSCALL_BASE + 373) -+#define __NR_sendmmsg (__NR_SYSCALL_BASE + 374) -+#define __NR_setns (__NR_SYSCALL_BASE + 375) -+#define __NR_process_vm_readv (__NR_SYSCALL_BASE + 376) -+#define __NR_process_vm_writev (__NR_SYSCALL_BASE + 377) -+#define __NR_kcmp (__NR_SYSCALL_BASE + 378) -+#define __NR_finit_module (__NR_SYSCALL_BASE + 379) -+#define __NR_sched_setattr (__NR_SYSCALL_BASE + 380) -+#define __NR_sched_getattr (__NR_SYSCALL_BASE + 381) -+#define __NR_renameat2 (__NR_SYSCALL_BASE + 382) -+#define __NR_seccomp (__NR_SYSCALL_BASE + 383) -+#define __NR_getrandom (__NR_SYSCALL_BASE + 384) -+#define __NR_memfd_create (__NR_SYSCALL_BASE + 385) -+#define __NR_bpf (__NR_SYSCALL_BASE + 386) -+#define __NR_execveat (__NR_SYSCALL_BASE + 387) -+#define __NR_userfaultfd (__NR_SYSCALL_BASE + 388) -+#define __NR_membarrier (__NR_SYSCALL_BASE + 389) -+#define __NR_mlock2 (__NR_SYSCALL_BASE + 390) -+#define __NR_copy_file_range (__NR_SYSCALL_BASE + 391) -+#define __NR_preadv2 (__NR_SYSCALL_BASE + 392) -+#define __NR_pwritev2 (__NR_SYSCALL_BASE + 393) -+#define __NR_pkey_mprotect (__NR_SYSCALL_BASE + 394) -+#define __NR_pkey_alloc (__NR_SYSCALL_BASE + 395) -+#define __NR_pkey_free (__NR_SYSCALL_BASE + 396) -+#define __NR_statx (__NR_SYSCALL_BASE + 397) -+#define __NR_rseq (__NR_SYSCALL_BASE + 398) -+#define __NR_io_pgetevents (__NR_SYSCALL_BASE + 399) -+#define __NR_migrate_pages (__NR_SYSCALL_BASE + 400) -+#define __NR_kexec_file_load (__NR_SYSCALL_BASE + 401) -+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE + 403) -+#define __NR_clock_settime64 (__NR_SYSCALL_BASE + 404) -+#define __NR_clock_adjtime64 (__NR_SYSCALL_BASE + 405) -+#define __NR_clock_getres_time64 (__NR_SYSCALL_BASE + 406) -+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE + 407) -+#define __NR_timer_gettime64 (__NR_SYSCALL_BASE + 408) -+#define __NR_timer_settime64 (__NR_SYSCALL_BASE + 409) -+#define __NR_timerfd_gettime64 (__NR_SYSCALL_BASE + 410) -+#define __NR_timerfd_settime64 (__NR_SYSCALL_BASE + 411) -+#define __NR_utimensat_time64 (__NR_SYSCALL_BASE + 412) -+#define __NR_pselect6_time64 (__NR_SYSCALL_BASE + 413) -+#define __NR_ppoll_time64 (__NR_SYSCALL_BASE + 414) -+#define __NR_io_pgetevents_time64 (__NR_SYSCALL_BASE + 416) -+#define __NR_recvmmsg_time64 (__NR_SYSCALL_BASE + 417) -+#define __NR_mq_timedsend_time64 (__NR_SYSCALL_BASE + 418) -+#define __NR_mq_timedreceive_time64 (__NR_SYSCALL_BASE + 419) -+#define __NR_semtimedop_time64 (__NR_SYSCALL_BASE + 420) -+#define __NR_rt_sigtimedwait_time64 (__NR_SYSCALL_BASE + 421) -+#define __NR_futex_time64 (__NR_SYSCALL_BASE + 422) -+#define __NR_sched_rr_get_interval_time64 (__NR_SYSCALL_BASE + 423) -+#define __NR_pidfd_send_signal (__NR_SYSCALL_BASE + 424) -+#define __NR_io_uring_setup (__NR_SYSCALL_BASE + 425) -+#define __NR_io_uring_enter (__NR_SYSCALL_BASE + 426) -+#define __NR_io_uring_register (__NR_SYSCALL_BASE + 427) -+#define __NR_open_tree (__NR_SYSCALL_BASE + 428) -+#define __NR_move_mount (__NR_SYSCALL_BASE + 429) -+#define __NR_fsopen (__NR_SYSCALL_BASE + 430) -+#define __NR_fsconfig (__NR_SYSCALL_BASE + 431) -+#define __NR_fsmount (__NR_SYSCALL_BASE + 432) -+#define __NR_fspick (__NR_SYSCALL_BASE + 433) -+#define __NR_pidfd_open (__NR_SYSCALL_BASE + 434) -+#define __NR_clone3 (__NR_SYSCALL_BASE + 435) -+ -+#endif /* _ASM_ARM_UNISTD_COMMON_H */ ---- /dev/null -+++ b/tests/include/arm-unknown-linux-gnueabihf/asm/unistd-eabi.h -@@ -0,0 +1,5 @@ -+#ifndef _ASM_ARM_UNISTD_EABI_H -+#define _ASM_ARM_UNISTD_EABI_H 1 -+ -+ -+#endif /* _ASM_ARM_UNISTD_EABI_H */ ---- /dev/null -+++ b/tests/include/arm-unknown-linux-gnueabihf/asm/unistd-oabi.h -@@ -0,0 +1,17 @@ -+#ifndef _ASM_ARM_UNISTD_OABI_H -+#define _ASM_ARM_UNISTD_OABI_H 1 -+ -+#define __NR_time (__NR_SYSCALL_BASE + 13) -+#define __NR_umount (__NR_SYSCALL_BASE + 22) -+#define __NR_stime (__NR_SYSCALL_BASE + 25) -+#define __NR_alarm (__NR_SYSCALL_BASE + 27) -+#define __NR_utime (__NR_SYSCALL_BASE + 30) -+#define __NR_getrlimit (__NR_SYSCALL_BASE + 76) -+#define __NR_select (__NR_SYSCALL_BASE + 82) -+#define __NR_readdir (__NR_SYSCALL_BASE + 89) -+#define __NR_mmap (__NR_SYSCALL_BASE + 90) -+#define __NR_socketcall (__NR_SYSCALL_BASE + 102) -+#define __NR_syscall (__NR_SYSCALL_BASE + 113) -+#define __NR_ipc (__NR_SYSCALL_BASE + 117) -+ -+#endif /* _ASM_ARM_UNISTD_OABI_H */ ---- /dev/null -+++ b/tests/include/arm-unknown-linux-gnueabihf/asm/unistd.h -@@ -0,0 +1,41 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+/* -+ * arch/arm/include/asm/unistd.h -+ * -+ * Copyright (C) 2001-2005 Russell King -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, -+ * no matter what the change is. Thanks! -+ */ -+#ifndef __ASM_ARM_UNISTD_H -+#define __ASM_ARM_UNISTD_H -+ -+#define __NR_OABI_SYSCALL_BASE 0x900000 -+ -+#if defined(__thumb__) || defined(__ARM_EABI__) -+#define __NR_SYSCALL_BASE 0 -+#include -+#else -+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -+#include -+#endif -+ -+#include -+#define __NR_sync_file_range2 __NR_arm_sync_file_range -+ -+/* -+ * The following SWIs are ARM private. -+ */ -+#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) -+#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) -+#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) -+#define __ARM_NR_usr26 (__ARM_NR_BASE+3) -+#define __ARM_NR_usr32 (__ARM_NR_BASE+4) -+#define __ARM_NR_set_tls (__ARM_NR_BASE+5) -+#define __ARM_NR_get_tls (__ARM_NR_BASE+6) -+ -+#endif /* __ASM_ARM_UNISTD_H */ ---- /dev/null -+++ b/tests/include/aarch64-unknown-linux-gnu/asm-generic/unistd.h -@@ -0,0 +1,903 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#include -+ -+/* -+ * This file contains the system call numbers, based on the -+ * layout of the x86-64 architecture, which embeds the -+ * pointer to the syscall in the table. -+ * -+ * As a basic principle, no duplication of functionality -+ * should be added, e.g. we don't use lseek when llseek -+ * is present. New architectures should use this file -+ * and implement the less feature-full calls in user space. -+ */ -+ -+#ifndef __SYSCALL -+#define __SYSCALL(x, y) -+#endif -+ -+#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) -+#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) -+#else -+#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) -+#endif -+ -+#ifdef __SYSCALL_COMPAT -+#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) -+#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) -+#else -+#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) -+#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) -+#endif -+ -+#define __NR_io_setup 0 -+__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) -+#define __NR_io_destroy 1 -+__SYSCALL(__NR_io_destroy, sys_io_destroy) -+#define __NR_io_submit 2 -+__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) -+#define __NR_io_cancel 3 -+__SYSCALL(__NR_io_cancel, sys_io_cancel) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_io_getevents 4 -+__SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) -+#endif -+ -+/* fs/xattr.c */ -+#define __NR_setxattr 5 -+__SYSCALL(__NR_setxattr, sys_setxattr) -+#define __NR_lsetxattr 6 -+__SYSCALL(__NR_lsetxattr, sys_lsetxattr) -+#define __NR_fsetxattr 7 -+__SYSCALL(__NR_fsetxattr, sys_fsetxattr) -+#define __NR_getxattr 8 -+__SYSCALL(__NR_getxattr, sys_getxattr) -+#define __NR_lgetxattr 9 -+__SYSCALL(__NR_lgetxattr, sys_lgetxattr) -+#define __NR_fgetxattr 10 -+__SYSCALL(__NR_fgetxattr, sys_fgetxattr) -+#define __NR_listxattr 11 -+__SYSCALL(__NR_listxattr, sys_listxattr) -+#define __NR_llistxattr 12 -+__SYSCALL(__NR_llistxattr, sys_llistxattr) -+#define __NR_flistxattr 13 -+__SYSCALL(__NR_flistxattr, sys_flistxattr) -+#define __NR_removexattr 14 -+__SYSCALL(__NR_removexattr, sys_removexattr) -+#define __NR_lremovexattr 15 -+__SYSCALL(__NR_lremovexattr, sys_lremovexattr) -+#define __NR_fremovexattr 16 -+__SYSCALL(__NR_fremovexattr, sys_fremovexattr) -+ -+/* fs/dcache.c */ -+#define __NR_getcwd 17 -+__SYSCALL(__NR_getcwd, sys_getcwd) -+ -+/* fs/cookies.c */ -+#define __NR_lookup_dcookie 18 -+__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) -+ -+/* fs/eventfd.c */ -+#define __NR_eventfd2 19 -+__SYSCALL(__NR_eventfd2, sys_eventfd2) -+ -+/* fs/eventpoll.c */ -+#define __NR_epoll_create1 20 -+__SYSCALL(__NR_epoll_create1, sys_epoll_create1) -+#define __NR_epoll_ctl 21 -+__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) -+#define __NR_epoll_pwait 22 -+__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) -+ -+/* fs/fcntl.c */ -+#define __NR_dup 23 -+__SYSCALL(__NR_dup, sys_dup) -+#define __NR_dup3 24 -+__SYSCALL(__NR_dup3, sys_dup3) -+#define __NR3264_fcntl 25 -+__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) -+ -+/* fs/inotify_user.c */ -+#define __NR_inotify_init1 26 -+__SYSCALL(__NR_inotify_init1, sys_inotify_init1) -+#define __NR_inotify_add_watch 27 -+__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) -+#define __NR_inotify_rm_watch 28 -+__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) -+ -+/* fs/ioctl.c */ -+#define __NR_ioctl 29 -+__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) -+ -+/* fs/ioprio.c */ -+#define __NR_ioprio_set 30 -+__SYSCALL(__NR_ioprio_set, sys_ioprio_set) -+#define __NR_ioprio_get 31 -+__SYSCALL(__NR_ioprio_get, sys_ioprio_get) -+ -+/* fs/locks.c */ -+#define __NR_flock 32 -+__SYSCALL(__NR_flock, sys_flock) -+ -+/* fs/namei.c */ -+#define __NR_mknodat 33 -+__SYSCALL(__NR_mknodat, sys_mknodat) -+#define __NR_mkdirat 34 -+__SYSCALL(__NR_mkdirat, sys_mkdirat) -+#define __NR_unlinkat 35 -+__SYSCALL(__NR_unlinkat, sys_unlinkat) -+#define __NR_symlinkat 36 -+__SYSCALL(__NR_symlinkat, sys_symlinkat) -+#define __NR_linkat 37 -+__SYSCALL(__NR_linkat, sys_linkat) -+#ifdef __ARCH_WANT_RENAMEAT -+/* renameat is superseded with flags by renameat2 */ -+#define __NR_renameat 38 -+__SYSCALL(__NR_renameat, sys_renameat) -+#endif /* __ARCH_WANT_RENAMEAT */ -+ -+/* fs/namespace.c */ -+#define __NR_umount2 39 -+__SYSCALL(__NR_umount2, sys_umount) -+#define __NR_mount 40 -+__SC_COMP(__NR_mount, sys_mount, compat_sys_mount) -+#define __NR_pivot_root 41 -+__SYSCALL(__NR_pivot_root, sys_pivot_root) -+ -+/* fs/nfsctl.c */ -+#define __NR_nfsservctl 42 -+__SYSCALL(__NR_nfsservctl, sys_ni_syscall) -+ -+/* fs/open.c */ -+#define __NR3264_statfs 43 -+__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ -+ compat_sys_statfs64) -+#define __NR3264_fstatfs 44 -+__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ -+ compat_sys_fstatfs64) -+#define __NR3264_truncate 45 -+__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ -+ compat_sys_truncate64) -+#define __NR3264_ftruncate 46 -+__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ -+ compat_sys_ftruncate64) -+ -+#define __NR_fallocate 47 -+__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) -+#define __NR_faccessat 48 -+__SYSCALL(__NR_faccessat, sys_faccessat) -+#define __NR_chdir 49 -+__SYSCALL(__NR_chdir, sys_chdir) -+#define __NR_fchdir 50 -+__SYSCALL(__NR_fchdir, sys_fchdir) -+#define __NR_chroot 51 -+__SYSCALL(__NR_chroot, sys_chroot) -+#define __NR_fchmod 52 -+__SYSCALL(__NR_fchmod, sys_fchmod) -+#define __NR_fchmodat 53 -+__SYSCALL(__NR_fchmodat, sys_fchmodat) -+#define __NR_fchownat 54 -+__SYSCALL(__NR_fchownat, sys_fchownat) -+#define __NR_fchown 55 -+__SYSCALL(__NR_fchown, sys_fchown) -+#define __NR_openat 56 -+__SYSCALL(__NR_openat, sys_openat) -+#define __NR_close 57 -+__SYSCALL(__NR_close, sys_close) -+#define __NR_vhangup 58 -+__SYSCALL(__NR_vhangup, sys_vhangup) -+ -+/* fs/pipe.c */ -+#define __NR_pipe2 59 -+__SYSCALL(__NR_pipe2, sys_pipe2) -+ -+/* fs/quota.c */ -+#define __NR_quotactl 60 -+__SYSCALL(__NR_quotactl, sys_quotactl) -+ -+/* fs/readdir.c */ -+#define __NR_getdents64 61 -+__SYSCALL(__NR_getdents64, sys_getdents64) -+ -+/* fs/read_write.c */ -+#define __NR3264_lseek 62 -+__SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) -+#define __NR_read 63 -+__SYSCALL(__NR_read, sys_read) -+#define __NR_write 64 -+__SYSCALL(__NR_write, sys_write) -+#define __NR_readv 65 -+__SC_COMP(__NR_readv, sys_readv, compat_sys_readv) -+#define __NR_writev 66 -+__SC_COMP(__NR_writev, sys_writev, compat_sys_writev) -+#define __NR_pread64 67 -+__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) -+#define __NR_pwrite64 68 -+__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) -+#define __NR_preadv 69 -+__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) -+#define __NR_pwritev 70 -+__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) -+ -+/* fs/sendfile.c */ -+#define __NR3264_sendfile 71 -+__SYSCALL(__NR3264_sendfile, sys_sendfile64) -+ -+/* fs/select.c */ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_pselect6 72 -+__SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) -+#define __NR_ppoll 73 -+__SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) -+#endif -+ -+/* fs/signalfd.c */ -+#define __NR_signalfd4 74 -+__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) -+ -+/* fs/splice.c */ -+#define __NR_vmsplice 75 -+__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) -+#define __NR_splice 76 -+__SYSCALL(__NR_splice, sys_splice) -+#define __NR_tee 77 -+__SYSCALL(__NR_tee, sys_tee) -+ -+/* fs/stat.c */ -+#define __NR_readlinkat 78 -+__SYSCALL(__NR_readlinkat, sys_readlinkat) -+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) -+#define __NR3264_fstatat 79 -+__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) -+#define __NR3264_fstat 80 -+__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) -+#endif -+ -+/* fs/sync.c */ -+#define __NR_sync 81 -+__SYSCALL(__NR_sync, sys_sync) -+#define __NR_fsync 82 -+__SYSCALL(__NR_fsync, sys_fsync) -+#define __NR_fdatasync 83 -+__SYSCALL(__NR_fdatasync, sys_fdatasync) -+#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 -+#define __NR_sync_file_range2 84 -+__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ -+ compat_sys_sync_file_range2) -+#else -+#define __NR_sync_file_range 84 -+__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ -+ compat_sys_sync_file_range) -+#endif -+ -+/* fs/timerfd.c */ -+#define __NR_timerfd_create 85 -+__SYSCALL(__NR_timerfd_create, sys_timerfd_create) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_timerfd_settime 86 -+__SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ -+ sys_timerfd_settime) -+#define __NR_timerfd_gettime 87 -+__SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ -+ sys_timerfd_gettime) -+#endif -+ -+/* fs/utimes.c */ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_utimensat 88 -+__SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) -+#endif -+ -+/* kernel/acct.c */ -+#define __NR_acct 89 -+__SYSCALL(__NR_acct, sys_acct) -+ -+/* kernel/capability.c */ -+#define __NR_capget 90 -+__SYSCALL(__NR_capget, sys_capget) -+#define __NR_capset 91 -+__SYSCALL(__NR_capset, sys_capset) -+ -+/* kernel/exec_domain.c */ -+#define __NR_personality 92 -+__SYSCALL(__NR_personality, sys_personality) -+ -+/* kernel/exit.c */ -+#define __NR_exit 93 -+__SYSCALL(__NR_exit, sys_exit) -+#define __NR_exit_group 94 -+__SYSCALL(__NR_exit_group, sys_exit_group) -+#define __NR_waitid 95 -+__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) -+ -+/* kernel/fork.c */ -+#define __NR_set_tid_address 96 -+__SYSCALL(__NR_set_tid_address, sys_set_tid_address) -+#define __NR_unshare 97 -+__SYSCALL(__NR_unshare, sys_unshare) -+ -+/* kernel/futex.c */ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_futex 98 -+__SC_3264(__NR_futex, sys_futex_time32, sys_futex) -+#endif -+#define __NR_set_robust_list 99 -+__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ -+ compat_sys_set_robust_list) -+#define __NR_get_robust_list 100 -+__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ -+ compat_sys_get_robust_list) -+ -+/* kernel/hrtimer.c */ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_nanosleep 101 -+__SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) -+#endif -+ -+/* kernel/itimer.c */ -+#define __NR_getitimer 102 -+__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) -+#define __NR_setitimer 103 -+__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) -+ -+/* kernel/kexec.c */ -+#define __NR_kexec_load 104 -+__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) -+ -+/* kernel/module.c */ -+#define __NR_init_module 105 -+__SYSCALL(__NR_init_module, sys_init_module) -+#define __NR_delete_module 106 -+__SYSCALL(__NR_delete_module, sys_delete_module) -+ -+/* kernel/posix-timers.c */ -+#define __NR_timer_create 107 -+__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_timer_gettime 108 -+__SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) -+#endif -+#define __NR_timer_getoverrun 109 -+__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_timer_settime 110 -+__SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) -+#endif -+#define __NR_timer_delete 111 -+__SYSCALL(__NR_timer_delete, sys_timer_delete) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_clock_settime 112 -+__SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) -+#define __NR_clock_gettime 113 -+__SC_3264(__NR_clock_gettime, sys_clock_gettime32, sys_clock_gettime) -+#define __NR_clock_getres 114 -+__SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres) -+#define __NR_clock_nanosleep 115 -+__SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ -+ sys_clock_nanosleep) -+#endif -+ -+/* kernel/printk.c */ -+#define __NR_syslog 116 -+__SYSCALL(__NR_syslog, sys_syslog) -+ -+/* kernel/ptrace.c */ -+#define __NR_ptrace 117 -+__SYSCALL(__NR_ptrace, sys_ptrace) -+ -+/* kernel/sched/core.c */ -+#define __NR_sched_setparam 118 -+__SYSCALL(__NR_sched_setparam, sys_sched_setparam) -+#define __NR_sched_setscheduler 119 -+__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) -+#define __NR_sched_getscheduler 120 -+__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) -+#define __NR_sched_getparam 121 -+__SYSCALL(__NR_sched_getparam, sys_sched_getparam) -+#define __NR_sched_setaffinity 122 -+__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ -+ compat_sys_sched_setaffinity) -+#define __NR_sched_getaffinity 123 -+__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ -+ compat_sys_sched_getaffinity) -+#define __NR_sched_yield 124 -+__SYSCALL(__NR_sched_yield, sys_sched_yield) -+#define __NR_sched_get_priority_max 125 -+__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) -+#define __NR_sched_get_priority_min 126 -+__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_sched_rr_get_interval 127 -+__SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ -+ sys_sched_rr_get_interval) -+#endif -+ -+/* kernel/signal.c */ -+#define __NR_restart_syscall 128 -+__SYSCALL(__NR_restart_syscall, sys_restart_syscall) -+#define __NR_kill 129 -+__SYSCALL(__NR_kill, sys_kill) -+#define __NR_tkill 130 -+__SYSCALL(__NR_tkill, sys_tkill) -+#define __NR_tgkill 131 -+__SYSCALL(__NR_tgkill, sys_tgkill) -+#define __NR_sigaltstack 132 -+__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) -+#define __NR_rt_sigsuspend 133 -+__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) -+#define __NR_rt_sigaction 134 -+__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) -+#define __NR_rt_sigprocmask 135 -+__SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) -+#define __NR_rt_sigpending 136 -+__SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_rt_sigtimedwait 137 -+__SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ -+ sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) -+#endif -+#define __NR_rt_sigqueueinfo 138 -+__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ -+ compat_sys_rt_sigqueueinfo) -+#define __NR_rt_sigreturn 139 -+__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) -+ -+/* kernel/sys.c */ -+#define __NR_setpriority 140 -+__SYSCALL(__NR_setpriority, sys_setpriority) -+#define __NR_getpriority 141 -+__SYSCALL(__NR_getpriority, sys_getpriority) -+#define __NR_reboot 142 -+__SYSCALL(__NR_reboot, sys_reboot) -+#define __NR_setregid 143 -+__SYSCALL(__NR_setregid, sys_setregid) -+#define __NR_setgid 144 -+__SYSCALL(__NR_setgid, sys_setgid) -+#define __NR_setreuid 145 -+__SYSCALL(__NR_setreuid, sys_setreuid) -+#define __NR_setuid 146 -+__SYSCALL(__NR_setuid, sys_setuid) -+#define __NR_setresuid 147 -+__SYSCALL(__NR_setresuid, sys_setresuid) -+#define __NR_getresuid 148 -+__SYSCALL(__NR_getresuid, sys_getresuid) -+#define __NR_setresgid 149 -+__SYSCALL(__NR_setresgid, sys_setresgid) -+#define __NR_getresgid 150 -+__SYSCALL(__NR_getresgid, sys_getresgid) -+#define __NR_setfsuid 151 -+__SYSCALL(__NR_setfsuid, sys_setfsuid) -+#define __NR_setfsgid 152 -+__SYSCALL(__NR_setfsgid, sys_setfsgid) -+#define __NR_times 153 -+__SC_COMP(__NR_times, sys_times, compat_sys_times) -+#define __NR_setpgid 154 -+__SYSCALL(__NR_setpgid, sys_setpgid) -+#define __NR_getpgid 155 -+__SYSCALL(__NR_getpgid, sys_getpgid) -+#define __NR_getsid 156 -+__SYSCALL(__NR_getsid, sys_getsid) -+#define __NR_setsid 157 -+__SYSCALL(__NR_setsid, sys_setsid) -+#define __NR_getgroups 158 -+__SYSCALL(__NR_getgroups, sys_getgroups) -+#define __NR_setgroups 159 -+__SYSCALL(__NR_setgroups, sys_setgroups) -+#define __NR_uname 160 -+__SYSCALL(__NR_uname, sys_newuname) -+#define __NR_sethostname 161 -+__SYSCALL(__NR_sethostname, sys_sethostname) -+#define __NR_setdomainname 162 -+__SYSCALL(__NR_setdomainname, sys_setdomainname) -+ -+#ifdef __ARCH_WANT_SET_GET_RLIMIT -+/* getrlimit and setrlimit are superseded with prlimit64 */ -+#define __NR_getrlimit 163 -+__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) -+#define __NR_setrlimit 164 -+__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) -+#endif -+ -+#define __NR_getrusage 165 -+__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) -+#define __NR_umask 166 -+__SYSCALL(__NR_umask, sys_umask) -+#define __NR_prctl 167 -+__SYSCALL(__NR_prctl, sys_prctl) -+#define __NR_getcpu 168 -+__SYSCALL(__NR_getcpu, sys_getcpu) -+ -+/* kernel/time.c */ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_gettimeofday 169 -+__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) -+#define __NR_settimeofday 170 -+__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) -+#define __NR_adjtimex 171 -+__SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) -+#endif -+ -+/* kernel/timer.c */ -+#define __NR_getpid 172 -+__SYSCALL(__NR_getpid, sys_getpid) -+#define __NR_getppid 173 -+__SYSCALL(__NR_getppid, sys_getppid) -+#define __NR_getuid 174 -+__SYSCALL(__NR_getuid, sys_getuid) -+#define __NR_geteuid 175 -+__SYSCALL(__NR_geteuid, sys_geteuid) -+#define __NR_getgid 176 -+__SYSCALL(__NR_getgid, sys_getgid) -+#define __NR_getegid 177 -+__SYSCALL(__NR_getegid, sys_getegid) -+#define __NR_gettid 178 -+__SYSCALL(__NR_gettid, sys_gettid) -+#define __NR_sysinfo 179 -+__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) -+ -+/* ipc/mqueue.c */ -+#define __NR_mq_open 180 -+__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) -+#define __NR_mq_unlink 181 -+__SYSCALL(__NR_mq_unlink, sys_mq_unlink) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_mq_timedsend 182 -+__SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) -+#define __NR_mq_timedreceive 183 -+__SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ -+ sys_mq_timedreceive) -+#endif -+#define __NR_mq_notify 184 -+__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) -+#define __NR_mq_getsetattr 185 -+__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) -+ -+/* ipc/msg.c */ -+#define __NR_msgget 186 -+__SYSCALL(__NR_msgget, sys_msgget) -+#define __NR_msgctl 187 -+__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) -+#define __NR_msgrcv 188 -+__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) -+#define __NR_msgsnd 189 -+__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) -+ -+/* ipc/sem.c */ -+#define __NR_semget 190 -+__SYSCALL(__NR_semget, sys_semget) -+#define __NR_semctl 191 -+__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_semtimedop 192 -+__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) -+#endif -+#define __NR_semop 193 -+__SYSCALL(__NR_semop, sys_semop) -+ -+/* ipc/shm.c */ -+#define __NR_shmget 194 -+__SYSCALL(__NR_shmget, sys_shmget) -+#define __NR_shmctl 195 -+__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) -+#define __NR_shmat 196 -+__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) -+#define __NR_shmdt 197 -+__SYSCALL(__NR_shmdt, sys_shmdt) -+ -+/* net/socket.c */ -+#define __NR_socket 198 -+__SYSCALL(__NR_socket, sys_socket) -+#define __NR_socketpair 199 -+__SYSCALL(__NR_socketpair, sys_socketpair) -+#define __NR_bind 200 -+__SYSCALL(__NR_bind, sys_bind) -+#define __NR_listen 201 -+__SYSCALL(__NR_listen, sys_listen) -+#define __NR_accept 202 -+__SYSCALL(__NR_accept, sys_accept) -+#define __NR_connect 203 -+__SYSCALL(__NR_connect, sys_connect) -+#define __NR_getsockname 204 -+__SYSCALL(__NR_getsockname, sys_getsockname) -+#define __NR_getpeername 205 -+__SYSCALL(__NR_getpeername, sys_getpeername) -+#define __NR_sendto 206 -+__SYSCALL(__NR_sendto, sys_sendto) -+#define __NR_recvfrom 207 -+__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) -+#define __NR_setsockopt 208 -+__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) -+#define __NR_getsockopt 209 -+__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) -+#define __NR_shutdown 210 -+__SYSCALL(__NR_shutdown, sys_shutdown) -+#define __NR_sendmsg 211 -+__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) -+#define __NR_recvmsg 212 -+__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) -+ -+/* mm/filemap.c */ -+#define __NR_readahead 213 -+__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) -+ -+/* mm/nommu.c, also with MMU */ -+#define __NR_brk 214 -+__SYSCALL(__NR_brk, sys_brk) -+#define __NR_munmap 215 -+__SYSCALL(__NR_munmap, sys_munmap) -+#define __NR_mremap 216 -+__SYSCALL(__NR_mremap, sys_mremap) -+ -+/* security/keys/keyctl.c */ -+#define __NR_add_key 217 -+__SYSCALL(__NR_add_key, sys_add_key) -+#define __NR_request_key 218 -+__SYSCALL(__NR_request_key, sys_request_key) -+#define __NR_keyctl 219 -+__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) -+ -+/* arch/example/kernel/sys_example.c */ -+#define __NR_clone 220 -+__SYSCALL(__NR_clone, sys_clone) -+#define __NR_execve 221 -+__SC_COMP(__NR_execve, sys_execve, compat_sys_execve) -+ -+#define __NR3264_mmap 222 -+__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) -+/* mm/fadvise.c */ -+#define __NR3264_fadvise64 223 -+__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) -+ -+/* mm/, CONFIG_MMU only */ -+#ifndef __ARCH_NOMMU -+#define __NR_swapon 224 -+__SYSCALL(__NR_swapon, sys_swapon) -+#define __NR_swapoff 225 -+__SYSCALL(__NR_swapoff, sys_swapoff) -+#define __NR_mprotect 226 -+__SYSCALL(__NR_mprotect, sys_mprotect) -+#define __NR_msync 227 -+__SYSCALL(__NR_msync, sys_msync) -+#define __NR_mlock 228 -+__SYSCALL(__NR_mlock, sys_mlock) -+#define __NR_munlock 229 -+__SYSCALL(__NR_munlock, sys_munlock) -+#define __NR_mlockall 230 -+__SYSCALL(__NR_mlockall, sys_mlockall) -+#define __NR_munlockall 231 -+__SYSCALL(__NR_munlockall, sys_munlockall) -+#define __NR_mincore 232 -+__SYSCALL(__NR_mincore, sys_mincore) -+#define __NR_madvise 233 -+__SYSCALL(__NR_madvise, sys_madvise) -+#define __NR_remap_file_pages 234 -+__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) -+#define __NR_mbind 235 -+__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) -+#define __NR_get_mempolicy 236 -+__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) -+#define __NR_set_mempolicy 237 -+__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) -+#define __NR_migrate_pages 238 -+__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) -+#define __NR_move_pages 239 -+__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) -+#endif -+ -+#define __NR_rt_tgsigqueueinfo 240 -+__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ -+ compat_sys_rt_tgsigqueueinfo) -+#define __NR_perf_event_open 241 -+__SYSCALL(__NR_perf_event_open, sys_perf_event_open) -+#define __NR_accept4 242 -+__SYSCALL(__NR_accept4, sys_accept4) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_recvmmsg 243 -+__SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) -+#endif -+ -+/* -+ * Architectures may provide up to 16 syscalls of their own -+ * starting with this value. -+ */ -+#define __NR_arch_specific_syscall 244 -+ -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_wait4 260 -+__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) -+#endif -+#define __NR_prlimit64 261 -+__SYSCALL(__NR_prlimit64, sys_prlimit64) -+#define __NR_fanotify_init 262 -+__SYSCALL(__NR_fanotify_init, sys_fanotify_init) -+#define __NR_fanotify_mark 263 -+__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) -+#define __NR_name_to_handle_at 264 -+__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) -+#define __NR_open_by_handle_at 265 -+__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_clock_adjtime 266 -+__SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) -+#endif -+#define __NR_syncfs 267 -+__SYSCALL(__NR_syncfs, sys_syncfs) -+#define __NR_setns 268 -+__SYSCALL(__NR_setns, sys_setns) -+#define __NR_sendmmsg 269 -+__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) -+#define __NR_process_vm_readv 270 -+__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ -+ compat_sys_process_vm_readv) -+#define __NR_process_vm_writev 271 -+__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ -+ compat_sys_process_vm_writev) -+#define __NR_kcmp 272 -+__SYSCALL(__NR_kcmp, sys_kcmp) -+#define __NR_finit_module 273 -+__SYSCALL(__NR_finit_module, sys_finit_module) -+#define __NR_sched_setattr 274 -+__SYSCALL(__NR_sched_setattr, sys_sched_setattr) -+#define __NR_sched_getattr 275 -+__SYSCALL(__NR_sched_getattr, sys_sched_getattr) -+#define __NR_renameat2 276 -+__SYSCALL(__NR_renameat2, sys_renameat2) -+#define __NR_seccomp 277 -+__SYSCALL(__NR_seccomp, sys_seccomp) -+#define __NR_getrandom 278 -+__SYSCALL(__NR_getrandom, sys_getrandom) -+#define __NR_memfd_create 279 -+__SYSCALL(__NR_memfd_create, sys_memfd_create) -+#define __NR_bpf 280 -+__SYSCALL(__NR_bpf, sys_bpf) -+#define __NR_execveat 281 -+__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat) -+#define __NR_userfaultfd 282 -+__SYSCALL(__NR_userfaultfd, sys_userfaultfd) -+#define __NR_membarrier 283 -+__SYSCALL(__NR_membarrier, sys_membarrier) -+#define __NR_mlock2 284 -+__SYSCALL(__NR_mlock2, sys_mlock2) -+#define __NR_copy_file_range 285 -+__SYSCALL(__NR_copy_file_range, sys_copy_file_range) -+#define __NR_preadv2 286 -+__SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2) -+#define __NR_pwritev2 287 -+__SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2) -+#define __NR_pkey_mprotect 288 -+__SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect) -+#define __NR_pkey_alloc 289 -+__SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) -+#define __NR_pkey_free 290 -+__SYSCALL(__NR_pkey_free, sys_pkey_free) -+#define __NR_statx 291 -+__SYSCALL(__NR_statx, sys_statx) -+#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 -+#define __NR_io_pgetevents 292 -+__SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) -+#endif -+#define __NR_rseq 293 -+__SYSCALL(__NR_rseq, sys_rseq) -+#define __NR_kexec_file_load 294 -+__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) -+/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ -+#if __BITS_PER_LONG == 32 -+#define __NR_clock_gettime64 403 -+__SYSCALL(__NR_clock_gettime64, sys_clock_gettime) -+#define __NR_clock_settime64 404 -+__SYSCALL(__NR_clock_settime64, sys_clock_settime) -+#define __NR_clock_adjtime64 405 -+__SYSCALL(__NR_clock_adjtime64, sys_clock_adjtime) -+#define __NR_clock_getres_time64 406 -+__SYSCALL(__NR_clock_getres_time64, sys_clock_getres) -+#define __NR_clock_nanosleep_time64 407 -+__SYSCALL(__NR_clock_nanosleep_time64, sys_clock_nanosleep) -+#define __NR_timer_gettime64 408 -+__SYSCALL(__NR_timer_gettime64, sys_timer_gettime) -+#define __NR_timer_settime64 409 -+__SYSCALL(__NR_timer_settime64, sys_timer_settime) -+#define __NR_timerfd_gettime64 410 -+__SYSCALL(__NR_timerfd_gettime64, sys_timerfd_gettime) -+#define __NR_timerfd_settime64 411 -+__SYSCALL(__NR_timerfd_settime64, sys_timerfd_settime) -+#define __NR_utimensat_time64 412 -+__SYSCALL(__NR_utimensat_time64, sys_utimensat) -+#define __NR_pselect6_time64 413 -+__SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) -+#define __NR_ppoll_time64 414 -+__SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64) -+#define __NR_io_pgetevents_time64 416 -+__SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) -+#define __NR_recvmmsg_time64 417 -+__SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64) -+#define __NR_mq_timedsend_time64 418 -+__SYSCALL(__NR_mq_timedsend_time64, sys_mq_timedsend) -+#define __NR_mq_timedreceive_time64 419 -+__SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive) -+#define __NR_semtimedop_time64 420 -+__SYSCALL(__NR_semtimedop_time64, sys_semtimedop) -+#define __NR_rt_sigtimedwait_time64 421 -+__SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time64) -+#define __NR_futex_time64 422 -+__SYSCALL(__NR_futex_time64, sys_futex) -+#define __NR_sched_rr_get_interval_time64 423 -+__SYSCALL(__NR_sched_rr_get_interval_time64, sys_sched_rr_get_interval) -+#endif -+ -+#define __NR_pidfd_send_signal 424 -+__SYSCALL(__NR_pidfd_send_signal, sys_pidfd_send_signal) -+#define __NR_io_uring_setup 425 -+__SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) -+#define __NR_io_uring_enter 426 -+__SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) -+#define __NR_io_uring_register 427 -+__SYSCALL(__NR_io_uring_register, sys_io_uring_register) -+#define __NR_open_tree 428 -+__SYSCALL(__NR_open_tree, sys_open_tree) -+#define __NR_move_mount 429 -+__SYSCALL(__NR_move_mount, sys_move_mount) -+#define __NR_fsopen 430 -+__SYSCALL(__NR_fsopen, sys_fsopen) -+#define __NR_fsconfig 431 -+__SYSCALL(__NR_fsconfig, sys_fsconfig) -+#define __NR_fsmount 432 -+__SYSCALL(__NR_fsmount, sys_fsmount) -+#define __NR_fspick 433 -+__SYSCALL(__NR_fspick, sys_fspick) -+#define __NR_pidfd_open 434 -+__SYSCALL(__NR_pidfd_open, sys_pidfd_open) -+#ifdef __ARCH_WANT_SYS_CLONE3 -+#define __NR_clone3 435 -+__SYSCALL(__NR_clone3, sys_clone3) -+#endif -+ -+#undef __NR_syscalls -+#define __NR_syscalls 436 -+ -+/* -+ * 32 bit systems traditionally used different -+ * syscalls for off_t and loff_t arguments, while -+ * 64 bit systems only need the off_t version. -+ * For new 32 bit platforms, there is no need to -+ * implement the old 32 bit off_t syscalls, so -+ * they take different names. -+ * Here we map the numbers so that both versions -+ * use the same syscall table layout. -+ */ -+#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) -+#define __NR_fcntl __NR3264_fcntl -+#define __NR_statfs __NR3264_statfs -+#define __NR_fstatfs __NR3264_fstatfs -+#define __NR_truncate __NR3264_truncate -+#define __NR_ftruncate __NR3264_ftruncate -+#define __NR_lseek __NR3264_lseek -+#define __NR_sendfile __NR3264_sendfile -+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) -+#define __NR_newfstatat __NR3264_fstatat -+#define __NR_fstat __NR3264_fstat -+#endif -+#define __NR_mmap __NR3264_mmap -+#define __NR_fadvise64 __NR3264_fadvise64 -+#ifdef __NR3264_stat -+#define __NR_stat __NR3264_stat -+#define __NR_lstat __NR3264_lstat -+#endif -+#else -+#define __NR_fcntl64 __NR3264_fcntl -+#define __NR_statfs64 __NR3264_statfs -+#define __NR_fstatfs64 __NR3264_fstatfs -+#define __NR_truncate64 __NR3264_truncate -+#define __NR_ftruncate64 __NR3264_ftruncate -+#define __NR_llseek __NR3264_lseek -+#define __NR_sendfile64 __NR3264_sendfile -+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) -+#define __NR_fstatat64 __NR3264_fstatat -+#define __NR_fstat64 __NR3264_fstat -+#endif -+#define __NR_mmap2 __NR3264_mmap -+#define __NR_fadvise64_64 __NR3264_fadvise64 -+#ifdef __NR3264_stat -+#define __NR_stat64 __NR3264_stat -+#define __NR_lstat64 __NR3264_lstat -+#endif -+#endif ---- /dev/null -+++ b/tests/include/aarch64-unknown-linux-gnu/asm/unistd.h -@@ -0,0 +1,24 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+/* -+ * Copyright (C) 2012 ARM Ltd. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+ -+#define __ARCH_WANT_RENAMEAT -+#define __ARCH_WANT_NEW_STAT -+#define __ARCH_WANT_SET_GET_RLIMIT -+#define __ARCH_WANT_TIME32_SYSCALLS -+#define __ARCH_WANT_SYS_CLONE3 -+ -+#include ---- /dev/null -+++ b/tests/include/x86_64-pc-linux-gnu/asm/unistd.h -@@ -0,0 +1,16 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#ifndef _ASM_X86_UNISTD_H -+#define _ASM_X86_UNISTD_H -+ -+/* x32 syscall flag bit */ -+#define __X32_SYSCALL_BIT 0x40000000UL -+ -+# ifdef __i386__ -+# include -+# elif defined(__ILP32__) -+# include -+# else -+# include -+# endif -+ -+#endif /* _ASM_X86_UNISTD_H */ ---- /dev/null -+++ b/tests/include/x86_64-pc-linux-gnu/asm/unistd_32.h -@@ -0,0 +1,430 @@ -+#ifndef _ASM_X86_UNISTD_32_H -+#define _ASM_X86_UNISTD_32_H 1 -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86old 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_vm86 166 -+#define __NR_query_module 167 -+#define __NR_poll 168 -+#define __NR_nfsservctl 169 -+#define __NR_setresgid 170 -+#define __NR_getresgid 171 -+#define __NR_prctl 172 -+#define __NR_rt_sigreturn 173 -+#define __NR_rt_sigaction 174 -+#define __NR_rt_sigprocmask 175 -+#define __NR_rt_sigpending 176 -+#define __NR_rt_sigtimedwait 177 -+#define __NR_rt_sigqueueinfo 178 -+#define __NR_rt_sigsuspend 179 -+#define __NR_pread64 180 -+#define __NR_pwrite64 181 -+#define __NR_chown 182 -+#define __NR_getcwd 183 -+#define __NR_capget 184 -+#define __NR_capset 185 -+#define __NR_sigaltstack 186 -+#define __NR_sendfile 187 -+#define __NR_getpmsg 188 -+#define __NR_putpmsg 189 -+#define __NR_vfork 190 -+#define __NR_ugetrlimit 191 -+#define __NR_mmap2 192 -+#define __NR_truncate64 193 -+#define __NR_ftruncate64 194 -+#define __NR_stat64 195 -+#define __NR_lstat64 196 -+#define __NR_fstat64 197 -+#define __NR_lchown32 198 -+#define __NR_getuid32 199 -+#define __NR_getgid32 200 -+#define __NR_geteuid32 201 -+#define __NR_getegid32 202 -+#define __NR_setreuid32 203 -+#define __NR_setregid32 204 -+#define __NR_getgroups32 205 -+#define __NR_setgroups32 206 -+#define __NR_fchown32 207 -+#define __NR_setresuid32 208 -+#define __NR_getresuid32 209 -+#define __NR_setresgid32 210 -+#define __NR_getresgid32 211 -+#define __NR_chown32 212 -+#define __NR_setuid32 213 -+#define __NR_setgid32 214 -+#define __NR_setfsuid32 215 -+#define __NR_setfsgid32 216 -+#define __NR_pivot_root 217 -+#define __NR_mincore 218 -+#define __NR_madvise 219 -+#define __NR_getdents64 220 -+#define __NR_fcntl64 221 -+#define __NR_gettid 224 -+#define __NR_readahead 225 -+#define __NR_setxattr 226 -+#define __NR_lsetxattr 227 -+#define __NR_fsetxattr 228 -+#define __NR_getxattr 229 -+#define __NR_lgetxattr 230 -+#define __NR_fgetxattr 231 -+#define __NR_listxattr 232 -+#define __NR_llistxattr 233 -+#define __NR_flistxattr 234 -+#define __NR_removexattr 235 -+#define __NR_lremovexattr 236 -+#define __NR_fremovexattr 237 -+#define __NR_tkill 238 -+#define __NR_sendfile64 239 -+#define __NR_futex 240 -+#define __NR_sched_setaffinity 241 -+#define __NR_sched_getaffinity 242 -+#define __NR_set_thread_area 243 -+#define __NR_get_thread_area 244 -+#define __NR_io_setup 245 -+#define __NR_io_destroy 246 -+#define __NR_io_getevents 247 -+#define __NR_io_submit 248 -+#define __NR_io_cancel 249 -+#define __NR_fadvise64 250 -+#define __NR_exit_group 252 -+#define __NR_lookup_dcookie 253 -+#define __NR_epoll_create 254 -+#define __NR_epoll_ctl 255 -+#define __NR_epoll_wait 256 -+#define __NR_remap_file_pages 257 -+#define __NR_set_tid_address 258 -+#define __NR_timer_create 259 -+#define __NR_timer_settime 260 -+#define __NR_timer_gettime 261 -+#define __NR_timer_getoverrun 262 -+#define __NR_timer_delete 263 -+#define __NR_clock_settime 264 -+#define __NR_clock_gettime 265 -+#define __NR_clock_getres 266 -+#define __NR_clock_nanosleep 267 -+#define __NR_statfs64 268 -+#define __NR_fstatfs64 269 -+#define __NR_tgkill 270 -+#define __NR_utimes 271 -+#define __NR_fadvise64_64 272 -+#define __NR_vserver 273 -+#define __NR_mbind 274 -+#define __NR_get_mempolicy 275 -+#define __NR_set_mempolicy 276 -+#define __NR_mq_open 277 -+#define __NR_mq_unlink 278 -+#define __NR_mq_timedsend 279 -+#define __NR_mq_timedreceive 280 -+#define __NR_mq_notify 281 -+#define __NR_mq_getsetattr 282 -+#define __NR_kexec_load 283 -+#define __NR_waitid 284 -+#define __NR_add_key 286 -+#define __NR_request_key 287 -+#define __NR_keyctl 288 -+#define __NR_ioprio_set 289 -+#define __NR_ioprio_get 290 -+#define __NR_inotify_init 291 -+#define __NR_inotify_add_watch 292 -+#define __NR_inotify_rm_watch 293 -+#define __NR_migrate_pages 294 -+#define __NR_openat 295 -+#define __NR_mkdirat 296 -+#define __NR_mknodat 297 -+#define __NR_fchownat 298 -+#define __NR_futimesat 299 -+#define __NR_fstatat64 300 -+#define __NR_unlinkat 301 -+#define __NR_renameat 302 -+#define __NR_linkat 303 -+#define __NR_symlinkat 304 -+#define __NR_readlinkat 305 -+#define __NR_fchmodat 306 -+#define __NR_faccessat 307 -+#define __NR_pselect6 308 -+#define __NR_ppoll 309 -+#define __NR_unshare 310 -+#define __NR_set_robust_list 311 -+#define __NR_get_robust_list 312 -+#define __NR_splice 313 -+#define __NR_sync_file_range 314 -+#define __NR_tee 315 -+#define __NR_vmsplice 316 -+#define __NR_move_pages 317 -+#define __NR_getcpu 318 -+#define __NR_epoll_pwait 319 -+#define __NR_utimensat 320 -+#define __NR_signalfd 321 -+#define __NR_timerfd_create 322 -+#define __NR_eventfd 323 -+#define __NR_fallocate 324 -+#define __NR_timerfd_settime 325 -+#define __NR_timerfd_gettime 326 -+#define __NR_signalfd4 327 -+#define __NR_eventfd2 328 -+#define __NR_epoll_create1 329 -+#define __NR_dup3 330 -+#define __NR_pipe2 331 -+#define __NR_inotify_init1 332 -+#define __NR_preadv 333 -+#define __NR_pwritev 334 -+#define __NR_rt_tgsigqueueinfo 335 -+#define __NR_perf_event_open 336 -+#define __NR_recvmmsg 337 -+#define __NR_fanotify_init 338 -+#define __NR_fanotify_mark 339 -+#define __NR_prlimit64 340 -+#define __NR_name_to_handle_at 341 -+#define __NR_open_by_handle_at 342 -+#define __NR_clock_adjtime 343 -+#define __NR_syncfs 344 -+#define __NR_sendmmsg 345 -+#define __NR_setns 346 -+#define __NR_process_vm_readv 347 -+#define __NR_process_vm_writev 348 -+#define __NR_kcmp 349 -+#define __NR_finit_module 350 -+#define __NR_sched_setattr 351 -+#define __NR_sched_getattr 352 -+#define __NR_renameat2 353 -+#define __NR_seccomp 354 -+#define __NR_getrandom 355 -+#define __NR_memfd_create 356 -+#define __NR_bpf 357 -+#define __NR_execveat 358 -+#define __NR_socket 359 -+#define __NR_socketpair 360 -+#define __NR_bind 361 -+#define __NR_connect 362 -+#define __NR_listen 363 -+#define __NR_accept4 364 -+#define __NR_getsockopt 365 -+#define __NR_setsockopt 366 -+#define __NR_getsockname 367 -+#define __NR_getpeername 368 -+#define __NR_sendto 369 -+#define __NR_sendmsg 370 -+#define __NR_recvfrom 371 -+#define __NR_recvmsg 372 -+#define __NR_shutdown 373 -+#define __NR_userfaultfd 374 -+#define __NR_membarrier 375 -+#define __NR_mlock2 376 -+#define __NR_copy_file_range 377 -+#define __NR_preadv2 378 -+#define __NR_pwritev2 379 -+#define __NR_pkey_mprotect 380 -+#define __NR_pkey_alloc 381 -+#define __NR_pkey_free 382 -+#define __NR_statx 383 -+#define __NR_arch_prctl 384 -+#define __NR_io_pgetevents 385 -+#define __NR_rseq 386 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_clock_gettime64 403 -+#define __NR_clock_settime64 404 -+#define __NR_clock_adjtime64 405 -+#define __NR_clock_getres_time64 406 -+#define __NR_clock_nanosleep_time64 407 -+#define __NR_timer_gettime64 408 -+#define __NR_timer_settime64 409 -+#define __NR_timerfd_gettime64 410 -+#define __NR_timerfd_settime64 411 -+#define __NR_utimensat_time64 412 -+#define __NR_pselect6_time64 413 -+#define __NR_ppoll_time64 414 -+#define __NR_io_pgetevents_time64 416 -+#define __NR_recvmmsg_time64 417 -+#define __NR_mq_timedsend_time64 418 -+#define __NR_mq_timedreceive_time64 419 -+#define __NR_semtimedop_time64 420 -+#define __NR_rt_sigtimedwait_time64 421 -+#define __NR_futex_time64 422 -+#define __NR_sched_rr_get_interval_time64 423 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_X86_UNISTD_32_H */ ---- /dev/null -+++ b/tests/include/x86_64-pc-linux-gnu/asm/unistd_64.h -@@ -0,0 +1,352 @@ -+#ifndef _ASM_X86_UNISTD_64_H -+#define _ASM_X86_UNISTD_64_H 1 -+ -+#define __NR_read 0 -+#define __NR_write 1 -+#define __NR_open 2 -+#define __NR_close 3 -+#define __NR_stat 4 -+#define __NR_fstat 5 -+#define __NR_lstat 6 -+#define __NR_poll 7 -+#define __NR_lseek 8 -+#define __NR_mmap 9 -+#define __NR_mprotect 10 -+#define __NR_munmap 11 -+#define __NR_brk 12 -+#define __NR_rt_sigaction 13 -+#define __NR_rt_sigprocmask 14 -+#define __NR_rt_sigreturn 15 -+#define __NR_ioctl 16 -+#define __NR_pread64 17 -+#define __NR_pwrite64 18 -+#define __NR_readv 19 -+#define __NR_writev 20 -+#define __NR_access 21 -+#define __NR_pipe 22 -+#define __NR_select 23 -+#define __NR_sched_yield 24 -+#define __NR_mremap 25 -+#define __NR_msync 26 -+#define __NR_mincore 27 -+#define __NR_madvise 28 -+#define __NR_shmget 29 -+#define __NR_shmat 30 -+#define __NR_shmctl 31 -+#define __NR_dup 32 -+#define __NR_dup2 33 -+#define __NR_pause 34 -+#define __NR_nanosleep 35 -+#define __NR_getitimer 36 -+#define __NR_alarm 37 -+#define __NR_setitimer 38 -+#define __NR_getpid 39 -+#define __NR_sendfile 40 -+#define __NR_socket 41 -+#define __NR_connect 42 -+#define __NR_accept 43 -+#define __NR_sendto 44 -+#define __NR_recvfrom 45 -+#define __NR_sendmsg 46 -+#define __NR_recvmsg 47 -+#define __NR_shutdown 48 -+#define __NR_bind 49 -+#define __NR_listen 50 -+#define __NR_getsockname 51 -+#define __NR_getpeername 52 -+#define __NR_socketpair 53 -+#define __NR_setsockopt 54 -+#define __NR_getsockopt 55 -+#define __NR_clone 56 -+#define __NR_fork 57 -+#define __NR_vfork 58 -+#define __NR_execve 59 -+#define __NR_exit 60 -+#define __NR_wait4 61 -+#define __NR_kill 62 -+#define __NR_uname 63 -+#define __NR_semget 64 -+#define __NR_semop 65 -+#define __NR_semctl 66 -+#define __NR_shmdt 67 -+#define __NR_msgget 68 -+#define __NR_msgsnd 69 -+#define __NR_msgrcv 70 -+#define __NR_msgctl 71 -+#define __NR_fcntl 72 -+#define __NR_flock 73 -+#define __NR_fsync 74 -+#define __NR_fdatasync 75 -+#define __NR_truncate 76 -+#define __NR_ftruncate 77 -+#define __NR_getdents 78 -+#define __NR_getcwd 79 -+#define __NR_chdir 80 -+#define __NR_fchdir 81 -+#define __NR_rename 82 -+#define __NR_mkdir 83 -+#define __NR_rmdir 84 -+#define __NR_creat 85 -+#define __NR_link 86 -+#define __NR_unlink 87 -+#define __NR_symlink 88 -+#define __NR_readlink 89 -+#define __NR_chmod 90 -+#define __NR_fchmod 91 -+#define __NR_chown 92 -+#define __NR_fchown 93 -+#define __NR_lchown 94 -+#define __NR_umask 95 -+#define __NR_gettimeofday 96 -+#define __NR_getrlimit 97 -+#define __NR_getrusage 98 -+#define __NR_sysinfo 99 -+#define __NR_times 100 -+#define __NR_ptrace 101 -+#define __NR_getuid 102 -+#define __NR_syslog 103 -+#define __NR_getgid 104 -+#define __NR_setuid 105 -+#define __NR_setgid 106 -+#define __NR_geteuid 107 -+#define __NR_getegid 108 -+#define __NR_setpgid 109 -+#define __NR_getppid 110 -+#define __NR_getpgrp 111 -+#define __NR_setsid 112 -+#define __NR_setreuid 113 -+#define __NR_setregid 114 -+#define __NR_getgroups 115 -+#define __NR_setgroups 116 -+#define __NR_setresuid 117 -+#define __NR_getresuid 118 -+#define __NR_setresgid 119 -+#define __NR_getresgid 120 -+#define __NR_getpgid 121 -+#define __NR_setfsuid 122 -+#define __NR_setfsgid 123 -+#define __NR_getsid 124 -+#define __NR_capget 125 -+#define __NR_capset 126 -+#define __NR_rt_sigpending 127 -+#define __NR_rt_sigtimedwait 128 -+#define __NR_rt_sigqueueinfo 129 -+#define __NR_rt_sigsuspend 130 -+#define __NR_sigaltstack 131 -+#define __NR_utime 132 -+#define __NR_mknod 133 -+#define __NR_uselib 134 -+#define __NR_personality 135 -+#define __NR_ustat 136 -+#define __NR_statfs 137 -+#define __NR_fstatfs 138 -+#define __NR_sysfs 139 -+#define __NR_getpriority 140 -+#define __NR_setpriority 141 -+#define __NR_sched_setparam 142 -+#define __NR_sched_getparam 143 -+#define __NR_sched_setscheduler 144 -+#define __NR_sched_getscheduler 145 -+#define __NR_sched_get_priority_max 146 -+#define __NR_sched_get_priority_min 147 -+#define __NR_sched_rr_get_interval 148 -+#define __NR_mlock 149 -+#define __NR_munlock 150 -+#define __NR_mlockall 151 -+#define __NR_munlockall 152 -+#define __NR_vhangup 153 -+#define __NR_modify_ldt 154 -+#define __NR_pivot_root 155 -+#define __NR__sysctl 156 -+#define __NR_prctl 157 -+#define __NR_arch_prctl 158 -+#define __NR_adjtimex 159 -+#define __NR_setrlimit 160 -+#define __NR_chroot 161 -+#define __NR_sync 162 -+#define __NR_acct 163 -+#define __NR_settimeofday 164 -+#define __NR_mount 165 -+#define __NR_umount2 166 -+#define __NR_swapon 167 -+#define __NR_swapoff 168 -+#define __NR_reboot 169 -+#define __NR_sethostname 170 -+#define __NR_setdomainname 171 -+#define __NR_iopl 172 -+#define __NR_ioperm 173 -+#define __NR_create_module 174 -+#define __NR_init_module 175 -+#define __NR_delete_module 176 -+#define __NR_get_kernel_syms 177 -+#define __NR_query_module 178 -+#define __NR_quotactl 179 -+#define __NR_nfsservctl 180 -+#define __NR_getpmsg 181 -+#define __NR_putpmsg 182 -+#define __NR_afs_syscall 183 -+#define __NR_tuxcall 184 -+#define __NR_security 185 -+#define __NR_gettid 186 -+#define __NR_readahead 187 -+#define __NR_setxattr 188 -+#define __NR_lsetxattr 189 -+#define __NR_fsetxattr 190 -+#define __NR_getxattr 191 -+#define __NR_lgetxattr 192 -+#define __NR_fgetxattr 193 -+#define __NR_listxattr 194 -+#define __NR_llistxattr 195 -+#define __NR_flistxattr 196 -+#define __NR_removexattr 197 -+#define __NR_lremovexattr 198 -+#define __NR_fremovexattr 199 -+#define __NR_tkill 200 -+#define __NR_time 201 -+#define __NR_futex 202 -+#define __NR_sched_setaffinity 203 -+#define __NR_sched_getaffinity 204 -+#define __NR_set_thread_area 205 -+#define __NR_io_setup 206 -+#define __NR_io_destroy 207 -+#define __NR_io_getevents 208 -+#define __NR_io_submit 209 -+#define __NR_io_cancel 210 -+#define __NR_get_thread_area 211 -+#define __NR_lookup_dcookie 212 -+#define __NR_epoll_create 213 -+#define __NR_epoll_ctl_old 214 -+#define __NR_epoll_wait_old 215 -+#define __NR_remap_file_pages 216 -+#define __NR_getdents64 217 -+#define __NR_set_tid_address 218 -+#define __NR_restart_syscall 219 -+#define __NR_semtimedop 220 -+#define __NR_fadvise64 221 -+#define __NR_timer_create 222 -+#define __NR_timer_settime 223 -+#define __NR_timer_gettime 224 -+#define __NR_timer_getoverrun 225 -+#define __NR_timer_delete 226 -+#define __NR_clock_settime 227 -+#define __NR_clock_gettime 228 -+#define __NR_clock_getres 229 -+#define __NR_clock_nanosleep 230 -+#define __NR_exit_group 231 -+#define __NR_epoll_wait 232 -+#define __NR_epoll_ctl 233 -+#define __NR_tgkill 234 -+#define __NR_utimes 235 -+#define __NR_vserver 236 -+#define __NR_mbind 237 -+#define __NR_set_mempolicy 238 -+#define __NR_get_mempolicy 239 -+#define __NR_mq_open 240 -+#define __NR_mq_unlink 241 -+#define __NR_mq_timedsend 242 -+#define __NR_mq_timedreceive 243 -+#define __NR_mq_notify 244 -+#define __NR_mq_getsetattr 245 -+#define __NR_kexec_load 246 -+#define __NR_waitid 247 -+#define __NR_add_key 248 -+#define __NR_request_key 249 -+#define __NR_keyctl 250 -+#define __NR_ioprio_set 251 -+#define __NR_ioprio_get 252 -+#define __NR_inotify_init 253 -+#define __NR_inotify_add_watch 254 -+#define __NR_inotify_rm_watch 255 -+#define __NR_migrate_pages 256 -+#define __NR_openat 257 -+#define __NR_mkdirat 258 -+#define __NR_mknodat 259 -+#define __NR_fchownat 260 -+#define __NR_futimesat 261 -+#define __NR_newfstatat 262 -+#define __NR_unlinkat 263 -+#define __NR_renameat 264 -+#define __NR_linkat 265 -+#define __NR_symlinkat 266 -+#define __NR_readlinkat 267 -+#define __NR_fchmodat 268 -+#define __NR_faccessat 269 -+#define __NR_pselect6 270 -+#define __NR_ppoll 271 -+#define __NR_unshare 272 -+#define __NR_set_robust_list 273 -+#define __NR_get_robust_list 274 -+#define __NR_splice 275 -+#define __NR_tee 276 -+#define __NR_sync_file_range 277 -+#define __NR_vmsplice 278 -+#define __NR_move_pages 279 -+#define __NR_utimensat 280 -+#define __NR_epoll_pwait 281 -+#define __NR_signalfd 282 -+#define __NR_timerfd_create 283 -+#define __NR_eventfd 284 -+#define __NR_fallocate 285 -+#define __NR_timerfd_settime 286 -+#define __NR_timerfd_gettime 287 -+#define __NR_accept4 288 -+#define __NR_signalfd4 289 -+#define __NR_eventfd2 290 -+#define __NR_epoll_create1 291 -+#define __NR_dup3 292 -+#define __NR_pipe2 293 -+#define __NR_inotify_init1 294 -+#define __NR_preadv 295 -+#define __NR_pwritev 296 -+#define __NR_rt_tgsigqueueinfo 297 -+#define __NR_perf_event_open 298 -+#define __NR_recvmmsg 299 -+#define __NR_fanotify_init 300 -+#define __NR_fanotify_mark 301 -+#define __NR_prlimit64 302 -+#define __NR_name_to_handle_at 303 -+#define __NR_open_by_handle_at 304 -+#define __NR_clock_adjtime 305 -+#define __NR_syncfs 306 -+#define __NR_sendmmsg 307 -+#define __NR_setns 308 -+#define __NR_getcpu 309 -+#define __NR_process_vm_readv 310 -+#define __NR_process_vm_writev 311 -+#define __NR_kcmp 312 -+#define __NR_finit_module 313 -+#define __NR_sched_setattr 314 -+#define __NR_sched_getattr 315 -+#define __NR_renameat2 316 -+#define __NR_seccomp 317 -+#define __NR_getrandom 318 -+#define __NR_memfd_create 319 -+#define __NR_kexec_file_load 320 -+#define __NR_bpf 321 -+#define __NR_execveat 322 -+#define __NR_userfaultfd 323 -+#define __NR_membarrier 324 -+#define __NR_mlock2 325 -+#define __NR_copy_file_range 326 -+#define __NR_preadv2 327 -+#define __NR_pwritev2 328 -+#define __NR_pkey_mprotect 329 -+#define __NR_pkey_alloc 330 -+#define __NR_pkey_free 331 -+#define __NR_statx 332 -+#define __NR_io_pgetevents 333 -+#define __NR_rseq 334 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_X86_UNISTD_64_H */ ---- /dev/null -+++ b/tests/include/x86_64-pc-linux-gnu/asm/unistd_x32.h -@@ -0,0 +1,341 @@ -+#ifndef _ASM_X86_UNISTD_X32_H -+#define _ASM_X86_UNISTD_X32_H 1 -+ -+#define __NR_read (__X32_SYSCALL_BIT + 0) -+#define __NR_write (__X32_SYSCALL_BIT + 1) -+#define __NR_open (__X32_SYSCALL_BIT + 2) -+#define __NR_close (__X32_SYSCALL_BIT + 3) -+#define __NR_stat (__X32_SYSCALL_BIT + 4) -+#define __NR_fstat (__X32_SYSCALL_BIT + 5) -+#define __NR_lstat (__X32_SYSCALL_BIT + 6) -+#define __NR_poll (__X32_SYSCALL_BIT + 7) -+#define __NR_lseek (__X32_SYSCALL_BIT + 8) -+#define __NR_mmap (__X32_SYSCALL_BIT + 9) -+#define __NR_mprotect (__X32_SYSCALL_BIT + 10) -+#define __NR_munmap (__X32_SYSCALL_BIT + 11) -+#define __NR_brk (__X32_SYSCALL_BIT + 12) -+#define __NR_rt_sigprocmask (__X32_SYSCALL_BIT + 14) -+#define __NR_pread64 (__X32_SYSCALL_BIT + 17) -+#define __NR_pwrite64 (__X32_SYSCALL_BIT + 18) -+#define __NR_access (__X32_SYSCALL_BIT + 21) -+#define __NR_pipe (__X32_SYSCALL_BIT + 22) -+#define __NR_select (__X32_SYSCALL_BIT + 23) -+#define __NR_sched_yield (__X32_SYSCALL_BIT + 24) -+#define __NR_mremap (__X32_SYSCALL_BIT + 25) -+#define __NR_msync (__X32_SYSCALL_BIT + 26) -+#define __NR_mincore (__X32_SYSCALL_BIT + 27) -+#define __NR_madvise (__X32_SYSCALL_BIT + 28) -+#define __NR_shmget (__X32_SYSCALL_BIT + 29) -+#define __NR_shmat (__X32_SYSCALL_BIT + 30) -+#define __NR_shmctl (__X32_SYSCALL_BIT + 31) -+#define __NR_dup (__X32_SYSCALL_BIT + 32) -+#define __NR_dup2 (__X32_SYSCALL_BIT + 33) -+#define __NR_pause (__X32_SYSCALL_BIT + 34) -+#define __NR_nanosleep (__X32_SYSCALL_BIT + 35) -+#define __NR_getitimer (__X32_SYSCALL_BIT + 36) -+#define __NR_alarm (__X32_SYSCALL_BIT + 37) -+#define __NR_setitimer (__X32_SYSCALL_BIT + 38) -+#define __NR_getpid (__X32_SYSCALL_BIT + 39) -+#define __NR_sendfile (__X32_SYSCALL_BIT + 40) -+#define __NR_socket (__X32_SYSCALL_BIT + 41) -+#define __NR_connect (__X32_SYSCALL_BIT + 42) -+#define __NR_accept (__X32_SYSCALL_BIT + 43) -+#define __NR_sendto (__X32_SYSCALL_BIT + 44) -+#define __NR_shutdown (__X32_SYSCALL_BIT + 48) -+#define __NR_bind (__X32_SYSCALL_BIT + 49) -+#define __NR_listen (__X32_SYSCALL_BIT + 50) -+#define __NR_getsockname (__X32_SYSCALL_BIT + 51) -+#define __NR_getpeername (__X32_SYSCALL_BIT + 52) -+#define __NR_socketpair (__X32_SYSCALL_BIT + 53) -+#define __NR_clone (__X32_SYSCALL_BIT + 56) -+#define __NR_fork (__X32_SYSCALL_BIT + 57) -+#define __NR_vfork (__X32_SYSCALL_BIT + 58) -+#define __NR_exit (__X32_SYSCALL_BIT + 60) -+#define __NR_wait4 (__X32_SYSCALL_BIT + 61) -+#define __NR_kill (__X32_SYSCALL_BIT + 62) -+#define __NR_uname (__X32_SYSCALL_BIT + 63) -+#define __NR_semget (__X32_SYSCALL_BIT + 64) -+#define __NR_semop (__X32_SYSCALL_BIT + 65) -+#define __NR_semctl (__X32_SYSCALL_BIT + 66) -+#define __NR_shmdt (__X32_SYSCALL_BIT + 67) -+#define __NR_msgget (__X32_SYSCALL_BIT + 68) -+#define __NR_msgsnd (__X32_SYSCALL_BIT + 69) -+#define __NR_msgrcv (__X32_SYSCALL_BIT + 70) -+#define __NR_msgctl (__X32_SYSCALL_BIT + 71) -+#define __NR_fcntl (__X32_SYSCALL_BIT + 72) -+#define __NR_flock (__X32_SYSCALL_BIT + 73) -+#define __NR_fsync (__X32_SYSCALL_BIT + 74) -+#define __NR_fdatasync (__X32_SYSCALL_BIT + 75) -+#define __NR_truncate (__X32_SYSCALL_BIT + 76) -+#define __NR_ftruncate (__X32_SYSCALL_BIT + 77) -+#define __NR_getdents (__X32_SYSCALL_BIT + 78) -+#define __NR_getcwd (__X32_SYSCALL_BIT + 79) -+#define __NR_chdir (__X32_SYSCALL_BIT + 80) -+#define __NR_fchdir (__X32_SYSCALL_BIT + 81) -+#define __NR_rename (__X32_SYSCALL_BIT + 82) -+#define __NR_mkdir (__X32_SYSCALL_BIT + 83) -+#define __NR_rmdir (__X32_SYSCALL_BIT + 84) -+#define __NR_creat (__X32_SYSCALL_BIT + 85) -+#define __NR_link (__X32_SYSCALL_BIT + 86) -+#define __NR_unlink (__X32_SYSCALL_BIT + 87) -+#define __NR_symlink (__X32_SYSCALL_BIT + 88) -+#define __NR_readlink (__X32_SYSCALL_BIT + 89) -+#define __NR_chmod (__X32_SYSCALL_BIT + 90) -+#define __NR_fchmod (__X32_SYSCALL_BIT + 91) -+#define __NR_chown (__X32_SYSCALL_BIT + 92) -+#define __NR_fchown (__X32_SYSCALL_BIT + 93) -+#define __NR_lchown (__X32_SYSCALL_BIT + 94) -+#define __NR_umask (__X32_SYSCALL_BIT + 95) -+#define __NR_gettimeofday (__X32_SYSCALL_BIT + 96) -+#define __NR_getrlimit (__X32_SYSCALL_BIT + 97) -+#define __NR_getrusage (__X32_SYSCALL_BIT + 98) -+#define __NR_sysinfo (__X32_SYSCALL_BIT + 99) -+#define __NR_times (__X32_SYSCALL_BIT + 100) -+#define __NR_getuid (__X32_SYSCALL_BIT + 102) -+#define __NR_syslog (__X32_SYSCALL_BIT + 103) -+#define __NR_getgid (__X32_SYSCALL_BIT + 104) -+#define __NR_setuid (__X32_SYSCALL_BIT + 105) -+#define __NR_setgid (__X32_SYSCALL_BIT + 106) -+#define __NR_geteuid (__X32_SYSCALL_BIT + 107) -+#define __NR_getegid (__X32_SYSCALL_BIT + 108) -+#define __NR_setpgid (__X32_SYSCALL_BIT + 109) -+#define __NR_getppid (__X32_SYSCALL_BIT + 110) -+#define __NR_getpgrp (__X32_SYSCALL_BIT + 111) -+#define __NR_setsid (__X32_SYSCALL_BIT + 112) -+#define __NR_setreuid (__X32_SYSCALL_BIT + 113) -+#define __NR_setregid (__X32_SYSCALL_BIT + 114) -+#define __NR_getgroups (__X32_SYSCALL_BIT + 115) -+#define __NR_setgroups (__X32_SYSCALL_BIT + 116) -+#define __NR_setresuid (__X32_SYSCALL_BIT + 117) -+#define __NR_getresuid (__X32_SYSCALL_BIT + 118) -+#define __NR_setresgid (__X32_SYSCALL_BIT + 119) -+#define __NR_getresgid (__X32_SYSCALL_BIT + 120) -+#define __NR_getpgid (__X32_SYSCALL_BIT + 121) -+#define __NR_setfsuid (__X32_SYSCALL_BIT + 122) -+#define __NR_setfsgid (__X32_SYSCALL_BIT + 123) -+#define __NR_getsid (__X32_SYSCALL_BIT + 124) -+#define __NR_capget (__X32_SYSCALL_BIT + 125) -+#define __NR_capset (__X32_SYSCALL_BIT + 126) -+#define __NR_rt_sigsuspend (__X32_SYSCALL_BIT + 130) -+#define __NR_utime (__X32_SYSCALL_BIT + 132) -+#define __NR_mknod (__X32_SYSCALL_BIT + 133) -+#define __NR_personality (__X32_SYSCALL_BIT + 135) -+#define __NR_ustat (__X32_SYSCALL_BIT + 136) -+#define __NR_statfs (__X32_SYSCALL_BIT + 137) -+#define __NR_fstatfs (__X32_SYSCALL_BIT + 138) -+#define __NR_sysfs (__X32_SYSCALL_BIT + 139) -+#define __NR_getpriority (__X32_SYSCALL_BIT + 140) -+#define __NR_setpriority (__X32_SYSCALL_BIT + 141) -+#define __NR_sched_setparam (__X32_SYSCALL_BIT + 142) -+#define __NR_sched_getparam (__X32_SYSCALL_BIT + 143) -+#define __NR_sched_setscheduler (__X32_SYSCALL_BIT + 144) -+#define __NR_sched_getscheduler (__X32_SYSCALL_BIT + 145) -+#define __NR_sched_get_priority_max (__X32_SYSCALL_BIT + 146) -+#define __NR_sched_get_priority_min (__X32_SYSCALL_BIT + 147) -+#define __NR_sched_rr_get_interval (__X32_SYSCALL_BIT + 148) -+#define __NR_mlock (__X32_SYSCALL_BIT + 149) -+#define __NR_munlock (__X32_SYSCALL_BIT + 150) -+#define __NR_mlockall (__X32_SYSCALL_BIT + 151) -+#define __NR_munlockall (__X32_SYSCALL_BIT + 152) -+#define __NR_vhangup (__X32_SYSCALL_BIT + 153) -+#define __NR_modify_ldt (__X32_SYSCALL_BIT + 154) -+#define __NR_pivot_root (__X32_SYSCALL_BIT + 155) -+#define __NR_prctl (__X32_SYSCALL_BIT + 157) -+#define __NR_arch_prctl (__X32_SYSCALL_BIT + 158) -+#define __NR_adjtimex (__X32_SYSCALL_BIT + 159) -+#define __NR_setrlimit (__X32_SYSCALL_BIT + 160) -+#define __NR_chroot (__X32_SYSCALL_BIT + 161) -+#define __NR_sync (__X32_SYSCALL_BIT + 162) -+#define __NR_acct (__X32_SYSCALL_BIT + 163) -+#define __NR_settimeofday (__X32_SYSCALL_BIT + 164) -+#define __NR_mount (__X32_SYSCALL_BIT + 165) -+#define __NR_umount2 (__X32_SYSCALL_BIT + 166) -+#define __NR_swapon (__X32_SYSCALL_BIT + 167) -+#define __NR_swapoff (__X32_SYSCALL_BIT + 168) -+#define __NR_reboot (__X32_SYSCALL_BIT + 169) -+#define __NR_sethostname (__X32_SYSCALL_BIT + 170) -+#define __NR_setdomainname (__X32_SYSCALL_BIT + 171) -+#define __NR_iopl (__X32_SYSCALL_BIT + 172) -+#define __NR_ioperm (__X32_SYSCALL_BIT + 173) -+#define __NR_init_module (__X32_SYSCALL_BIT + 175) -+#define __NR_delete_module (__X32_SYSCALL_BIT + 176) -+#define __NR_quotactl (__X32_SYSCALL_BIT + 179) -+#define __NR_getpmsg (__X32_SYSCALL_BIT + 181) -+#define __NR_putpmsg (__X32_SYSCALL_BIT + 182) -+#define __NR_afs_syscall (__X32_SYSCALL_BIT + 183) -+#define __NR_tuxcall (__X32_SYSCALL_BIT + 184) -+#define __NR_security (__X32_SYSCALL_BIT + 185) -+#define __NR_gettid (__X32_SYSCALL_BIT + 186) -+#define __NR_readahead (__X32_SYSCALL_BIT + 187) -+#define __NR_setxattr (__X32_SYSCALL_BIT + 188) -+#define __NR_lsetxattr (__X32_SYSCALL_BIT + 189) -+#define __NR_fsetxattr (__X32_SYSCALL_BIT + 190) -+#define __NR_getxattr (__X32_SYSCALL_BIT + 191) -+#define __NR_lgetxattr (__X32_SYSCALL_BIT + 192) -+#define __NR_fgetxattr (__X32_SYSCALL_BIT + 193) -+#define __NR_listxattr (__X32_SYSCALL_BIT + 194) -+#define __NR_llistxattr (__X32_SYSCALL_BIT + 195) -+#define __NR_flistxattr (__X32_SYSCALL_BIT + 196) -+#define __NR_removexattr (__X32_SYSCALL_BIT + 197) -+#define __NR_lremovexattr (__X32_SYSCALL_BIT + 198) -+#define __NR_fremovexattr (__X32_SYSCALL_BIT + 199) -+#define __NR_tkill (__X32_SYSCALL_BIT + 200) -+#define __NR_time (__X32_SYSCALL_BIT + 201) -+#define __NR_futex (__X32_SYSCALL_BIT + 202) -+#define __NR_sched_setaffinity (__X32_SYSCALL_BIT + 203) -+#define __NR_sched_getaffinity (__X32_SYSCALL_BIT + 204) -+#define __NR_io_destroy (__X32_SYSCALL_BIT + 207) -+#define __NR_io_getevents (__X32_SYSCALL_BIT + 208) -+#define __NR_io_cancel (__X32_SYSCALL_BIT + 210) -+#define __NR_lookup_dcookie (__X32_SYSCALL_BIT + 212) -+#define __NR_epoll_create (__X32_SYSCALL_BIT + 213) -+#define __NR_remap_file_pages (__X32_SYSCALL_BIT + 216) -+#define __NR_getdents64 (__X32_SYSCALL_BIT + 217) -+#define __NR_set_tid_address (__X32_SYSCALL_BIT + 218) -+#define __NR_restart_syscall (__X32_SYSCALL_BIT + 219) -+#define __NR_semtimedop (__X32_SYSCALL_BIT + 220) -+#define __NR_fadvise64 (__X32_SYSCALL_BIT + 221) -+#define __NR_timer_settime (__X32_SYSCALL_BIT + 223) -+#define __NR_timer_gettime (__X32_SYSCALL_BIT + 224) -+#define __NR_timer_getoverrun (__X32_SYSCALL_BIT + 225) -+#define __NR_timer_delete (__X32_SYSCALL_BIT + 226) -+#define __NR_clock_settime (__X32_SYSCALL_BIT + 227) -+#define __NR_clock_gettime (__X32_SYSCALL_BIT + 228) -+#define __NR_clock_getres (__X32_SYSCALL_BIT + 229) -+#define __NR_clock_nanosleep (__X32_SYSCALL_BIT + 230) -+#define __NR_exit_group (__X32_SYSCALL_BIT + 231) -+#define __NR_epoll_wait (__X32_SYSCALL_BIT + 232) -+#define __NR_epoll_ctl (__X32_SYSCALL_BIT + 233) -+#define __NR_tgkill (__X32_SYSCALL_BIT + 234) -+#define __NR_utimes (__X32_SYSCALL_BIT + 235) -+#define __NR_mbind (__X32_SYSCALL_BIT + 237) -+#define __NR_set_mempolicy (__X32_SYSCALL_BIT + 238) -+#define __NR_get_mempolicy (__X32_SYSCALL_BIT + 239) -+#define __NR_mq_open (__X32_SYSCALL_BIT + 240) -+#define __NR_mq_unlink (__X32_SYSCALL_BIT + 241) -+#define __NR_mq_timedsend (__X32_SYSCALL_BIT + 242) -+#define __NR_mq_timedreceive (__X32_SYSCALL_BIT + 243) -+#define __NR_mq_getsetattr (__X32_SYSCALL_BIT + 245) -+#define __NR_add_key (__X32_SYSCALL_BIT + 248) -+#define __NR_request_key (__X32_SYSCALL_BIT + 249) -+#define __NR_keyctl (__X32_SYSCALL_BIT + 250) -+#define __NR_ioprio_set (__X32_SYSCALL_BIT + 251) -+#define __NR_ioprio_get (__X32_SYSCALL_BIT + 252) -+#define __NR_inotify_init (__X32_SYSCALL_BIT + 253) -+#define __NR_inotify_add_watch (__X32_SYSCALL_BIT + 254) -+#define __NR_inotify_rm_watch (__X32_SYSCALL_BIT + 255) -+#define __NR_migrate_pages (__X32_SYSCALL_BIT + 256) -+#define __NR_openat (__X32_SYSCALL_BIT + 257) -+#define __NR_mkdirat (__X32_SYSCALL_BIT + 258) -+#define __NR_mknodat (__X32_SYSCALL_BIT + 259) -+#define __NR_fchownat (__X32_SYSCALL_BIT + 260) -+#define __NR_futimesat (__X32_SYSCALL_BIT + 261) -+#define __NR_newfstatat (__X32_SYSCALL_BIT + 262) -+#define __NR_unlinkat (__X32_SYSCALL_BIT + 263) -+#define __NR_renameat (__X32_SYSCALL_BIT + 264) -+#define __NR_linkat (__X32_SYSCALL_BIT + 265) -+#define __NR_symlinkat (__X32_SYSCALL_BIT + 266) -+#define __NR_readlinkat (__X32_SYSCALL_BIT + 267) -+#define __NR_fchmodat (__X32_SYSCALL_BIT + 268) -+#define __NR_faccessat (__X32_SYSCALL_BIT + 269) -+#define __NR_pselect6 (__X32_SYSCALL_BIT + 270) -+#define __NR_ppoll (__X32_SYSCALL_BIT + 271) -+#define __NR_unshare (__X32_SYSCALL_BIT + 272) -+#define __NR_splice (__X32_SYSCALL_BIT + 275) -+#define __NR_tee (__X32_SYSCALL_BIT + 276) -+#define __NR_sync_file_range (__X32_SYSCALL_BIT + 277) -+#define __NR_utimensat (__X32_SYSCALL_BIT + 280) -+#define __NR_epoll_pwait (__X32_SYSCALL_BIT + 281) -+#define __NR_signalfd (__X32_SYSCALL_BIT + 282) -+#define __NR_timerfd_create (__X32_SYSCALL_BIT + 283) -+#define __NR_eventfd (__X32_SYSCALL_BIT + 284) -+#define __NR_fallocate (__X32_SYSCALL_BIT + 285) -+#define __NR_timerfd_settime (__X32_SYSCALL_BIT + 286) -+#define __NR_timerfd_gettime (__X32_SYSCALL_BIT + 287) -+#define __NR_accept4 (__X32_SYSCALL_BIT + 288) -+#define __NR_signalfd4 (__X32_SYSCALL_BIT + 289) -+#define __NR_eventfd2 (__X32_SYSCALL_BIT + 290) -+#define __NR_epoll_create1 (__X32_SYSCALL_BIT + 291) -+#define __NR_dup3 (__X32_SYSCALL_BIT + 292) -+#define __NR_pipe2 (__X32_SYSCALL_BIT + 293) -+#define __NR_inotify_init1 (__X32_SYSCALL_BIT + 294) -+#define __NR_perf_event_open (__X32_SYSCALL_BIT + 298) -+#define __NR_fanotify_init (__X32_SYSCALL_BIT + 300) -+#define __NR_fanotify_mark (__X32_SYSCALL_BIT + 301) -+#define __NR_prlimit64 (__X32_SYSCALL_BIT + 302) -+#define __NR_name_to_handle_at (__X32_SYSCALL_BIT + 303) -+#define __NR_open_by_handle_at (__X32_SYSCALL_BIT + 304) -+#define __NR_clock_adjtime (__X32_SYSCALL_BIT + 305) -+#define __NR_syncfs (__X32_SYSCALL_BIT + 306) -+#define __NR_setns (__X32_SYSCALL_BIT + 308) -+#define __NR_getcpu (__X32_SYSCALL_BIT + 309) -+#define __NR_kcmp (__X32_SYSCALL_BIT + 312) -+#define __NR_finit_module (__X32_SYSCALL_BIT + 313) -+#define __NR_sched_setattr (__X32_SYSCALL_BIT + 314) -+#define __NR_sched_getattr (__X32_SYSCALL_BIT + 315) -+#define __NR_renameat2 (__X32_SYSCALL_BIT + 316) -+#define __NR_seccomp (__X32_SYSCALL_BIT + 317) -+#define __NR_getrandom (__X32_SYSCALL_BIT + 318) -+#define __NR_memfd_create (__X32_SYSCALL_BIT + 319) -+#define __NR_kexec_file_load (__X32_SYSCALL_BIT + 320) -+#define __NR_bpf (__X32_SYSCALL_BIT + 321) -+#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323) -+#define __NR_membarrier (__X32_SYSCALL_BIT + 324) -+#define __NR_mlock2 (__X32_SYSCALL_BIT + 325) -+#define __NR_copy_file_range (__X32_SYSCALL_BIT + 326) -+#define __NR_pkey_mprotect (__X32_SYSCALL_BIT + 329) -+#define __NR_pkey_alloc (__X32_SYSCALL_BIT + 330) -+#define __NR_pkey_free (__X32_SYSCALL_BIT + 331) -+#define __NR_statx (__X32_SYSCALL_BIT + 332) -+#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333) -+#define __NR_rseq (__X32_SYSCALL_BIT + 334) -+#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424) -+#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425) -+#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426) -+#define __NR_io_uring_register (__X32_SYSCALL_BIT + 427) -+#define __NR_open_tree (__X32_SYSCALL_BIT + 428) -+#define __NR_move_mount (__X32_SYSCALL_BIT + 429) -+#define __NR_fsopen (__X32_SYSCALL_BIT + 430) -+#define __NR_fsconfig (__X32_SYSCALL_BIT + 431) -+#define __NR_fsmount (__X32_SYSCALL_BIT + 432) -+#define __NR_fspick (__X32_SYSCALL_BIT + 433) -+#define __NR_pidfd_open (__X32_SYSCALL_BIT + 434) -+#define __NR_clone3 (__X32_SYSCALL_BIT + 435) -+#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) -+#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) -+#define __NR_ioctl (__X32_SYSCALL_BIT + 514) -+#define __NR_readv (__X32_SYSCALL_BIT + 515) -+#define __NR_writev (__X32_SYSCALL_BIT + 516) -+#define __NR_recvfrom (__X32_SYSCALL_BIT + 517) -+#define __NR_sendmsg (__X32_SYSCALL_BIT + 518) -+#define __NR_recvmsg (__X32_SYSCALL_BIT + 519) -+#define __NR_execve (__X32_SYSCALL_BIT + 520) -+#define __NR_ptrace (__X32_SYSCALL_BIT + 521) -+#define __NR_rt_sigpending (__X32_SYSCALL_BIT + 522) -+#define __NR_rt_sigtimedwait (__X32_SYSCALL_BIT + 523) -+#define __NR_rt_sigqueueinfo (__X32_SYSCALL_BIT + 524) -+#define __NR_sigaltstack (__X32_SYSCALL_BIT + 525) -+#define __NR_timer_create (__X32_SYSCALL_BIT + 526) -+#define __NR_mq_notify (__X32_SYSCALL_BIT + 527) -+#define __NR_kexec_load (__X32_SYSCALL_BIT + 528) -+#define __NR_waitid (__X32_SYSCALL_BIT + 529) -+#define __NR_set_robust_list (__X32_SYSCALL_BIT + 530) -+#define __NR_get_robust_list (__X32_SYSCALL_BIT + 531) -+#define __NR_vmsplice (__X32_SYSCALL_BIT + 532) -+#define __NR_move_pages (__X32_SYSCALL_BIT + 533) -+#define __NR_preadv (__X32_SYSCALL_BIT + 534) -+#define __NR_pwritev (__X32_SYSCALL_BIT + 535) -+#define __NR_rt_tgsigqueueinfo (__X32_SYSCALL_BIT + 536) -+#define __NR_recvmmsg (__X32_SYSCALL_BIT + 537) -+#define __NR_sendmmsg (__X32_SYSCALL_BIT + 538) -+#define __NR_process_vm_readv (__X32_SYSCALL_BIT + 539) -+#define __NR_process_vm_writev (__X32_SYSCALL_BIT + 540) -+#define __NR_setsockopt (__X32_SYSCALL_BIT + 541) -+#define __NR_getsockopt (__X32_SYSCALL_BIT + 542) -+#define __NR_io_setup (__X32_SYSCALL_BIT + 543) -+#define __NR_io_submit (__X32_SYSCALL_BIT + 544) -+#define __NR_execveat (__X32_SYSCALL_BIT + 545) -+#define __NR_preadv2 (__X32_SYSCALL_BIT + 546) -+#define __NR_pwritev2 (__X32_SYSCALL_BIT + 547) -+ -+#endif /* _ASM_X86_UNISTD_X32_H */ ---- /dev/null -+++ b/tests/include/i686-pc-linux-gnu/asm/unistd.h -@@ -0,0 +1,16 @@ -+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -+#ifndef _ASM_X86_UNISTD_H -+#define _ASM_X86_UNISTD_H -+ -+/* x32 syscall flag bit */ -+#define __X32_SYSCALL_BIT 0x40000000UL -+ -+# ifdef __i386__ -+# include -+# elif defined(__ILP32__) -+# include -+# else -+# include -+# endif -+ -+#endif /* _ASM_X86_UNISTD_H */ ---- /dev/null -+++ b/tests/include/i686-pc-linux-gnu/asm/unistd_32.h -@@ -0,0 +1,430 @@ -+#ifndef _ASM_X86_UNISTD_32_H -+#define _ASM_X86_UNISTD_32_H 1 -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86old 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_vm86 166 -+#define __NR_query_module 167 -+#define __NR_poll 168 -+#define __NR_nfsservctl 169 -+#define __NR_setresgid 170 -+#define __NR_getresgid 171 -+#define __NR_prctl 172 -+#define __NR_rt_sigreturn 173 -+#define __NR_rt_sigaction 174 -+#define __NR_rt_sigprocmask 175 -+#define __NR_rt_sigpending 176 -+#define __NR_rt_sigtimedwait 177 -+#define __NR_rt_sigqueueinfo 178 -+#define __NR_rt_sigsuspend 179 -+#define __NR_pread64 180 -+#define __NR_pwrite64 181 -+#define __NR_chown 182 -+#define __NR_getcwd 183 -+#define __NR_capget 184 -+#define __NR_capset 185 -+#define __NR_sigaltstack 186 -+#define __NR_sendfile 187 -+#define __NR_getpmsg 188 -+#define __NR_putpmsg 189 -+#define __NR_vfork 190 -+#define __NR_ugetrlimit 191 -+#define __NR_mmap2 192 -+#define __NR_truncate64 193 -+#define __NR_ftruncate64 194 -+#define __NR_stat64 195 -+#define __NR_lstat64 196 -+#define __NR_fstat64 197 -+#define __NR_lchown32 198 -+#define __NR_getuid32 199 -+#define __NR_getgid32 200 -+#define __NR_geteuid32 201 -+#define __NR_getegid32 202 -+#define __NR_setreuid32 203 -+#define __NR_setregid32 204 -+#define __NR_getgroups32 205 -+#define __NR_setgroups32 206 -+#define __NR_fchown32 207 -+#define __NR_setresuid32 208 -+#define __NR_getresuid32 209 -+#define __NR_setresgid32 210 -+#define __NR_getresgid32 211 -+#define __NR_chown32 212 -+#define __NR_setuid32 213 -+#define __NR_setgid32 214 -+#define __NR_setfsuid32 215 -+#define __NR_setfsgid32 216 -+#define __NR_pivot_root 217 -+#define __NR_mincore 218 -+#define __NR_madvise 219 -+#define __NR_getdents64 220 -+#define __NR_fcntl64 221 -+#define __NR_gettid 224 -+#define __NR_readahead 225 -+#define __NR_setxattr 226 -+#define __NR_lsetxattr 227 -+#define __NR_fsetxattr 228 -+#define __NR_getxattr 229 -+#define __NR_lgetxattr 230 -+#define __NR_fgetxattr 231 -+#define __NR_listxattr 232 -+#define __NR_llistxattr 233 -+#define __NR_flistxattr 234 -+#define __NR_removexattr 235 -+#define __NR_lremovexattr 236 -+#define __NR_fremovexattr 237 -+#define __NR_tkill 238 -+#define __NR_sendfile64 239 -+#define __NR_futex 240 -+#define __NR_sched_setaffinity 241 -+#define __NR_sched_getaffinity 242 -+#define __NR_set_thread_area 243 -+#define __NR_get_thread_area 244 -+#define __NR_io_setup 245 -+#define __NR_io_destroy 246 -+#define __NR_io_getevents 247 -+#define __NR_io_submit 248 -+#define __NR_io_cancel 249 -+#define __NR_fadvise64 250 -+#define __NR_exit_group 252 -+#define __NR_lookup_dcookie 253 -+#define __NR_epoll_create 254 -+#define __NR_epoll_ctl 255 -+#define __NR_epoll_wait 256 -+#define __NR_remap_file_pages 257 -+#define __NR_set_tid_address 258 -+#define __NR_timer_create 259 -+#define __NR_timer_settime 260 -+#define __NR_timer_gettime 261 -+#define __NR_timer_getoverrun 262 -+#define __NR_timer_delete 263 -+#define __NR_clock_settime 264 -+#define __NR_clock_gettime 265 -+#define __NR_clock_getres 266 -+#define __NR_clock_nanosleep 267 -+#define __NR_statfs64 268 -+#define __NR_fstatfs64 269 -+#define __NR_tgkill 270 -+#define __NR_utimes 271 -+#define __NR_fadvise64_64 272 -+#define __NR_vserver 273 -+#define __NR_mbind 274 -+#define __NR_get_mempolicy 275 -+#define __NR_set_mempolicy 276 -+#define __NR_mq_open 277 -+#define __NR_mq_unlink 278 -+#define __NR_mq_timedsend 279 -+#define __NR_mq_timedreceive 280 -+#define __NR_mq_notify 281 -+#define __NR_mq_getsetattr 282 -+#define __NR_kexec_load 283 -+#define __NR_waitid 284 -+#define __NR_add_key 286 -+#define __NR_request_key 287 -+#define __NR_keyctl 288 -+#define __NR_ioprio_set 289 -+#define __NR_ioprio_get 290 -+#define __NR_inotify_init 291 -+#define __NR_inotify_add_watch 292 -+#define __NR_inotify_rm_watch 293 -+#define __NR_migrate_pages 294 -+#define __NR_openat 295 -+#define __NR_mkdirat 296 -+#define __NR_mknodat 297 -+#define __NR_fchownat 298 -+#define __NR_futimesat 299 -+#define __NR_fstatat64 300 -+#define __NR_unlinkat 301 -+#define __NR_renameat 302 -+#define __NR_linkat 303 -+#define __NR_symlinkat 304 -+#define __NR_readlinkat 305 -+#define __NR_fchmodat 306 -+#define __NR_faccessat 307 -+#define __NR_pselect6 308 -+#define __NR_ppoll 309 -+#define __NR_unshare 310 -+#define __NR_set_robust_list 311 -+#define __NR_get_robust_list 312 -+#define __NR_splice 313 -+#define __NR_sync_file_range 314 -+#define __NR_tee 315 -+#define __NR_vmsplice 316 -+#define __NR_move_pages 317 -+#define __NR_getcpu 318 -+#define __NR_epoll_pwait 319 -+#define __NR_utimensat 320 -+#define __NR_signalfd 321 -+#define __NR_timerfd_create 322 -+#define __NR_eventfd 323 -+#define __NR_fallocate 324 -+#define __NR_timerfd_settime 325 -+#define __NR_timerfd_gettime 326 -+#define __NR_signalfd4 327 -+#define __NR_eventfd2 328 -+#define __NR_epoll_create1 329 -+#define __NR_dup3 330 -+#define __NR_pipe2 331 -+#define __NR_inotify_init1 332 -+#define __NR_preadv 333 -+#define __NR_pwritev 334 -+#define __NR_rt_tgsigqueueinfo 335 -+#define __NR_perf_event_open 336 -+#define __NR_recvmmsg 337 -+#define __NR_fanotify_init 338 -+#define __NR_fanotify_mark 339 -+#define __NR_prlimit64 340 -+#define __NR_name_to_handle_at 341 -+#define __NR_open_by_handle_at 342 -+#define __NR_clock_adjtime 343 -+#define __NR_syncfs 344 -+#define __NR_sendmmsg 345 -+#define __NR_setns 346 -+#define __NR_process_vm_readv 347 -+#define __NR_process_vm_writev 348 -+#define __NR_kcmp 349 -+#define __NR_finit_module 350 -+#define __NR_sched_setattr 351 -+#define __NR_sched_getattr 352 -+#define __NR_renameat2 353 -+#define __NR_seccomp 354 -+#define __NR_getrandom 355 -+#define __NR_memfd_create 356 -+#define __NR_bpf 357 -+#define __NR_execveat 358 -+#define __NR_socket 359 -+#define __NR_socketpair 360 -+#define __NR_bind 361 -+#define __NR_connect 362 -+#define __NR_listen 363 -+#define __NR_accept4 364 -+#define __NR_getsockopt 365 -+#define __NR_setsockopt 366 -+#define __NR_getsockname 367 -+#define __NR_getpeername 368 -+#define __NR_sendto 369 -+#define __NR_sendmsg 370 -+#define __NR_recvfrom 371 -+#define __NR_recvmsg 372 -+#define __NR_shutdown 373 -+#define __NR_userfaultfd 374 -+#define __NR_membarrier 375 -+#define __NR_mlock2 376 -+#define __NR_copy_file_range 377 -+#define __NR_preadv2 378 -+#define __NR_pwritev2 379 -+#define __NR_pkey_mprotect 380 -+#define __NR_pkey_alloc 381 -+#define __NR_pkey_free 382 -+#define __NR_statx 383 -+#define __NR_arch_prctl 384 -+#define __NR_io_pgetevents 385 -+#define __NR_rseq 386 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_clock_gettime64 403 -+#define __NR_clock_settime64 404 -+#define __NR_clock_adjtime64 405 -+#define __NR_clock_getres_time64 406 -+#define __NR_clock_nanosleep_time64 407 -+#define __NR_timer_gettime64 408 -+#define __NR_timer_settime64 409 -+#define __NR_timerfd_gettime64 410 -+#define __NR_timerfd_settime64 411 -+#define __NR_utimensat_time64 412 -+#define __NR_pselect6_time64 413 -+#define __NR_ppoll_time64 414 -+#define __NR_io_pgetevents_time64 416 -+#define __NR_recvmmsg_time64 417 -+#define __NR_mq_timedsend_time64 418 -+#define __NR_mq_timedreceive_time64 419 -+#define __NR_semtimedop_time64 420 -+#define __NR_rt_sigtimedwait_time64 421 -+#define __NR_futex_time64 422 -+#define __NR_sched_rr_get_interval_time64 423 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_X86_UNISTD_32_H */ ---- /dev/null -+++ b/tests/include/i686-pc-linux-gnu/asm/unistd_64.h -@@ -0,0 +1,352 @@ -+#ifndef _ASM_X86_UNISTD_64_H -+#define _ASM_X86_UNISTD_64_H 1 -+ -+#define __NR_read 0 -+#define __NR_write 1 -+#define __NR_open 2 -+#define __NR_close 3 -+#define __NR_stat 4 -+#define __NR_fstat 5 -+#define __NR_lstat 6 -+#define __NR_poll 7 -+#define __NR_lseek 8 -+#define __NR_mmap 9 -+#define __NR_mprotect 10 -+#define __NR_munmap 11 -+#define __NR_brk 12 -+#define __NR_rt_sigaction 13 -+#define __NR_rt_sigprocmask 14 -+#define __NR_rt_sigreturn 15 -+#define __NR_ioctl 16 -+#define __NR_pread64 17 -+#define __NR_pwrite64 18 -+#define __NR_readv 19 -+#define __NR_writev 20 -+#define __NR_access 21 -+#define __NR_pipe 22 -+#define __NR_select 23 -+#define __NR_sched_yield 24 -+#define __NR_mremap 25 -+#define __NR_msync 26 -+#define __NR_mincore 27 -+#define __NR_madvise 28 -+#define __NR_shmget 29 -+#define __NR_shmat 30 -+#define __NR_shmctl 31 -+#define __NR_dup 32 -+#define __NR_dup2 33 -+#define __NR_pause 34 -+#define __NR_nanosleep 35 -+#define __NR_getitimer 36 -+#define __NR_alarm 37 -+#define __NR_setitimer 38 -+#define __NR_getpid 39 -+#define __NR_sendfile 40 -+#define __NR_socket 41 -+#define __NR_connect 42 -+#define __NR_accept 43 -+#define __NR_sendto 44 -+#define __NR_recvfrom 45 -+#define __NR_sendmsg 46 -+#define __NR_recvmsg 47 -+#define __NR_shutdown 48 -+#define __NR_bind 49 -+#define __NR_listen 50 -+#define __NR_getsockname 51 -+#define __NR_getpeername 52 -+#define __NR_socketpair 53 -+#define __NR_setsockopt 54 -+#define __NR_getsockopt 55 -+#define __NR_clone 56 -+#define __NR_fork 57 -+#define __NR_vfork 58 -+#define __NR_execve 59 -+#define __NR_exit 60 -+#define __NR_wait4 61 -+#define __NR_kill 62 -+#define __NR_uname 63 -+#define __NR_semget 64 -+#define __NR_semop 65 -+#define __NR_semctl 66 -+#define __NR_shmdt 67 -+#define __NR_msgget 68 -+#define __NR_msgsnd 69 -+#define __NR_msgrcv 70 -+#define __NR_msgctl 71 -+#define __NR_fcntl 72 -+#define __NR_flock 73 -+#define __NR_fsync 74 -+#define __NR_fdatasync 75 -+#define __NR_truncate 76 -+#define __NR_ftruncate 77 -+#define __NR_getdents 78 -+#define __NR_getcwd 79 -+#define __NR_chdir 80 -+#define __NR_fchdir 81 -+#define __NR_rename 82 -+#define __NR_mkdir 83 -+#define __NR_rmdir 84 -+#define __NR_creat 85 -+#define __NR_link 86 -+#define __NR_unlink 87 -+#define __NR_symlink 88 -+#define __NR_readlink 89 -+#define __NR_chmod 90 -+#define __NR_fchmod 91 -+#define __NR_chown 92 -+#define __NR_fchown 93 -+#define __NR_lchown 94 -+#define __NR_umask 95 -+#define __NR_gettimeofday 96 -+#define __NR_getrlimit 97 -+#define __NR_getrusage 98 -+#define __NR_sysinfo 99 -+#define __NR_times 100 -+#define __NR_ptrace 101 -+#define __NR_getuid 102 -+#define __NR_syslog 103 -+#define __NR_getgid 104 -+#define __NR_setuid 105 -+#define __NR_setgid 106 -+#define __NR_geteuid 107 -+#define __NR_getegid 108 -+#define __NR_setpgid 109 -+#define __NR_getppid 110 -+#define __NR_getpgrp 111 -+#define __NR_setsid 112 -+#define __NR_setreuid 113 -+#define __NR_setregid 114 -+#define __NR_getgroups 115 -+#define __NR_setgroups 116 -+#define __NR_setresuid 117 -+#define __NR_getresuid 118 -+#define __NR_setresgid 119 -+#define __NR_getresgid 120 -+#define __NR_getpgid 121 -+#define __NR_setfsuid 122 -+#define __NR_setfsgid 123 -+#define __NR_getsid 124 -+#define __NR_capget 125 -+#define __NR_capset 126 -+#define __NR_rt_sigpending 127 -+#define __NR_rt_sigtimedwait 128 -+#define __NR_rt_sigqueueinfo 129 -+#define __NR_rt_sigsuspend 130 -+#define __NR_sigaltstack 131 -+#define __NR_utime 132 -+#define __NR_mknod 133 -+#define __NR_uselib 134 -+#define __NR_personality 135 -+#define __NR_ustat 136 -+#define __NR_statfs 137 -+#define __NR_fstatfs 138 -+#define __NR_sysfs 139 -+#define __NR_getpriority 140 -+#define __NR_setpriority 141 -+#define __NR_sched_setparam 142 -+#define __NR_sched_getparam 143 -+#define __NR_sched_setscheduler 144 -+#define __NR_sched_getscheduler 145 -+#define __NR_sched_get_priority_max 146 -+#define __NR_sched_get_priority_min 147 -+#define __NR_sched_rr_get_interval 148 -+#define __NR_mlock 149 -+#define __NR_munlock 150 -+#define __NR_mlockall 151 -+#define __NR_munlockall 152 -+#define __NR_vhangup 153 -+#define __NR_modify_ldt 154 -+#define __NR_pivot_root 155 -+#define __NR__sysctl 156 -+#define __NR_prctl 157 -+#define __NR_arch_prctl 158 -+#define __NR_adjtimex 159 -+#define __NR_setrlimit 160 -+#define __NR_chroot 161 -+#define __NR_sync 162 -+#define __NR_acct 163 -+#define __NR_settimeofday 164 -+#define __NR_mount 165 -+#define __NR_umount2 166 -+#define __NR_swapon 167 -+#define __NR_swapoff 168 -+#define __NR_reboot 169 -+#define __NR_sethostname 170 -+#define __NR_setdomainname 171 -+#define __NR_iopl 172 -+#define __NR_ioperm 173 -+#define __NR_create_module 174 -+#define __NR_init_module 175 -+#define __NR_delete_module 176 -+#define __NR_get_kernel_syms 177 -+#define __NR_query_module 178 -+#define __NR_quotactl 179 -+#define __NR_nfsservctl 180 -+#define __NR_getpmsg 181 -+#define __NR_putpmsg 182 -+#define __NR_afs_syscall 183 -+#define __NR_tuxcall 184 -+#define __NR_security 185 -+#define __NR_gettid 186 -+#define __NR_readahead 187 -+#define __NR_setxattr 188 -+#define __NR_lsetxattr 189 -+#define __NR_fsetxattr 190 -+#define __NR_getxattr 191 -+#define __NR_lgetxattr 192 -+#define __NR_fgetxattr 193 -+#define __NR_listxattr 194 -+#define __NR_llistxattr 195 -+#define __NR_flistxattr 196 -+#define __NR_removexattr 197 -+#define __NR_lremovexattr 198 -+#define __NR_fremovexattr 199 -+#define __NR_tkill 200 -+#define __NR_time 201 -+#define __NR_futex 202 -+#define __NR_sched_setaffinity 203 -+#define __NR_sched_getaffinity 204 -+#define __NR_set_thread_area 205 -+#define __NR_io_setup 206 -+#define __NR_io_destroy 207 -+#define __NR_io_getevents 208 -+#define __NR_io_submit 209 -+#define __NR_io_cancel 210 -+#define __NR_get_thread_area 211 -+#define __NR_lookup_dcookie 212 -+#define __NR_epoll_create 213 -+#define __NR_epoll_ctl_old 214 -+#define __NR_epoll_wait_old 215 -+#define __NR_remap_file_pages 216 -+#define __NR_getdents64 217 -+#define __NR_set_tid_address 218 -+#define __NR_restart_syscall 219 -+#define __NR_semtimedop 220 -+#define __NR_fadvise64 221 -+#define __NR_timer_create 222 -+#define __NR_timer_settime 223 -+#define __NR_timer_gettime 224 -+#define __NR_timer_getoverrun 225 -+#define __NR_timer_delete 226 -+#define __NR_clock_settime 227 -+#define __NR_clock_gettime 228 -+#define __NR_clock_getres 229 -+#define __NR_clock_nanosleep 230 -+#define __NR_exit_group 231 -+#define __NR_epoll_wait 232 -+#define __NR_epoll_ctl 233 -+#define __NR_tgkill 234 -+#define __NR_utimes 235 -+#define __NR_vserver 236 -+#define __NR_mbind 237 -+#define __NR_set_mempolicy 238 -+#define __NR_get_mempolicy 239 -+#define __NR_mq_open 240 -+#define __NR_mq_unlink 241 -+#define __NR_mq_timedsend 242 -+#define __NR_mq_timedreceive 243 -+#define __NR_mq_notify 244 -+#define __NR_mq_getsetattr 245 -+#define __NR_kexec_load 246 -+#define __NR_waitid 247 -+#define __NR_add_key 248 -+#define __NR_request_key 249 -+#define __NR_keyctl 250 -+#define __NR_ioprio_set 251 -+#define __NR_ioprio_get 252 -+#define __NR_inotify_init 253 -+#define __NR_inotify_add_watch 254 -+#define __NR_inotify_rm_watch 255 -+#define __NR_migrate_pages 256 -+#define __NR_openat 257 -+#define __NR_mkdirat 258 -+#define __NR_mknodat 259 -+#define __NR_fchownat 260 -+#define __NR_futimesat 261 -+#define __NR_newfstatat 262 -+#define __NR_unlinkat 263 -+#define __NR_renameat 264 -+#define __NR_linkat 265 -+#define __NR_symlinkat 266 -+#define __NR_readlinkat 267 -+#define __NR_fchmodat 268 -+#define __NR_faccessat 269 -+#define __NR_pselect6 270 -+#define __NR_ppoll 271 -+#define __NR_unshare 272 -+#define __NR_set_robust_list 273 -+#define __NR_get_robust_list 274 -+#define __NR_splice 275 -+#define __NR_tee 276 -+#define __NR_sync_file_range 277 -+#define __NR_vmsplice 278 -+#define __NR_move_pages 279 -+#define __NR_utimensat 280 -+#define __NR_epoll_pwait 281 -+#define __NR_signalfd 282 -+#define __NR_timerfd_create 283 -+#define __NR_eventfd 284 -+#define __NR_fallocate 285 -+#define __NR_timerfd_settime 286 -+#define __NR_timerfd_gettime 287 -+#define __NR_accept4 288 -+#define __NR_signalfd4 289 -+#define __NR_eventfd2 290 -+#define __NR_epoll_create1 291 -+#define __NR_dup3 292 -+#define __NR_pipe2 293 -+#define __NR_inotify_init1 294 -+#define __NR_preadv 295 -+#define __NR_pwritev 296 -+#define __NR_rt_tgsigqueueinfo 297 -+#define __NR_perf_event_open 298 -+#define __NR_recvmmsg 299 -+#define __NR_fanotify_init 300 -+#define __NR_fanotify_mark 301 -+#define __NR_prlimit64 302 -+#define __NR_name_to_handle_at 303 -+#define __NR_open_by_handle_at 304 -+#define __NR_clock_adjtime 305 -+#define __NR_syncfs 306 -+#define __NR_sendmmsg 307 -+#define __NR_setns 308 -+#define __NR_getcpu 309 -+#define __NR_process_vm_readv 310 -+#define __NR_process_vm_writev 311 -+#define __NR_kcmp 312 -+#define __NR_finit_module 313 -+#define __NR_sched_setattr 314 -+#define __NR_sched_getattr 315 -+#define __NR_renameat2 316 -+#define __NR_seccomp 317 -+#define __NR_getrandom 318 -+#define __NR_memfd_create 319 -+#define __NR_kexec_file_load 320 -+#define __NR_bpf 321 -+#define __NR_execveat 322 -+#define __NR_userfaultfd 323 -+#define __NR_membarrier 324 -+#define __NR_mlock2 325 -+#define __NR_copy_file_range 326 -+#define __NR_preadv2 327 -+#define __NR_pwritev2 328 -+#define __NR_pkey_mprotect 329 -+#define __NR_pkey_alloc 330 -+#define __NR_pkey_free 331 -+#define __NR_statx 332 -+#define __NR_io_pgetevents 333 -+#define __NR_rseq 334 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+#endif /* _ASM_X86_UNISTD_64_H */ ---- /dev/null -+++ b/tests/include/i686-pc-linux-gnu/asm/unistd_x32.h -@@ -0,0 +1,341 @@ -+#ifndef _ASM_X86_UNISTD_X32_H -+#define _ASM_X86_UNISTD_X32_H 1 -+ -+#define __NR_read (__X32_SYSCALL_BIT + 0) -+#define __NR_write (__X32_SYSCALL_BIT + 1) -+#define __NR_open (__X32_SYSCALL_BIT + 2) -+#define __NR_close (__X32_SYSCALL_BIT + 3) -+#define __NR_stat (__X32_SYSCALL_BIT + 4) -+#define __NR_fstat (__X32_SYSCALL_BIT + 5) -+#define __NR_lstat (__X32_SYSCALL_BIT + 6) -+#define __NR_poll (__X32_SYSCALL_BIT + 7) -+#define __NR_lseek (__X32_SYSCALL_BIT + 8) -+#define __NR_mmap (__X32_SYSCALL_BIT + 9) -+#define __NR_mprotect (__X32_SYSCALL_BIT + 10) -+#define __NR_munmap (__X32_SYSCALL_BIT + 11) -+#define __NR_brk (__X32_SYSCALL_BIT + 12) -+#define __NR_rt_sigprocmask (__X32_SYSCALL_BIT + 14) -+#define __NR_pread64 (__X32_SYSCALL_BIT + 17) -+#define __NR_pwrite64 (__X32_SYSCALL_BIT + 18) -+#define __NR_access (__X32_SYSCALL_BIT + 21) -+#define __NR_pipe (__X32_SYSCALL_BIT + 22) -+#define __NR_select (__X32_SYSCALL_BIT + 23) -+#define __NR_sched_yield (__X32_SYSCALL_BIT + 24) -+#define __NR_mremap (__X32_SYSCALL_BIT + 25) -+#define __NR_msync (__X32_SYSCALL_BIT + 26) -+#define __NR_mincore (__X32_SYSCALL_BIT + 27) -+#define __NR_madvise (__X32_SYSCALL_BIT + 28) -+#define __NR_shmget (__X32_SYSCALL_BIT + 29) -+#define __NR_shmat (__X32_SYSCALL_BIT + 30) -+#define __NR_shmctl (__X32_SYSCALL_BIT + 31) -+#define __NR_dup (__X32_SYSCALL_BIT + 32) -+#define __NR_dup2 (__X32_SYSCALL_BIT + 33) -+#define __NR_pause (__X32_SYSCALL_BIT + 34) -+#define __NR_nanosleep (__X32_SYSCALL_BIT + 35) -+#define __NR_getitimer (__X32_SYSCALL_BIT + 36) -+#define __NR_alarm (__X32_SYSCALL_BIT + 37) -+#define __NR_setitimer (__X32_SYSCALL_BIT + 38) -+#define __NR_getpid (__X32_SYSCALL_BIT + 39) -+#define __NR_sendfile (__X32_SYSCALL_BIT + 40) -+#define __NR_socket (__X32_SYSCALL_BIT + 41) -+#define __NR_connect (__X32_SYSCALL_BIT + 42) -+#define __NR_accept (__X32_SYSCALL_BIT + 43) -+#define __NR_sendto (__X32_SYSCALL_BIT + 44) -+#define __NR_shutdown (__X32_SYSCALL_BIT + 48) -+#define __NR_bind (__X32_SYSCALL_BIT + 49) -+#define __NR_listen (__X32_SYSCALL_BIT + 50) -+#define __NR_getsockname (__X32_SYSCALL_BIT + 51) -+#define __NR_getpeername (__X32_SYSCALL_BIT + 52) -+#define __NR_socketpair (__X32_SYSCALL_BIT + 53) -+#define __NR_clone (__X32_SYSCALL_BIT + 56) -+#define __NR_fork (__X32_SYSCALL_BIT + 57) -+#define __NR_vfork (__X32_SYSCALL_BIT + 58) -+#define __NR_exit (__X32_SYSCALL_BIT + 60) -+#define __NR_wait4 (__X32_SYSCALL_BIT + 61) -+#define __NR_kill (__X32_SYSCALL_BIT + 62) -+#define __NR_uname (__X32_SYSCALL_BIT + 63) -+#define __NR_semget (__X32_SYSCALL_BIT + 64) -+#define __NR_semop (__X32_SYSCALL_BIT + 65) -+#define __NR_semctl (__X32_SYSCALL_BIT + 66) -+#define __NR_shmdt (__X32_SYSCALL_BIT + 67) -+#define __NR_msgget (__X32_SYSCALL_BIT + 68) -+#define __NR_msgsnd (__X32_SYSCALL_BIT + 69) -+#define __NR_msgrcv (__X32_SYSCALL_BIT + 70) -+#define __NR_msgctl (__X32_SYSCALL_BIT + 71) -+#define __NR_fcntl (__X32_SYSCALL_BIT + 72) -+#define __NR_flock (__X32_SYSCALL_BIT + 73) -+#define __NR_fsync (__X32_SYSCALL_BIT + 74) -+#define __NR_fdatasync (__X32_SYSCALL_BIT + 75) -+#define __NR_truncate (__X32_SYSCALL_BIT + 76) -+#define __NR_ftruncate (__X32_SYSCALL_BIT + 77) -+#define __NR_getdents (__X32_SYSCALL_BIT + 78) -+#define __NR_getcwd (__X32_SYSCALL_BIT + 79) -+#define __NR_chdir (__X32_SYSCALL_BIT + 80) -+#define __NR_fchdir (__X32_SYSCALL_BIT + 81) -+#define __NR_rename (__X32_SYSCALL_BIT + 82) -+#define __NR_mkdir (__X32_SYSCALL_BIT + 83) -+#define __NR_rmdir (__X32_SYSCALL_BIT + 84) -+#define __NR_creat (__X32_SYSCALL_BIT + 85) -+#define __NR_link (__X32_SYSCALL_BIT + 86) -+#define __NR_unlink (__X32_SYSCALL_BIT + 87) -+#define __NR_symlink (__X32_SYSCALL_BIT + 88) -+#define __NR_readlink (__X32_SYSCALL_BIT + 89) -+#define __NR_chmod (__X32_SYSCALL_BIT + 90) -+#define __NR_fchmod (__X32_SYSCALL_BIT + 91) -+#define __NR_chown (__X32_SYSCALL_BIT + 92) -+#define __NR_fchown (__X32_SYSCALL_BIT + 93) -+#define __NR_lchown (__X32_SYSCALL_BIT + 94) -+#define __NR_umask (__X32_SYSCALL_BIT + 95) -+#define __NR_gettimeofday (__X32_SYSCALL_BIT + 96) -+#define __NR_getrlimit (__X32_SYSCALL_BIT + 97) -+#define __NR_getrusage (__X32_SYSCALL_BIT + 98) -+#define __NR_sysinfo (__X32_SYSCALL_BIT + 99) -+#define __NR_times (__X32_SYSCALL_BIT + 100) -+#define __NR_getuid (__X32_SYSCALL_BIT + 102) -+#define __NR_syslog (__X32_SYSCALL_BIT + 103) -+#define __NR_getgid (__X32_SYSCALL_BIT + 104) -+#define __NR_setuid (__X32_SYSCALL_BIT + 105) -+#define __NR_setgid (__X32_SYSCALL_BIT + 106) -+#define __NR_geteuid (__X32_SYSCALL_BIT + 107) -+#define __NR_getegid (__X32_SYSCALL_BIT + 108) -+#define __NR_setpgid (__X32_SYSCALL_BIT + 109) -+#define __NR_getppid (__X32_SYSCALL_BIT + 110) -+#define __NR_getpgrp (__X32_SYSCALL_BIT + 111) -+#define __NR_setsid (__X32_SYSCALL_BIT + 112) -+#define __NR_setreuid (__X32_SYSCALL_BIT + 113) -+#define __NR_setregid (__X32_SYSCALL_BIT + 114) -+#define __NR_getgroups (__X32_SYSCALL_BIT + 115) -+#define __NR_setgroups (__X32_SYSCALL_BIT + 116) -+#define __NR_setresuid (__X32_SYSCALL_BIT + 117) -+#define __NR_getresuid (__X32_SYSCALL_BIT + 118) -+#define __NR_setresgid (__X32_SYSCALL_BIT + 119) -+#define __NR_getresgid (__X32_SYSCALL_BIT + 120) -+#define __NR_getpgid (__X32_SYSCALL_BIT + 121) -+#define __NR_setfsuid (__X32_SYSCALL_BIT + 122) -+#define __NR_setfsgid (__X32_SYSCALL_BIT + 123) -+#define __NR_getsid (__X32_SYSCALL_BIT + 124) -+#define __NR_capget (__X32_SYSCALL_BIT + 125) -+#define __NR_capset (__X32_SYSCALL_BIT + 126) -+#define __NR_rt_sigsuspend (__X32_SYSCALL_BIT + 130) -+#define __NR_utime (__X32_SYSCALL_BIT + 132) -+#define __NR_mknod (__X32_SYSCALL_BIT + 133) -+#define __NR_personality (__X32_SYSCALL_BIT + 135) -+#define __NR_ustat (__X32_SYSCALL_BIT + 136) -+#define __NR_statfs (__X32_SYSCALL_BIT + 137) -+#define __NR_fstatfs (__X32_SYSCALL_BIT + 138) -+#define __NR_sysfs (__X32_SYSCALL_BIT + 139) -+#define __NR_getpriority (__X32_SYSCALL_BIT + 140) -+#define __NR_setpriority (__X32_SYSCALL_BIT + 141) -+#define __NR_sched_setparam (__X32_SYSCALL_BIT + 142) -+#define __NR_sched_getparam (__X32_SYSCALL_BIT + 143) -+#define __NR_sched_setscheduler (__X32_SYSCALL_BIT + 144) -+#define __NR_sched_getscheduler (__X32_SYSCALL_BIT + 145) -+#define __NR_sched_get_priority_max (__X32_SYSCALL_BIT + 146) -+#define __NR_sched_get_priority_min (__X32_SYSCALL_BIT + 147) -+#define __NR_sched_rr_get_interval (__X32_SYSCALL_BIT + 148) -+#define __NR_mlock (__X32_SYSCALL_BIT + 149) -+#define __NR_munlock (__X32_SYSCALL_BIT + 150) -+#define __NR_mlockall (__X32_SYSCALL_BIT + 151) -+#define __NR_munlockall (__X32_SYSCALL_BIT + 152) -+#define __NR_vhangup (__X32_SYSCALL_BIT + 153) -+#define __NR_modify_ldt (__X32_SYSCALL_BIT + 154) -+#define __NR_pivot_root (__X32_SYSCALL_BIT + 155) -+#define __NR_prctl (__X32_SYSCALL_BIT + 157) -+#define __NR_arch_prctl (__X32_SYSCALL_BIT + 158) -+#define __NR_adjtimex (__X32_SYSCALL_BIT + 159) -+#define __NR_setrlimit (__X32_SYSCALL_BIT + 160) -+#define __NR_chroot (__X32_SYSCALL_BIT + 161) -+#define __NR_sync (__X32_SYSCALL_BIT + 162) -+#define __NR_acct (__X32_SYSCALL_BIT + 163) -+#define __NR_settimeofday (__X32_SYSCALL_BIT + 164) -+#define __NR_mount (__X32_SYSCALL_BIT + 165) -+#define __NR_umount2 (__X32_SYSCALL_BIT + 166) -+#define __NR_swapon (__X32_SYSCALL_BIT + 167) -+#define __NR_swapoff (__X32_SYSCALL_BIT + 168) -+#define __NR_reboot (__X32_SYSCALL_BIT + 169) -+#define __NR_sethostname (__X32_SYSCALL_BIT + 170) -+#define __NR_setdomainname (__X32_SYSCALL_BIT + 171) -+#define __NR_iopl (__X32_SYSCALL_BIT + 172) -+#define __NR_ioperm (__X32_SYSCALL_BIT + 173) -+#define __NR_init_module (__X32_SYSCALL_BIT + 175) -+#define __NR_delete_module (__X32_SYSCALL_BIT + 176) -+#define __NR_quotactl (__X32_SYSCALL_BIT + 179) -+#define __NR_getpmsg (__X32_SYSCALL_BIT + 181) -+#define __NR_putpmsg (__X32_SYSCALL_BIT + 182) -+#define __NR_afs_syscall (__X32_SYSCALL_BIT + 183) -+#define __NR_tuxcall (__X32_SYSCALL_BIT + 184) -+#define __NR_security (__X32_SYSCALL_BIT + 185) -+#define __NR_gettid (__X32_SYSCALL_BIT + 186) -+#define __NR_readahead (__X32_SYSCALL_BIT + 187) -+#define __NR_setxattr (__X32_SYSCALL_BIT + 188) -+#define __NR_lsetxattr (__X32_SYSCALL_BIT + 189) -+#define __NR_fsetxattr (__X32_SYSCALL_BIT + 190) -+#define __NR_getxattr (__X32_SYSCALL_BIT + 191) -+#define __NR_lgetxattr (__X32_SYSCALL_BIT + 192) -+#define __NR_fgetxattr (__X32_SYSCALL_BIT + 193) -+#define __NR_listxattr (__X32_SYSCALL_BIT + 194) -+#define __NR_llistxattr (__X32_SYSCALL_BIT + 195) -+#define __NR_flistxattr (__X32_SYSCALL_BIT + 196) -+#define __NR_removexattr (__X32_SYSCALL_BIT + 197) -+#define __NR_lremovexattr (__X32_SYSCALL_BIT + 198) -+#define __NR_fremovexattr (__X32_SYSCALL_BIT + 199) -+#define __NR_tkill (__X32_SYSCALL_BIT + 200) -+#define __NR_time (__X32_SYSCALL_BIT + 201) -+#define __NR_futex (__X32_SYSCALL_BIT + 202) -+#define __NR_sched_setaffinity (__X32_SYSCALL_BIT + 203) -+#define __NR_sched_getaffinity (__X32_SYSCALL_BIT + 204) -+#define __NR_io_destroy (__X32_SYSCALL_BIT + 207) -+#define __NR_io_getevents (__X32_SYSCALL_BIT + 208) -+#define __NR_io_cancel (__X32_SYSCALL_BIT + 210) -+#define __NR_lookup_dcookie (__X32_SYSCALL_BIT + 212) -+#define __NR_epoll_create (__X32_SYSCALL_BIT + 213) -+#define __NR_remap_file_pages (__X32_SYSCALL_BIT + 216) -+#define __NR_getdents64 (__X32_SYSCALL_BIT + 217) -+#define __NR_set_tid_address (__X32_SYSCALL_BIT + 218) -+#define __NR_restart_syscall (__X32_SYSCALL_BIT + 219) -+#define __NR_semtimedop (__X32_SYSCALL_BIT + 220) -+#define __NR_fadvise64 (__X32_SYSCALL_BIT + 221) -+#define __NR_timer_settime (__X32_SYSCALL_BIT + 223) -+#define __NR_timer_gettime (__X32_SYSCALL_BIT + 224) -+#define __NR_timer_getoverrun (__X32_SYSCALL_BIT + 225) -+#define __NR_timer_delete (__X32_SYSCALL_BIT + 226) -+#define __NR_clock_settime (__X32_SYSCALL_BIT + 227) -+#define __NR_clock_gettime (__X32_SYSCALL_BIT + 228) -+#define __NR_clock_getres (__X32_SYSCALL_BIT + 229) -+#define __NR_clock_nanosleep (__X32_SYSCALL_BIT + 230) -+#define __NR_exit_group (__X32_SYSCALL_BIT + 231) -+#define __NR_epoll_wait (__X32_SYSCALL_BIT + 232) -+#define __NR_epoll_ctl (__X32_SYSCALL_BIT + 233) -+#define __NR_tgkill (__X32_SYSCALL_BIT + 234) -+#define __NR_utimes (__X32_SYSCALL_BIT + 235) -+#define __NR_mbind (__X32_SYSCALL_BIT + 237) -+#define __NR_set_mempolicy (__X32_SYSCALL_BIT + 238) -+#define __NR_get_mempolicy (__X32_SYSCALL_BIT + 239) -+#define __NR_mq_open (__X32_SYSCALL_BIT + 240) -+#define __NR_mq_unlink (__X32_SYSCALL_BIT + 241) -+#define __NR_mq_timedsend (__X32_SYSCALL_BIT + 242) -+#define __NR_mq_timedreceive (__X32_SYSCALL_BIT + 243) -+#define __NR_mq_getsetattr (__X32_SYSCALL_BIT + 245) -+#define __NR_add_key (__X32_SYSCALL_BIT + 248) -+#define __NR_request_key (__X32_SYSCALL_BIT + 249) -+#define __NR_keyctl (__X32_SYSCALL_BIT + 250) -+#define __NR_ioprio_set (__X32_SYSCALL_BIT + 251) -+#define __NR_ioprio_get (__X32_SYSCALL_BIT + 252) -+#define __NR_inotify_init (__X32_SYSCALL_BIT + 253) -+#define __NR_inotify_add_watch (__X32_SYSCALL_BIT + 254) -+#define __NR_inotify_rm_watch (__X32_SYSCALL_BIT + 255) -+#define __NR_migrate_pages (__X32_SYSCALL_BIT + 256) -+#define __NR_openat (__X32_SYSCALL_BIT + 257) -+#define __NR_mkdirat (__X32_SYSCALL_BIT + 258) -+#define __NR_mknodat (__X32_SYSCALL_BIT + 259) -+#define __NR_fchownat (__X32_SYSCALL_BIT + 260) -+#define __NR_futimesat (__X32_SYSCALL_BIT + 261) -+#define __NR_newfstatat (__X32_SYSCALL_BIT + 262) -+#define __NR_unlinkat (__X32_SYSCALL_BIT + 263) -+#define __NR_renameat (__X32_SYSCALL_BIT + 264) -+#define __NR_linkat (__X32_SYSCALL_BIT + 265) -+#define __NR_symlinkat (__X32_SYSCALL_BIT + 266) -+#define __NR_readlinkat (__X32_SYSCALL_BIT + 267) -+#define __NR_fchmodat (__X32_SYSCALL_BIT + 268) -+#define __NR_faccessat (__X32_SYSCALL_BIT + 269) -+#define __NR_pselect6 (__X32_SYSCALL_BIT + 270) -+#define __NR_ppoll (__X32_SYSCALL_BIT + 271) -+#define __NR_unshare (__X32_SYSCALL_BIT + 272) -+#define __NR_splice (__X32_SYSCALL_BIT + 275) -+#define __NR_tee (__X32_SYSCALL_BIT + 276) -+#define __NR_sync_file_range (__X32_SYSCALL_BIT + 277) -+#define __NR_utimensat (__X32_SYSCALL_BIT + 280) -+#define __NR_epoll_pwait (__X32_SYSCALL_BIT + 281) -+#define __NR_signalfd (__X32_SYSCALL_BIT + 282) -+#define __NR_timerfd_create (__X32_SYSCALL_BIT + 283) -+#define __NR_eventfd (__X32_SYSCALL_BIT + 284) -+#define __NR_fallocate (__X32_SYSCALL_BIT + 285) -+#define __NR_timerfd_settime (__X32_SYSCALL_BIT + 286) -+#define __NR_timerfd_gettime (__X32_SYSCALL_BIT + 287) -+#define __NR_accept4 (__X32_SYSCALL_BIT + 288) -+#define __NR_signalfd4 (__X32_SYSCALL_BIT + 289) -+#define __NR_eventfd2 (__X32_SYSCALL_BIT + 290) -+#define __NR_epoll_create1 (__X32_SYSCALL_BIT + 291) -+#define __NR_dup3 (__X32_SYSCALL_BIT + 292) -+#define __NR_pipe2 (__X32_SYSCALL_BIT + 293) -+#define __NR_inotify_init1 (__X32_SYSCALL_BIT + 294) -+#define __NR_perf_event_open (__X32_SYSCALL_BIT + 298) -+#define __NR_fanotify_init (__X32_SYSCALL_BIT + 300) -+#define __NR_fanotify_mark (__X32_SYSCALL_BIT + 301) -+#define __NR_prlimit64 (__X32_SYSCALL_BIT + 302) -+#define __NR_name_to_handle_at (__X32_SYSCALL_BIT + 303) -+#define __NR_open_by_handle_at (__X32_SYSCALL_BIT + 304) -+#define __NR_clock_adjtime (__X32_SYSCALL_BIT + 305) -+#define __NR_syncfs (__X32_SYSCALL_BIT + 306) -+#define __NR_setns (__X32_SYSCALL_BIT + 308) -+#define __NR_getcpu (__X32_SYSCALL_BIT + 309) -+#define __NR_kcmp (__X32_SYSCALL_BIT + 312) -+#define __NR_finit_module (__X32_SYSCALL_BIT + 313) -+#define __NR_sched_setattr (__X32_SYSCALL_BIT + 314) -+#define __NR_sched_getattr (__X32_SYSCALL_BIT + 315) -+#define __NR_renameat2 (__X32_SYSCALL_BIT + 316) -+#define __NR_seccomp (__X32_SYSCALL_BIT + 317) -+#define __NR_getrandom (__X32_SYSCALL_BIT + 318) -+#define __NR_memfd_create (__X32_SYSCALL_BIT + 319) -+#define __NR_kexec_file_load (__X32_SYSCALL_BIT + 320) -+#define __NR_bpf (__X32_SYSCALL_BIT + 321) -+#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323) -+#define __NR_membarrier (__X32_SYSCALL_BIT + 324) -+#define __NR_mlock2 (__X32_SYSCALL_BIT + 325) -+#define __NR_copy_file_range (__X32_SYSCALL_BIT + 326) -+#define __NR_pkey_mprotect (__X32_SYSCALL_BIT + 329) -+#define __NR_pkey_alloc (__X32_SYSCALL_BIT + 330) -+#define __NR_pkey_free (__X32_SYSCALL_BIT + 331) -+#define __NR_statx (__X32_SYSCALL_BIT + 332) -+#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333) -+#define __NR_rseq (__X32_SYSCALL_BIT + 334) -+#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424) -+#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425) -+#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426) -+#define __NR_io_uring_register (__X32_SYSCALL_BIT + 427) -+#define __NR_open_tree (__X32_SYSCALL_BIT + 428) -+#define __NR_move_mount (__X32_SYSCALL_BIT + 429) -+#define __NR_fsopen (__X32_SYSCALL_BIT + 430) -+#define __NR_fsconfig (__X32_SYSCALL_BIT + 431) -+#define __NR_fsmount (__X32_SYSCALL_BIT + 432) -+#define __NR_fspick (__X32_SYSCALL_BIT + 433) -+#define __NR_pidfd_open (__X32_SYSCALL_BIT + 434) -+#define __NR_clone3 (__X32_SYSCALL_BIT + 435) -+#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) -+#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) -+#define __NR_ioctl (__X32_SYSCALL_BIT + 514) -+#define __NR_readv (__X32_SYSCALL_BIT + 515) -+#define __NR_writev (__X32_SYSCALL_BIT + 516) -+#define __NR_recvfrom (__X32_SYSCALL_BIT + 517) -+#define __NR_sendmsg (__X32_SYSCALL_BIT + 518) -+#define __NR_recvmsg (__X32_SYSCALL_BIT + 519) -+#define __NR_execve (__X32_SYSCALL_BIT + 520) -+#define __NR_ptrace (__X32_SYSCALL_BIT + 521) -+#define __NR_rt_sigpending (__X32_SYSCALL_BIT + 522) -+#define __NR_rt_sigtimedwait (__X32_SYSCALL_BIT + 523) -+#define __NR_rt_sigqueueinfo (__X32_SYSCALL_BIT + 524) -+#define __NR_sigaltstack (__X32_SYSCALL_BIT + 525) -+#define __NR_timer_create (__X32_SYSCALL_BIT + 526) -+#define __NR_mq_notify (__X32_SYSCALL_BIT + 527) -+#define __NR_kexec_load (__X32_SYSCALL_BIT + 528) -+#define __NR_waitid (__X32_SYSCALL_BIT + 529) -+#define __NR_set_robust_list (__X32_SYSCALL_BIT + 530) -+#define __NR_get_robust_list (__X32_SYSCALL_BIT + 531) -+#define __NR_vmsplice (__X32_SYSCALL_BIT + 532) -+#define __NR_move_pages (__X32_SYSCALL_BIT + 533) -+#define __NR_preadv (__X32_SYSCALL_BIT + 534) -+#define __NR_pwritev (__X32_SYSCALL_BIT + 535) -+#define __NR_rt_tgsigqueueinfo (__X32_SYSCALL_BIT + 536) -+#define __NR_recvmmsg (__X32_SYSCALL_BIT + 537) -+#define __NR_sendmmsg (__X32_SYSCALL_BIT + 538) -+#define __NR_process_vm_readv (__X32_SYSCALL_BIT + 539) -+#define __NR_process_vm_writev (__X32_SYSCALL_BIT + 540) -+#define __NR_setsockopt (__X32_SYSCALL_BIT + 541) -+#define __NR_getsockopt (__X32_SYSCALL_BIT + 542) -+#define __NR_io_setup (__X32_SYSCALL_BIT + 543) -+#define __NR_io_submit (__X32_SYSCALL_BIT + 544) -+#define __NR_execveat (__X32_SYSCALL_BIT + 545) -+#define __NR_preadv2 (__X32_SYSCALL_BIT + 546) -+#define __NR_pwritev2 (__X32_SYSCALL_BIT + 547) -+ -+#endif /* _ASM_X86_UNISTD_X32_H */ ---- /dev/null -+++ b/tests/include/powerpc-unknown-linux-gnu/asm/unistd.h -@@ -0,0 +1,19 @@ -+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ -+/* -+ * This file contains the system call numbers. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version -+ * 2 of the License, or (at your option) any later version. -+ */ -+#ifndef _ASM_POWERPC_UNISTD_H_ -+#define _ASM_POWERPC_UNISTD_H_ -+ -+#ifndef __powerpc64__ -+#include -+#else -+#include -+#endif -+ -+#endif /* _ASM_POWERPC_UNISTD_H_ */ ---- /dev/null -+++ b/tests/include/powerpc-unknown-linux-gnu/asm/unistd_32.h -@@ -0,0 +1,423 @@ -+#ifndef _ASM_POWERPC_UNISTD_32_H -+#define _ASM_POWERPC_UNISTD_32_H -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_query_module 166 -+#define __NR_poll 167 -+#define __NR_nfsservctl 168 -+#define __NR_setresgid 169 -+#define __NR_getresgid 170 -+#define __NR_prctl 171 -+#define __NR_rt_sigreturn 172 -+#define __NR_rt_sigaction 173 -+#define __NR_rt_sigprocmask 174 -+#define __NR_rt_sigpending 175 -+#define __NR_rt_sigtimedwait 176 -+#define __NR_rt_sigqueueinfo 177 -+#define __NR_rt_sigsuspend 178 -+#define __NR_pread64 179 -+#define __NR_pwrite64 180 -+#define __NR_chown 181 -+#define __NR_getcwd 182 -+#define __NR_capget 183 -+#define __NR_capset 184 -+#define __NR_sigaltstack 185 -+#define __NR_sendfile 186 -+#define __NR_getpmsg 187 -+#define __NR_putpmsg 188 -+#define __NR_vfork 189 -+#define __NR_ugetrlimit 190 -+#define __NR_readahead 191 -+#define __NR_mmap2 192 -+#define __NR_truncate64 193 -+#define __NR_ftruncate64 194 -+#define __NR_stat64 195 -+#define __NR_lstat64 196 -+#define __NR_fstat64 197 -+#define __NR_pciconfig_read 198 -+#define __NR_pciconfig_write 199 -+#define __NR_pciconfig_iobase 200 -+#define __NR_multiplexer 201 -+#define __NR_getdents64 202 -+#define __NR_pivot_root 203 -+#define __NR_fcntl64 204 -+#define __NR_madvise 205 -+#define __NR_mincore 206 -+#define __NR_gettid 207 -+#define __NR_tkill 208 -+#define __NR_setxattr 209 -+#define __NR_lsetxattr 210 -+#define __NR_fsetxattr 211 -+#define __NR_getxattr 212 -+#define __NR_lgetxattr 213 -+#define __NR_fgetxattr 214 -+#define __NR_listxattr 215 -+#define __NR_llistxattr 216 -+#define __NR_flistxattr 217 -+#define __NR_removexattr 218 -+#define __NR_lremovexattr 219 -+#define __NR_fremovexattr 220 -+#define __NR_futex 221 -+#define __NR_sched_setaffinity 222 -+#define __NR_sched_getaffinity 223 -+#define __NR_tuxcall 225 -+#define __NR_sendfile64 226 -+#define __NR_io_setup 227 -+#define __NR_io_destroy 228 -+#define __NR_io_getevents 229 -+#define __NR_io_submit 230 -+#define __NR_io_cancel 231 -+#define __NR_set_tid_address 232 -+#define __NR_fadvise64 233 -+#define __NR_exit_group 234 -+#define __NR_lookup_dcookie 235 -+#define __NR_epoll_create 236 -+#define __NR_epoll_ctl 237 -+#define __NR_epoll_wait 238 -+#define __NR_remap_file_pages 239 -+#define __NR_timer_create 240 -+#define __NR_timer_settime 241 -+#define __NR_timer_gettime 242 -+#define __NR_timer_getoverrun 243 -+#define __NR_timer_delete 244 -+#define __NR_clock_settime 245 -+#define __NR_clock_gettime 246 -+#define __NR_clock_getres 247 -+#define __NR_clock_nanosleep 248 -+#define __NR_swapcontext 249 -+#define __NR_tgkill 250 -+#define __NR_utimes 251 -+#define __NR_statfs64 252 -+#define __NR_fstatfs64 253 -+#define __NR_fadvise64_64 254 -+#define __NR_rtas 255 -+#define __NR_sys_debug_setcontext 256 -+#define __NR_migrate_pages 258 -+#define __NR_mbind 259 -+#define __NR_get_mempolicy 260 -+#define __NR_set_mempolicy 261 -+#define __NR_mq_open 262 -+#define __NR_mq_unlink 263 -+#define __NR_mq_timedsend 264 -+#define __NR_mq_timedreceive 265 -+#define __NR_mq_notify 266 -+#define __NR_mq_getsetattr 267 -+#define __NR_kexec_load 268 -+#define __NR_add_key 269 -+#define __NR_request_key 270 -+#define __NR_keyctl 271 -+#define __NR_waitid 272 -+#define __NR_ioprio_set 273 -+#define __NR_ioprio_get 274 -+#define __NR_inotify_init 275 -+#define __NR_inotify_add_watch 276 -+#define __NR_inotify_rm_watch 277 -+#define __NR_spu_run 278 -+#define __NR_spu_create 279 -+#define __NR_pselect6 280 -+#define __NR_ppoll 281 -+#define __NR_unshare 282 -+#define __NR_splice 283 -+#define __NR_tee 284 -+#define __NR_vmsplice 285 -+#define __NR_openat 286 -+#define __NR_mkdirat 287 -+#define __NR_mknodat 288 -+#define __NR_fchownat 289 -+#define __NR_futimesat 290 -+#define __NR_fstatat64 291 -+#define __NR_unlinkat 292 -+#define __NR_renameat 293 -+#define __NR_linkat 294 -+#define __NR_symlinkat 295 -+#define __NR_readlinkat 296 -+#define __NR_fchmodat 297 -+#define __NR_faccessat 298 -+#define __NR_get_robust_list 299 -+#define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd_create 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 -+#define __NR_subpage_prot 310 -+#define __NR_timerfd_settime 311 -+#define __NR_timerfd_gettime 312 -+#define __NR_signalfd4 313 -+#define __NR_eventfd2 314 -+#define __NR_epoll_create1 315 -+#define __NR_dup3 316 -+#define __NR_pipe2 317 -+#define __NR_inotify_init1 318 -+#define __NR_perf_event_open 319 -+#define __NR_preadv 320 -+#define __NR_pwritev 321 -+#define __NR_rt_tgsigqueueinfo 322 -+#define __NR_fanotify_init 323 -+#define __NR_fanotify_mark 324 -+#define __NR_prlimit64 325 -+#define __NR_socket 326 -+#define __NR_bind 327 -+#define __NR_connect 328 -+#define __NR_listen 329 -+#define __NR_accept 330 -+#define __NR_getsockname 331 -+#define __NR_getpeername 332 -+#define __NR_socketpair 333 -+#define __NR_send 334 -+#define __NR_sendto 335 -+#define __NR_recv 336 -+#define __NR_recvfrom 337 -+#define __NR_shutdown 338 -+#define __NR_setsockopt 339 -+#define __NR_getsockopt 340 -+#define __NR_sendmsg 341 -+#define __NR_recvmsg 342 -+#define __NR_recvmmsg 343 -+#define __NR_accept4 344 -+#define __NR_name_to_handle_at 345 -+#define __NR_open_by_handle_at 346 -+#define __NR_clock_adjtime 347 -+#define __NR_syncfs 348 -+#define __NR_sendmmsg 349 -+#define __NR_setns 350 -+#define __NR_process_vm_readv 351 -+#define __NR_process_vm_writev 352 -+#define __NR_finit_module 353 -+#define __NR_kcmp 354 -+#define __NR_sched_setattr 355 -+#define __NR_sched_getattr 356 -+#define __NR_renameat2 357 -+#define __NR_seccomp 358 -+#define __NR_getrandom 359 -+#define __NR_memfd_create 360 -+#define __NR_bpf 361 -+#define __NR_execveat 362 -+#define __NR_switch_endian 363 -+#define __NR_userfaultfd 364 -+#define __NR_membarrier 365 -+#define __NR_mlock2 378 -+#define __NR_copy_file_range 379 -+#define __NR_preadv2 380 -+#define __NR_pwritev2 381 -+#define __NR_kexec_file_load 382 -+#define __NR_statx 383 -+#define __NR_pkey_alloc 384 -+#define __NR_pkey_free 385 -+#define __NR_pkey_mprotect 386 -+#define __NR_rseq 387 -+#define __NR_io_pgetevents 388 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_clock_gettime64 403 -+#define __NR_clock_settime64 404 -+#define __NR_clock_adjtime64 405 -+#define __NR_clock_getres_time64 406 -+#define __NR_clock_nanosleep_time64 407 -+#define __NR_timer_gettime64 408 -+#define __NR_timer_settime64 409 -+#define __NR_timerfd_gettime64 410 -+#define __NR_timerfd_settime64 411 -+#define __NR_utimensat_time64 412 -+#define __NR_pselect6_time64 413 -+#define __NR_ppoll_time64 414 -+#define __NR_io_pgetevents_time64 416 -+#define __NR_recvmmsg_time64 417 -+#define __NR_mq_timedsend_time64 418 -+#define __NR_mq_timedreceive_time64 419 -+#define __NR_semtimedop_time64 420 -+#define __NR_rt_sigtimedwait_time64 421 -+#define __NR_futex_time64 422 -+#define __NR_sched_rr_get_interval_time64 423 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+ -+#endif /* _ASM_POWERPC_UNISTD_32_H */ ---- /dev/null -+++ b/tests/include/powerpc-unknown-linux-gnu/asm/unistd_64.h -@@ -0,0 +1,395 @@ -+#ifndef _ASM_POWERPC_UNISTD_64_H -+#define _ASM_POWERPC_UNISTD_64_H -+ -+#define __NR_restart_syscall 0 -+#define __NR_exit 1 -+#define __NR_fork 2 -+#define __NR_read 3 -+#define __NR_write 4 -+#define __NR_open 5 -+#define __NR_close 6 -+#define __NR_waitpid 7 -+#define __NR_creat 8 -+#define __NR_link 9 -+#define __NR_unlink 10 -+#define __NR_execve 11 -+#define __NR_chdir 12 -+#define __NR_time 13 -+#define __NR_mknod 14 -+#define __NR_chmod 15 -+#define __NR_lchown 16 -+#define __NR_break 17 -+#define __NR_oldstat 18 -+#define __NR_lseek 19 -+#define __NR_getpid 20 -+#define __NR_mount 21 -+#define __NR_umount 22 -+#define __NR_setuid 23 -+#define __NR_getuid 24 -+#define __NR_stime 25 -+#define __NR_ptrace 26 -+#define __NR_alarm 27 -+#define __NR_oldfstat 28 -+#define __NR_pause 29 -+#define __NR_utime 30 -+#define __NR_stty 31 -+#define __NR_gtty 32 -+#define __NR_access 33 -+#define __NR_nice 34 -+#define __NR_ftime 35 -+#define __NR_sync 36 -+#define __NR_kill 37 -+#define __NR_rename 38 -+#define __NR_mkdir 39 -+#define __NR_rmdir 40 -+#define __NR_dup 41 -+#define __NR_pipe 42 -+#define __NR_times 43 -+#define __NR_prof 44 -+#define __NR_brk 45 -+#define __NR_setgid 46 -+#define __NR_getgid 47 -+#define __NR_signal 48 -+#define __NR_geteuid 49 -+#define __NR_getegid 50 -+#define __NR_acct 51 -+#define __NR_umount2 52 -+#define __NR_lock 53 -+#define __NR_ioctl 54 -+#define __NR_fcntl 55 -+#define __NR_mpx 56 -+#define __NR_setpgid 57 -+#define __NR_ulimit 58 -+#define __NR_oldolduname 59 -+#define __NR_umask 60 -+#define __NR_chroot 61 -+#define __NR_ustat 62 -+#define __NR_dup2 63 -+#define __NR_getppid 64 -+#define __NR_getpgrp 65 -+#define __NR_setsid 66 -+#define __NR_sigaction 67 -+#define __NR_sgetmask 68 -+#define __NR_ssetmask 69 -+#define __NR_setreuid 70 -+#define __NR_setregid 71 -+#define __NR_sigsuspend 72 -+#define __NR_sigpending 73 -+#define __NR_sethostname 74 -+#define __NR_setrlimit 75 -+#define __NR_getrlimit 76 -+#define __NR_getrusage 77 -+#define __NR_gettimeofday 78 -+#define __NR_settimeofday 79 -+#define __NR_getgroups 80 -+#define __NR_setgroups 81 -+#define __NR_select 82 -+#define __NR_symlink 83 -+#define __NR_oldlstat 84 -+#define __NR_readlink 85 -+#define __NR_uselib 86 -+#define __NR_swapon 87 -+#define __NR_reboot 88 -+#define __NR_readdir 89 -+#define __NR_mmap 90 -+#define __NR_munmap 91 -+#define __NR_truncate 92 -+#define __NR_ftruncate 93 -+#define __NR_fchmod 94 -+#define __NR_fchown 95 -+#define __NR_getpriority 96 -+#define __NR_setpriority 97 -+#define __NR_profil 98 -+#define __NR_statfs 99 -+#define __NR_fstatfs 100 -+#define __NR_ioperm 101 -+#define __NR_socketcall 102 -+#define __NR_syslog 103 -+#define __NR_setitimer 104 -+#define __NR_getitimer 105 -+#define __NR_stat 106 -+#define __NR_lstat 107 -+#define __NR_fstat 108 -+#define __NR_olduname 109 -+#define __NR_iopl 110 -+#define __NR_vhangup 111 -+#define __NR_idle 112 -+#define __NR_vm86 113 -+#define __NR_wait4 114 -+#define __NR_swapoff 115 -+#define __NR_sysinfo 116 -+#define __NR_ipc 117 -+#define __NR_fsync 118 -+#define __NR_sigreturn 119 -+#define __NR_clone 120 -+#define __NR_setdomainname 121 -+#define __NR_uname 122 -+#define __NR_modify_ldt 123 -+#define __NR_adjtimex 124 -+#define __NR_mprotect 125 -+#define __NR_sigprocmask 126 -+#define __NR_create_module 127 -+#define __NR_init_module 128 -+#define __NR_delete_module 129 -+#define __NR_get_kernel_syms 130 -+#define __NR_quotactl 131 -+#define __NR_getpgid 132 -+#define __NR_fchdir 133 -+#define __NR_bdflush 134 -+#define __NR_sysfs 135 -+#define __NR_personality 136 -+#define __NR_afs_syscall 137 -+#define __NR_setfsuid 138 -+#define __NR_setfsgid 139 -+#define __NR__llseek 140 -+#define __NR_getdents 141 -+#define __NR__newselect 142 -+#define __NR_flock 143 -+#define __NR_msync 144 -+#define __NR_readv 145 -+#define __NR_writev 146 -+#define __NR_getsid 147 -+#define __NR_fdatasync 148 -+#define __NR__sysctl 149 -+#define __NR_mlock 150 -+#define __NR_munlock 151 -+#define __NR_mlockall 152 -+#define __NR_munlockall 153 -+#define __NR_sched_setparam 154 -+#define __NR_sched_getparam 155 -+#define __NR_sched_setscheduler 156 -+#define __NR_sched_getscheduler 157 -+#define __NR_sched_yield 158 -+#define __NR_sched_get_priority_max 159 -+#define __NR_sched_get_priority_min 160 -+#define __NR_sched_rr_get_interval 161 -+#define __NR_nanosleep 162 -+#define __NR_mremap 163 -+#define __NR_setresuid 164 -+#define __NR_getresuid 165 -+#define __NR_query_module 166 -+#define __NR_poll 167 -+#define __NR_nfsservctl 168 -+#define __NR_setresgid 169 -+#define __NR_getresgid 170 -+#define __NR_prctl 171 -+#define __NR_rt_sigreturn 172 -+#define __NR_rt_sigaction 173 -+#define __NR_rt_sigprocmask 174 -+#define __NR_rt_sigpending 175 -+#define __NR_rt_sigtimedwait 176 -+#define __NR_rt_sigqueueinfo 177 -+#define __NR_rt_sigsuspend 178 -+#define __NR_pread64 179 -+#define __NR_pwrite64 180 -+#define __NR_chown 181 -+#define __NR_getcwd 182 -+#define __NR_capget 183 -+#define __NR_capset 184 -+#define __NR_sigaltstack 185 -+#define __NR_sendfile 186 -+#define __NR_getpmsg 187 -+#define __NR_putpmsg 188 -+#define __NR_vfork 189 -+#define __NR_ugetrlimit 190 -+#define __NR_readahead 191 -+#define __NR_pciconfig_read 198 -+#define __NR_pciconfig_write 199 -+#define __NR_pciconfig_iobase 200 -+#define __NR_multiplexer 201 -+#define __NR_getdents64 202 -+#define __NR_pivot_root 203 -+#define __NR_madvise 205 -+#define __NR_mincore 206 -+#define __NR_gettid 207 -+#define __NR_tkill 208 -+#define __NR_setxattr 209 -+#define __NR_lsetxattr 210 -+#define __NR_fsetxattr 211 -+#define __NR_getxattr 212 -+#define __NR_lgetxattr 213 -+#define __NR_fgetxattr 214 -+#define __NR_listxattr 215 -+#define __NR_llistxattr 216 -+#define __NR_flistxattr 217 -+#define __NR_removexattr 218 -+#define __NR_lremovexattr 219 -+#define __NR_fremovexattr 220 -+#define __NR_futex 221 -+#define __NR_sched_setaffinity 222 -+#define __NR_sched_getaffinity 223 -+#define __NR_tuxcall 225 -+#define __NR_io_setup 227 -+#define __NR_io_destroy 228 -+#define __NR_io_getevents 229 -+#define __NR_io_submit 230 -+#define __NR_io_cancel 231 -+#define __NR_set_tid_address 232 -+#define __NR_fadvise64 233 -+#define __NR_exit_group 234 -+#define __NR_lookup_dcookie 235 -+#define __NR_epoll_create 236 -+#define __NR_epoll_ctl 237 -+#define __NR_epoll_wait 238 -+#define __NR_remap_file_pages 239 -+#define __NR_timer_create 240 -+#define __NR_timer_settime 241 -+#define __NR_timer_gettime 242 -+#define __NR_timer_getoverrun 243 -+#define __NR_timer_delete 244 -+#define __NR_clock_settime 245 -+#define __NR_clock_gettime 246 -+#define __NR_clock_getres 247 -+#define __NR_clock_nanosleep 248 -+#define __NR_swapcontext 249 -+#define __NR_tgkill 250 -+#define __NR_utimes 251 -+#define __NR_statfs64 252 -+#define __NR_fstatfs64 253 -+#define __NR_rtas 255 -+#define __NR_sys_debug_setcontext 256 -+#define __NR_migrate_pages 258 -+#define __NR_mbind 259 -+#define __NR_get_mempolicy 260 -+#define __NR_set_mempolicy 261 -+#define __NR_mq_open 262 -+#define __NR_mq_unlink 263 -+#define __NR_mq_timedsend 264 -+#define __NR_mq_timedreceive 265 -+#define __NR_mq_notify 266 -+#define __NR_mq_getsetattr 267 -+#define __NR_kexec_load 268 -+#define __NR_add_key 269 -+#define __NR_request_key 270 -+#define __NR_keyctl 271 -+#define __NR_waitid 272 -+#define __NR_ioprio_set 273 -+#define __NR_ioprio_get 274 -+#define __NR_inotify_init 275 -+#define __NR_inotify_add_watch 276 -+#define __NR_inotify_rm_watch 277 -+#define __NR_spu_run 278 -+#define __NR_spu_create 279 -+#define __NR_pselect6 280 -+#define __NR_ppoll 281 -+#define __NR_unshare 282 -+#define __NR_splice 283 -+#define __NR_tee 284 -+#define __NR_vmsplice 285 -+#define __NR_openat 286 -+#define __NR_mkdirat 287 -+#define __NR_mknodat 288 -+#define __NR_fchownat 289 -+#define __NR_futimesat 290 -+#define __NR_newfstatat 291 -+#define __NR_unlinkat 292 -+#define __NR_renameat 293 -+#define __NR_linkat 294 -+#define __NR_symlinkat 295 -+#define __NR_readlinkat 296 -+#define __NR_fchmodat 297 -+#define __NR_faccessat 298 -+#define __NR_get_robust_list 299 -+#define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd_create 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 -+#define __NR_subpage_prot 310 -+#define __NR_timerfd_settime 311 -+#define __NR_timerfd_gettime 312 -+#define __NR_signalfd4 313 -+#define __NR_eventfd2 314 -+#define __NR_epoll_create1 315 -+#define __NR_dup3 316 -+#define __NR_pipe2 317 -+#define __NR_inotify_init1 318 -+#define __NR_perf_event_open 319 -+#define __NR_preadv 320 -+#define __NR_pwritev 321 -+#define __NR_rt_tgsigqueueinfo 322 -+#define __NR_fanotify_init 323 -+#define __NR_fanotify_mark 324 -+#define __NR_prlimit64 325 -+#define __NR_socket 326 -+#define __NR_bind 327 -+#define __NR_connect 328 -+#define __NR_listen 329 -+#define __NR_accept 330 -+#define __NR_getsockname 331 -+#define __NR_getpeername 332 -+#define __NR_socketpair 333 -+#define __NR_send 334 -+#define __NR_sendto 335 -+#define __NR_recv 336 -+#define __NR_recvfrom 337 -+#define __NR_shutdown 338 -+#define __NR_setsockopt 339 -+#define __NR_getsockopt 340 -+#define __NR_sendmsg 341 -+#define __NR_recvmsg 342 -+#define __NR_recvmmsg 343 -+#define __NR_accept4 344 -+#define __NR_name_to_handle_at 345 -+#define __NR_open_by_handle_at 346 -+#define __NR_clock_adjtime 347 -+#define __NR_syncfs 348 -+#define __NR_sendmmsg 349 -+#define __NR_setns 350 -+#define __NR_process_vm_readv 351 -+#define __NR_process_vm_writev 352 -+#define __NR_finit_module 353 -+#define __NR_kcmp 354 -+#define __NR_sched_setattr 355 -+#define __NR_sched_getattr 356 -+#define __NR_renameat2 357 -+#define __NR_seccomp 358 -+#define __NR_getrandom 359 -+#define __NR_memfd_create 360 -+#define __NR_bpf 361 -+#define __NR_execveat 362 -+#define __NR_switch_endian 363 -+#define __NR_userfaultfd 364 -+#define __NR_membarrier 365 -+#define __NR_mlock2 378 -+#define __NR_copy_file_range 379 -+#define __NR_preadv2 380 -+#define __NR_pwritev2 381 -+#define __NR_kexec_file_load 382 -+#define __NR_statx 383 -+#define __NR_pkey_alloc 384 -+#define __NR_pkey_free 385 -+#define __NR_pkey_mprotect 386 -+#define __NR_rseq 387 -+#define __NR_io_pgetevents 388 -+#define __NR_semtimedop 392 -+#define __NR_semget 393 -+#define __NR_semctl 394 -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#define __NR_msgget 399 -+#define __NR_msgsnd 400 -+#define __NR_msgrcv 401 -+#define __NR_msgctl 402 -+#define __NR_pidfd_send_signal 424 -+#define __NR_io_uring_setup 425 -+#define __NR_io_uring_enter 426 -+#define __NR_io_uring_register 427 -+#define __NR_open_tree 428 -+#define __NR_move_mount 429 -+#define __NR_fsopen 430 -+#define __NR_fsconfig 431 -+#define __NR_fsmount 432 -+#define __NR_fspick 433 -+#define __NR_pidfd_open 434 -+#define __NR_clone3 435 -+ -+ -+#endif /* _ASM_POWERPC_UNISTD_64_H */ diff -Nru libseccomp-2.4.3/debian/patches/add-5.8-powerpc-syscall-headers.patch libseccomp-2.5.1/debian/patches/add-5.8-powerpc-syscall-headers.patch --- libseccomp-2.4.3/debian/patches/add-5.8-powerpc-syscall-headers.patch 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/add-5.8-powerpc-syscall-headers.patch 2020-12-15 11:19:10.000000000 +1030 @@ -0,0 +1,1830 @@ +Author: Alex Murray +Description: Add a local copy of newer powerpc syscall headers + +These are required for the regression tests to pass on xenial/powerpc as +the 4.4 kernel used on xenial does not define some of these and in that +case the tests fail and the build fails. + +This was created using the following script: + + # run within the libseccomp source package tree + SRCDIR=$(pwd) + arch=powerpc + # find out what the architecture triplet specific dir is for this release + triplet=$(dpkg-architecture -a $arch -qDEB_HOST_MULTIARCH) + quilt new add-5.8-$arch-syscall-headers.patch + mkdir -p "tests/include/$arch" + DIR=$(mktemp -d) + pushd "$DIR" || exit + pull-lp-debs linux-libc-dev-$arch-cross groovy + mkdir $arch + dpkg-deb -x linux-libc-dev-$arch-cross*.deb $arch + # headers are named $arch/usr/$triplet/include/... - we need this to be + # include/$arch/... so we can patch Makefile.am to -Iinclude/$build_cpu + pushd "$arch/usr/$triplet/include" || exit + find . -regextype egrep -regex ".*unistd.*h" | while read -r f; do + # we need to add the file to the patch before it actually exists + pushd "$SRCDIR" || exit + quilt add "tests/include/$arch/$f" + popd || exit + cp --parents "$f" "$SRCDIR/tests/include/$arch" + pushd "$SRCDIR" || exit + quilt refresh + popd || exit + done + popd || exit + popd || exit + quilt add tests/Makefile.am + sed -i "s|^\(AM_LDFLAGS.*\)|CPPFLAGS = -I\$(top_srcdir)/tests/include/\$(build_cpu) \${AM_CPPFLAGS}\n\1|" tests/Makefile.am + quilt refresh + # then manually edit d/p/add-5.8-$arch-syscall-headers.patch to add DEP3 + # tags and this script as part of the header so we know how to generate it + # again in the future +--- /dev/null ++++ b/tests/include/powerpc/asm-generic/unistd.h +@@ -0,0 +1,910 @@ ++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ ++#include ++ ++/* ++ * This file contains the system call numbers, based on the ++ * layout of the x86-64 architecture, which embeds the ++ * pointer to the syscall in the table. ++ * ++ * As a basic principle, no duplication of functionality ++ * should be added, e.g. we don't use lseek when llseek ++ * is present. New architectures should use this file ++ * and implement the less feature-full calls in user space. ++ */ ++ ++#ifndef __SYSCALL ++#define __SYSCALL(x, y) ++#endif ++ ++#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) ++#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) ++#else ++#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) ++#endif ++ ++#ifdef __SYSCALL_COMPAT ++#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) ++#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) ++#else ++#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) ++#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) ++#endif ++ ++#define __NR_io_setup 0 ++__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) ++#define __NR_io_destroy 1 ++__SYSCALL(__NR_io_destroy, sys_io_destroy) ++#define __NR_io_submit 2 ++__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) ++#define __NR_io_cancel 3 ++__SYSCALL(__NR_io_cancel, sys_io_cancel) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_io_getevents 4 ++__SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) ++#endif ++ ++/* fs/xattr.c */ ++#define __NR_setxattr 5 ++__SYSCALL(__NR_setxattr, sys_setxattr) ++#define __NR_lsetxattr 6 ++__SYSCALL(__NR_lsetxattr, sys_lsetxattr) ++#define __NR_fsetxattr 7 ++__SYSCALL(__NR_fsetxattr, sys_fsetxattr) ++#define __NR_getxattr 8 ++__SYSCALL(__NR_getxattr, sys_getxattr) ++#define __NR_lgetxattr 9 ++__SYSCALL(__NR_lgetxattr, sys_lgetxattr) ++#define __NR_fgetxattr 10 ++__SYSCALL(__NR_fgetxattr, sys_fgetxattr) ++#define __NR_listxattr 11 ++__SYSCALL(__NR_listxattr, sys_listxattr) ++#define __NR_llistxattr 12 ++__SYSCALL(__NR_llistxattr, sys_llistxattr) ++#define __NR_flistxattr 13 ++__SYSCALL(__NR_flistxattr, sys_flistxattr) ++#define __NR_removexattr 14 ++__SYSCALL(__NR_removexattr, sys_removexattr) ++#define __NR_lremovexattr 15 ++__SYSCALL(__NR_lremovexattr, sys_lremovexattr) ++#define __NR_fremovexattr 16 ++__SYSCALL(__NR_fremovexattr, sys_fremovexattr) ++ ++/* fs/dcache.c */ ++#define __NR_getcwd 17 ++__SYSCALL(__NR_getcwd, sys_getcwd) ++ ++/* fs/cookies.c */ ++#define __NR_lookup_dcookie 18 ++__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) ++ ++/* fs/eventfd.c */ ++#define __NR_eventfd2 19 ++__SYSCALL(__NR_eventfd2, sys_eventfd2) ++ ++/* fs/eventpoll.c */ ++#define __NR_epoll_create1 20 ++__SYSCALL(__NR_epoll_create1, sys_epoll_create1) ++#define __NR_epoll_ctl 21 ++__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) ++#define __NR_epoll_pwait 22 ++__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) ++ ++/* fs/fcntl.c */ ++#define __NR_dup 23 ++__SYSCALL(__NR_dup, sys_dup) ++#define __NR_dup3 24 ++__SYSCALL(__NR_dup3, sys_dup3) ++#define __NR3264_fcntl 25 ++__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) ++ ++/* fs/inotify_user.c */ ++#define __NR_inotify_init1 26 ++__SYSCALL(__NR_inotify_init1, sys_inotify_init1) ++#define __NR_inotify_add_watch 27 ++__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) ++#define __NR_inotify_rm_watch 28 ++__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) ++ ++/* fs/ioctl.c */ ++#define __NR_ioctl 29 ++__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) ++ ++/* fs/ioprio.c */ ++#define __NR_ioprio_set 30 ++__SYSCALL(__NR_ioprio_set, sys_ioprio_set) ++#define __NR_ioprio_get 31 ++__SYSCALL(__NR_ioprio_get, sys_ioprio_get) ++ ++/* fs/locks.c */ ++#define __NR_flock 32 ++__SYSCALL(__NR_flock, sys_flock) ++ ++/* fs/namei.c */ ++#define __NR_mknodat 33 ++__SYSCALL(__NR_mknodat, sys_mknodat) ++#define __NR_mkdirat 34 ++__SYSCALL(__NR_mkdirat, sys_mkdirat) ++#define __NR_unlinkat 35 ++__SYSCALL(__NR_unlinkat, sys_unlinkat) ++#define __NR_symlinkat 36 ++__SYSCALL(__NR_symlinkat, sys_symlinkat) ++#define __NR_linkat 37 ++__SYSCALL(__NR_linkat, sys_linkat) ++#ifdef __ARCH_WANT_RENAMEAT ++/* renameat is superseded with flags by renameat2 */ ++#define __NR_renameat 38 ++__SYSCALL(__NR_renameat, sys_renameat) ++#endif /* __ARCH_WANT_RENAMEAT */ ++ ++/* fs/namespace.c */ ++#define __NR_umount2 39 ++__SYSCALL(__NR_umount2, sys_umount) ++#define __NR_mount 40 ++__SC_COMP(__NR_mount, sys_mount, compat_sys_mount) ++#define __NR_pivot_root 41 ++__SYSCALL(__NR_pivot_root, sys_pivot_root) ++ ++/* fs/nfsctl.c */ ++#define __NR_nfsservctl 42 ++__SYSCALL(__NR_nfsservctl, sys_ni_syscall) ++ ++/* fs/open.c */ ++#define __NR3264_statfs 43 ++__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ ++ compat_sys_statfs64) ++#define __NR3264_fstatfs 44 ++__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ ++ compat_sys_fstatfs64) ++#define __NR3264_truncate 45 ++__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ ++ compat_sys_truncate64) ++#define __NR3264_ftruncate 46 ++__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ ++ compat_sys_ftruncate64) ++ ++#define __NR_fallocate 47 ++__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) ++#define __NR_faccessat 48 ++__SYSCALL(__NR_faccessat, sys_faccessat) ++#define __NR_chdir 49 ++__SYSCALL(__NR_chdir, sys_chdir) ++#define __NR_fchdir 50 ++__SYSCALL(__NR_fchdir, sys_fchdir) ++#define __NR_chroot 51 ++__SYSCALL(__NR_chroot, sys_chroot) ++#define __NR_fchmod 52 ++__SYSCALL(__NR_fchmod, sys_fchmod) ++#define __NR_fchmodat 53 ++__SYSCALL(__NR_fchmodat, sys_fchmodat) ++#define __NR_fchownat 54 ++__SYSCALL(__NR_fchownat, sys_fchownat) ++#define __NR_fchown 55 ++__SYSCALL(__NR_fchown, sys_fchown) ++#define __NR_openat 56 ++__SYSCALL(__NR_openat, sys_openat) ++#define __NR_close 57 ++__SYSCALL(__NR_close, sys_close) ++#define __NR_vhangup 58 ++__SYSCALL(__NR_vhangup, sys_vhangup) ++ ++/* fs/pipe.c */ ++#define __NR_pipe2 59 ++__SYSCALL(__NR_pipe2, sys_pipe2) ++ ++/* fs/quota.c */ ++#define __NR_quotactl 60 ++__SYSCALL(__NR_quotactl, sys_quotactl) ++ ++/* fs/readdir.c */ ++#define __NR_getdents64 61 ++__SYSCALL(__NR_getdents64, sys_getdents64) ++ ++/* fs/read_write.c */ ++#define __NR3264_lseek 62 ++__SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) ++#define __NR_read 63 ++__SYSCALL(__NR_read, sys_read) ++#define __NR_write 64 ++__SYSCALL(__NR_write, sys_write) ++#define __NR_readv 65 ++__SC_COMP(__NR_readv, sys_readv, compat_sys_readv) ++#define __NR_writev 66 ++__SC_COMP(__NR_writev, sys_writev, compat_sys_writev) ++#define __NR_pread64 67 ++__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) ++#define __NR_pwrite64 68 ++__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) ++#define __NR_preadv 69 ++__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) ++#define __NR_pwritev 70 ++__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) ++ ++/* fs/sendfile.c */ ++#define __NR3264_sendfile 71 ++__SYSCALL(__NR3264_sendfile, sys_sendfile64) ++ ++/* fs/select.c */ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_pselect6 72 ++__SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) ++#define __NR_ppoll 73 ++__SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) ++#endif ++ ++/* fs/signalfd.c */ ++#define __NR_signalfd4 74 ++__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) ++ ++/* fs/splice.c */ ++#define __NR_vmsplice 75 ++__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) ++#define __NR_splice 76 ++__SYSCALL(__NR_splice, sys_splice) ++#define __NR_tee 77 ++__SYSCALL(__NR_tee, sys_tee) ++ ++/* fs/stat.c */ ++#define __NR_readlinkat 78 ++__SYSCALL(__NR_readlinkat, sys_readlinkat) ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR3264_fstatat 79 ++__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) ++#define __NR3264_fstat 80 ++__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) ++#endif ++ ++/* fs/sync.c */ ++#define __NR_sync 81 ++__SYSCALL(__NR_sync, sys_sync) ++#define __NR_fsync 82 ++__SYSCALL(__NR_fsync, sys_fsync) ++#define __NR_fdatasync 83 ++__SYSCALL(__NR_fdatasync, sys_fdatasync) ++#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 ++#define __NR_sync_file_range2 84 ++__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ ++ compat_sys_sync_file_range2) ++#else ++#define __NR_sync_file_range 84 ++__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ ++ compat_sys_sync_file_range) ++#endif ++ ++/* fs/timerfd.c */ ++#define __NR_timerfd_create 85 ++__SYSCALL(__NR_timerfd_create, sys_timerfd_create) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timerfd_settime 86 ++__SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ ++ sys_timerfd_settime) ++#define __NR_timerfd_gettime 87 ++__SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \ ++ sys_timerfd_gettime) ++#endif ++ ++/* fs/utimes.c */ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_utimensat 88 ++__SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) ++#endif ++ ++/* kernel/acct.c */ ++#define __NR_acct 89 ++__SYSCALL(__NR_acct, sys_acct) ++ ++/* kernel/capability.c */ ++#define __NR_capget 90 ++__SYSCALL(__NR_capget, sys_capget) ++#define __NR_capset 91 ++__SYSCALL(__NR_capset, sys_capset) ++ ++/* kernel/exec_domain.c */ ++#define __NR_personality 92 ++__SYSCALL(__NR_personality, sys_personality) ++ ++/* kernel/exit.c */ ++#define __NR_exit 93 ++__SYSCALL(__NR_exit, sys_exit) ++#define __NR_exit_group 94 ++__SYSCALL(__NR_exit_group, sys_exit_group) ++#define __NR_waitid 95 ++__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) ++ ++/* kernel/fork.c */ ++#define __NR_set_tid_address 96 ++__SYSCALL(__NR_set_tid_address, sys_set_tid_address) ++#define __NR_unshare 97 ++__SYSCALL(__NR_unshare, sys_unshare) ++ ++/* kernel/futex.c */ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_futex 98 ++__SC_3264(__NR_futex, sys_futex_time32, sys_futex) ++#endif ++#define __NR_set_robust_list 99 ++__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ ++ compat_sys_set_robust_list) ++#define __NR_get_robust_list 100 ++__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ ++ compat_sys_get_robust_list) ++ ++/* kernel/hrtimer.c */ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_nanosleep 101 ++__SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) ++#endif ++ ++/* kernel/itimer.c */ ++#define __NR_getitimer 102 ++__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) ++#define __NR_setitimer 103 ++__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) ++ ++/* kernel/kexec.c */ ++#define __NR_kexec_load 104 ++__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) ++ ++/* kernel/module.c */ ++#define __NR_init_module 105 ++__SYSCALL(__NR_init_module, sys_init_module) ++#define __NR_delete_module 106 ++__SYSCALL(__NR_delete_module, sys_delete_module) ++ ++/* kernel/posix-timers.c */ ++#define __NR_timer_create 107 ++__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timer_gettime 108 ++__SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) ++#endif ++#define __NR_timer_getoverrun 109 ++__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timer_settime 110 ++__SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) ++#endif ++#define __NR_timer_delete 111 ++__SYSCALL(__NR_timer_delete, sys_timer_delete) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_clock_settime 112 ++__SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) ++#define __NR_clock_gettime 113 ++__SC_3264(__NR_clock_gettime, sys_clock_gettime32, sys_clock_gettime) ++#define __NR_clock_getres 114 ++__SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres) ++#define __NR_clock_nanosleep 115 ++__SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ ++ sys_clock_nanosleep) ++#endif ++ ++/* kernel/printk.c */ ++#define __NR_syslog 116 ++__SYSCALL(__NR_syslog, sys_syslog) ++ ++/* kernel/ptrace.c */ ++#define __NR_ptrace 117 ++__SYSCALL(__NR_ptrace, sys_ptrace) ++ ++/* kernel/sched/core.c */ ++#define __NR_sched_setparam 118 ++__SYSCALL(__NR_sched_setparam, sys_sched_setparam) ++#define __NR_sched_setscheduler 119 ++__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) ++#define __NR_sched_getscheduler 120 ++__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) ++#define __NR_sched_getparam 121 ++__SYSCALL(__NR_sched_getparam, sys_sched_getparam) ++#define __NR_sched_setaffinity 122 ++__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ ++ compat_sys_sched_setaffinity) ++#define __NR_sched_getaffinity 123 ++__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ ++ compat_sys_sched_getaffinity) ++#define __NR_sched_yield 124 ++__SYSCALL(__NR_sched_yield, sys_sched_yield) ++#define __NR_sched_get_priority_max 125 ++__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) ++#define __NR_sched_get_priority_min 126 ++__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_sched_rr_get_interval 127 ++__SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ ++ sys_sched_rr_get_interval) ++#endif ++ ++/* kernel/signal.c */ ++#define __NR_restart_syscall 128 ++__SYSCALL(__NR_restart_syscall, sys_restart_syscall) ++#define __NR_kill 129 ++__SYSCALL(__NR_kill, sys_kill) ++#define __NR_tkill 130 ++__SYSCALL(__NR_tkill, sys_tkill) ++#define __NR_tgkill 131 ++__SYSCALL(__NR_tgkill, sys_tgkill) ++#define __NR_sigaltstack 132 ++__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) ++#define __NR_rt_sigsuspend 133 ++__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) ++#define __NR_rt_sigaction 134 ++__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) ++#define __NR_rt_sigprocmask 135 ++__SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) ++#define __NR_rt_sigpending 136 ++__SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_rt_sigtimedwait 137 ++__SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ ++ sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) ++#endif ++#define __NR_rt_sigqueueinfo 138 ++__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ ++ compat_sys_rt_sigqueueinfo) ++#define __NR_rt_sigreturn 139 ++__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) ++ ++/* kernel/sys.c */ ++#define __NR_setpriority 140 ++__SYSCALL(__NR_setpriority, sys_setpriority) ++#define __NR_getpriority 141 ++__SYSCALL(__NR_getpriority, sys_getpriority) ++#define __NR_reboot 142 ++__SYSCALL(__NR_reboot, sys_reboot) ++#define __NR_setregid 143 ++__SYSCALL(__NR_setregid, sys_setregid) ++#define __NR_setgid 144 ++__SYSCALL(__NR_setgid, sys_setgid) ++#define __NR_setreuid 145 ++__SYSCALL(__NR_setreuid, sys_setreuid) ++#define __NR_setuid 146 ++__SYSCALL(__NR_setuid, sys_setuid) ++#define __NR_setresuid 147 ++__SYSCALL(__NR_setresuid, sys_setresuid) ++#define __NR_getresuid 148 ++__SYSCALL(__NR_getresuid, sys_getresuid) ++#define __NR_setresgid 149 ++__SYSCALL(__NR_setresgid, sys_setresgid) ++#define __NR_getresgid 150 ++__SYSCALL(__NR_getresgid, sys_getresgid) ++#define __NR_setfsuid 151 ++__SYSCALL(__NR_setfsuid, sys_setfsuid) ++#define __NR_setfsgid 152 ++__SYSCALL(__NR_setfsgid, sys_setfsgid) ++#define __NR_times 153 ++__SC_COMP(__NR_times, sys_times, compat_sys_times) ++#define __NR_setpgid 154 ++__SYSCALL(__NR_setpgid, sys_setpgid) ++#define __NR_getpgid 155 ++__SYSCALL(__NR_getpgid, sys_getpgid) ++#define __NR_getsid 156 ++__SYSCALL(__NR_getsid, sys_getsid) ++#define __NR_setsid 157 ++__SYSCALL(__NR_setsid, sys_setsid) ++#define __NR_getgroups 158 ++__SYSCALL(__NR_getgroups, sys_getgroups) ++#define __NR_setgroups 159 ++__SYSCALL(__NR_setgroups, sys_setgroups) ++#define __NR_uname 160 ++__SYSCALL(__NR_uname, sys_newuname) ++#define __NR_sethostname 161 ++__SYSCALL(__NR_sethostname, sys_sethostname) ++#define __NR_setdomainname 162 ++__SYSCALL(__NR_setdomainname, sys_setdomainname) ++ ++#ifdef __ARCH_WANT_SET_GET_RLIMIT ++/* getrlimit and setrlimit are superseded with prlimit64 */ ++#define __NR_getrlimit 163 ++__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) ++#define __NR_setrlimit 164 ++__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) ++#endif ++ ++#define __NR_getrusage 165 ++__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) ++#define __NR_umask 166 ++__SYSCALL(__NR_umask, sys_umask) ++#define __NR_prctl 167 ++__SYSCALL(__NR_prctl, sys_prctl) ++#define __NR_getcpu 168 ++__SYSCALL(__NR_getcpu, sys_getcpu) ++ ++/* kernel/time.c */ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_gettimeofday 169 ++__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) ++#define __NR_settimeofday 170 ++__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) ++#define __NR_adjtimex 171 ++__SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) ++#endif ++ ++/* kernel/timer.c */ ++#define __NR_getpid 172 ++__SYSCALL(__NR_getpid, sys_getpid) ++#define __NR_getppid 173 ++__SYSCALL(__NR_getppid, sys_getppid) ++#define __NR_getuid 174 ++__SYSCALL(__NR_getuid, sys_getuid) ++#define __NR_geteuid 175 ++__SYSCALL(__NR_geteuid, sys_geteuid) ++#define __NR_getgid 176 ++__SYSCALL(__NR_getgid, sys_getgid) ++#define __NR_getegid 177 ++__SYSCALL(__NR_getegid, sys_getegid) ++#define __NR_gettid 178 ++__SYSCALL(__NR_gettid, sys_gettid) ++#define __NR_sysinfo 179 ++__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) ++ ++/* ipc/mqueue.c */ ++#define __NR_mq_open 180 ++__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) ++#define __NR_mq_unlink 181 ++__SYSCALL(__NR_mq_unlink, sys_mq_unlink) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_mq_timedsend 182 ++__SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) ++#define __NR_mq_timedreceive 183 ++__SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ ++ sys_mq_timedreceive) ++#endif ++#define __NR_mq_notify 184 ++__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) ++#define __NR_mq_getsetattr 185 ++__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) ++ ++/* ipc/msg.c */ ++#define __NR_msgget 186 ++__SYSCALL(__NR_msgget, sys_msgget) ++#define __NR_msgctl 187 ++__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) ++#define __NR_msgrcv 188 ++__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) ++#define __NR_msgsnd 189 ++__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) ++ ++/* ipc/sem.c */ ++#define __NR_semget 190 ++__SYSCALL(__NR_semget, sys_semget) ++#define __NR_semctl 191 ++__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_semtimedop 192 ++__SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) ++#endif ++#define __NR_semop 193 ++__SYSCALL(__NR_semop, sys_semop) ++ ++/* ipc/shm.c */ ++#define __NR_shmget 194 ++__SYSCALL(__NR_shmget, sys_shmget) ++#define __NR_shmctl 195 ++__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) ++#define __NR_shmat 196 ++__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) ++#define __NR_shmdt 197 ++__SYSCALL(__NR_shmdt, sys_shmdt) ++ ++/* net/socket.c */ ++#define __NR_socket 198 ++__SYSCALL(__NR_socket, sys_socket) ++#define __NR_socketpair 199 ++__SYSCALL(__NR_socketpair, sys_socketpair) ++#define __NR_bind 200 ++__SYSCALL(__NR_bind, sys_bind) ++#define __NR_listen 201 ++__SYSCALL(__NR_listen, sys_listen) ++#define __NR_accept 202 ++__SYSCALL(__NR_accept, sys_accept) ++#define __NR_connect 203 ++__SYSCALL(__NR_connect, sys_connect) ++#define __NR_getsockname 204 ++__SYSCALL(__NR_getsockname, sys_getsockname) ++#define __NR_getpeername 205 ++__SYSCALL(__NR_getpeername, sys_getpeername) ++#define __NR_sendto 206 ++__SYSCALL(__NR_sendto, sys_sendto) ++#define __NR_recvfrom 207 ++__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) ++#define __NR_setsockopt 208 ++__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) ++#define __NR_getsockopt 209 ++__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) ++#define __NR_shutdown 210 ++__SYSCALL(__NR_shutdown, sys_shutdown) ++#define __NR_sendmsg 211 ++__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) ++#define __NR_recvmsg 212 ++__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) ++ ++/* mm/filemap.c */ ++#define __NR_readahead 213 ++__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) ++ ++/* mm/nommu.c, also with MMU */ ++#define __NR_brk 214 ++__SYSCALL(__NR_brk, sys_brk) ++#define __NR_munmap 215 ++__SYSCALL(__NR_munmap, sys_munmap) ++#define __NR_mremap 216 ++__SYSCALL(__NR_mremap, sys_mremap) ++ ++/* security/keys/keyctl.c */ ++#define __NR_add_key 217 ++__SYSCALL(__NR_add_key, sys_add_key) ++#define __NR_request_key 218 ++__SYSCALL(__NR_request_key, sys_request_key) ++#define __NR_keyctl 219 ++__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) ++ ++/* arch/example/kernel/sys_example.c */ ++#define __NR_clone 220 ++__SYSCALL(__NR_clone, sys_clone) ++#define __NR_execve 221 ++__SC_COMP(__NR_execve, sys_execve, compat_sys_execve) ++ ++#define __NR3264_mmap 222 ++__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) ++/* mm/fadvise.c */ ++#define __NR3264_fadvise64 223 ++__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) ++ ++/* mm/, CONFIG_MMU only */ ++#ifndef __ARCH_NOMMU ++#define __NR_swapon 224 ++__SYSCALL(__NR_swapon, sys_swapon) ++#define __NR_swapoff 225 ++__SYSCALL(__NR_swapoff, sys_swapoff) ++#define __NR_mprotect 226 ++__SYSCALL(__NR_mprotect, sys_mprotect) ++#define __NR_msync 227 ++__SYSCALL(__NR_msync, sys_msync) ++#define __NR_mlock 228 ++__SYSCALL(__NR_mlock, sys_mlock) ++#define __NR_munlock 229 ++__SYSCALL(__NR_munlock, sys_munlock) ++#define __NR_mlockall 230 ++__SYSCALL(__NR_mlockall, sys_mlockall) ++#define __NR_munlockall 231 ++__SYSCALL(__NR_munlockall, sys_munlockall) ++#define __NR_mincore 232 ++__SYSCALL(__NR_mincore, sys_mincore) ++#define __NR_madvise 233 ++__SYSCALL(__NR_madvise, sys_madvise) ++#define __NR_remap_file_pages 234 ++__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) ++#define __NR_mbind 235 ++__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) ++#define __NR_get_mempolicy 236 ++__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) ++#define __NR_set_mempolicy 237 ++__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) ++#define __NR_migrate_pages 238 ++__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) ++#define __NR_move_pages 239 ++__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) ++#endif ++ ++#define __NR_rt_tgsigqueueinfo 240 ++__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ ++ compat_sys_rt_tgsigqueueinfo) ++#define __NR_perf_event_open 241 ++__SYSCALL(__NR_perf_event_open, sys_perf_event_open) ++#define __NR_accept4 242 ++__SYSCALL(__NR_accept4, sys_accept4) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_recvmmsg 243 ++__SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) ++#endif ++ ++/* ++ * Architectures may provide up to 16 syscalls of their own ++ * starting with this value. ++ */ ++#define __NR_arch_specific_syscall 244 ++ ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_wait4 260 ++__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) ++#endif ++#define __NR_prlimit64 261 ++__SYSCALL(__NR_prlimit64, sys_prlimit64) ++#define __NR_fanotify_init 262 ++__SYSCALL(__NR_fanotify_init, sys_fanotify_init) ++#define __NR_fanotify_mark 263 ++__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) ++#define __NR_name_to_handle_at 264 ++__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) ++#define __NR_open_by_handle_at 265 ++__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_clock_adjtime 266 ++__SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) ++#endif ++#define __NR_syncfs 267 ++__SYSCALL(__NR_syncfs, sys_syncfs) ++#define __NR_setns 268 ++__SYSCALL(__NR_setns, sys_setns) ++#define __NR_sendmmsg 269 ++__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) ++#define __NR_process_vm_readv 270 ++__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ ++ compat_sys_process_vm_readv) ++#define __NR_process_vm_writev 271 ++__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ ++ compat_sys_process_vm_writev) ++#define __NR_kcmp 272 ++__SYSCALL(__NR_kcmp, sys_kcmp) ++#define __NR_finit_module 273 ++__SYSCALL(__NR_finit_module, sys_finit_module) ++#define __NR_sched_setattr 274 ++__SYSCALL(__NR_sched_setattr, sys_sched_setattr) ++#define __NR_sched_getattr 275 ++__SYSCALL(__NR_sched_getattr, sys_sched_getattr) ++#define __NR_renameat2 276 ++__SYSCALL(__NR_renameat2, sys_renameat2) ++#define __NR_seccomp 277 ++__SYSCALL(__NR_seccomp, sys_seccomp) ++#define __NR_getrandom 278 ++__SYSCALL(__NR_getrandom, sys_getrandom) ++#define __NR_memfd_create 279 ++__SYSCALL(__NR_memfd_create, sys_memfd_create) ++#define __NR_bpf 280 ++__SYSCALL(__NR_bpf, sys_bpf) ++#define __NR_execveat 281 ++__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat) ++#define __NR_userfaultfd 282 ++__SYSCALL(__NR_userfaultfd, sys_userfaultfd) ++#define __NR_membarrier 283 ++__SYSCALL(__NR_membarrier, sys_membarrier) ++#define __NR_mlock2 284 ++__SYSCALL(__NR_mlock2, sys_mlock2) ++#define __NR_copy_file_range 285 ++__SYSCALL(__NR_copy_file_range, sys_copy_file_range) ++#define __NR_preadv2 286 ++__SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2) ++#define __NR_pwritev2 287 ++__SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2) ++#define __NR_pkey_mprotect 288 ++__SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect) ++#define __NR_pkey_alloc 289 ++__SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) ++#define __NR_pkey_free 290 ++__SYSCALL(__NR_pkey_free, sys_pkey_free) ++#define __NR_statx 291 ++__SYSCALL(__NR_statx, sys_statx) ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_io_pgetevents 292 ++__SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) ++#endif ++#define __NR_rseq 293 ++__SYSCALL(__NR_rseq, sys_rseq) ++#define __NR_kexec_file_load 294 ++__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) ++/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ ++#if __BITS_PER_LONG == 32 ++#define __NR_clock_gettime64 403 ++__SYSCALL(__NR_clock_gettime64, sys_clock_gettime) ++#define __NR_clock_settime64 404 ++__SYSCALL(__NR_clock_settime64, sys_clock_settime) ++#define __NR_clock_adjtime64 405 ++__SYSCALL(__NR_clock_adjtime64, sys_clock_adjtime) ++#define __NR_clock_getres_time64 406 ++__SYSCALL(__NR_clock_getres_time64, sys_clock_getres) ++#define __NR_clock_nanosleep_time64 407 ++__SYSCALL(__NR_clock_nanosleep_time64, sys_clock_nanosleep) ++#define __NR_timer_gettime64 408 ++__SYSCALL(__NR_timer_gettime64, sys_timer_gettime) ++#define __NR_timer_settime64 409 ++__SYSCALL(__NR_timer_settime64, sys_timer_settime) ++#define __NR_timerfd_gettime64 410 ++__SYSCALL(__NR_timerfd_gettime64, sys_timerfd_gettime) ++#define __NR_timerfd_settime64 411 ++__SYSCALL(__NR_timerfd_settime64, sys_timerfd_settime) ++#define __NR_utimensat_time64 412 ++__SYSCALL(__NR_utimensat_time64, sys_utimensat) ++#define __NR_pselect6_time64 413 ++__SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) ++#define __NR_ppoll_time64 414 ++__SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64) ++#define __NR_io_pgetevents_time64 416 ++__SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) ++#define __NR_recvmmsg_time64 417 ++__SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64) ++#define __NR_mq_timedsend_time64 418 ++__SYSCALL(__NR_mq_timedsend_time64, sys_mq_timedsend) ++#define __NR_mq_timedreceive_time64 419 ++__SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive) ++#define __NR_semtimedop_time64 420 ++__SYSCALL(__NR_semtimedop_time64, sys_semtimedop) ++#define __NR_rt_sigtimedwait_time64 421 ++__SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time64) ++#define __NR_futex_time64 422 ++__SYSCALL(__NR_futex_time64, sys_futex) ++#define __NR_sched_rr_get_interval_time64 423 ++__SYSCALL(__NR_sched_rr_get_interval_time64, sys_sched_rr_get_interval) ++#endif ++ ++#define __NR_pidfd_send_signal 424 ++__SYSCALL(__NR_pidfd_send_signal, sys_pidfd_send_signal) ++#define __NR_io_uring_setup 425 ++__SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) ++#define __NR_io_uring_enter 426 ++__SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) ++#define __NR_io_uring_register 427 ++__SYSCALL(__NR_io_uring_register, sys_io_uring_register) ++#define __NR_open_tree 428 ++__SYSCALL(__NR_open_tree, sys_open_tree) ++#define __NR_move_mount 429 ++__SYSCALL(__NR_move_mount, sys_move_mount) ++#define __NR_fsopen 430 ++__SYSCALL(__NR_fsopen, sys_fsopen) ++#define __NR_fsconfig 431 ++__SYSCALL(__NR_fsconfig, sys_fsconfig) ++#define __NR_fsmount 432 ++__SYSCALL(__NR_fsmount, sys_fsmount) ++#define __NR_fspick 433 ++__SYSCALL(__NR_fspick, sys_fspick) ++#define __NR_pidfd_open 434 ++__SYSCALL(__NR_pidfd_open, sys_pidfd_open) ++#ifdef __ARCH_WANT_SYS_CLONE3 ++#define __NR_clone3 435 ++__SYSCALL(__NR_clone3, sys_clone3) ++#endif ++ ++#define __NR_openat2 437 ++__SYSCALL(__NR_openat2, sys_openat2) ++#define __NR_pidfd_getfd 438 ++__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) ++#define __NR_faccessat2 439 ++__SYSCALL(__NR_faccessat2, sys_faccessat2) ++ ++#undef __NR_syscalls ++#define __NR_syscalls 440 ++ ++/* ++ * 32 bit systems traditionally used different ++ * syscalls for off_t and loff_t arguments, while ++ * 64 bit systems only need the off_t version. ++ * For new 32 bit platforms, there is no need to ++ * implement the old 32 bit off_t syscalls, so ++ * they take different names. ++ * Here we map the numbers so that both versions ++ * use the same syscall table layout. ++ */ ++#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) ++#define __NR_fcntl __NR3264_fcntl ++#define __NR_statfs __NR3264_statfs ++#define __NR_fstatfs __NR3264_fstatfs ++#define __NR_truncate __NR3264_truncate ++#define __NR_ftruncate __NR3264_ftruncate ++#define __NR_lseek __NR3264_lseek ++#define __NR_sendfile __NR3264_sendfile ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR_newfstatat __NR3264_fstatat ++#define __NR_fstat __NR3264_fstat ++#endif ++#define __NR_mmap __NR3264_mmap ++#define __NR_fadvise64 __NR3264_fadvise64 ++#ifdef __NR3264_stat ++#define __NR_stat __NR3264_stat ++#define __NR_lstat __NR3264_lstat ++#endif ++#else ++#define __NR_fcntl64 __NR3264_fcntl ++#define __NR_statfs64 __NR3264_statfs ++#define __NR_fstatfs64 __NR3264_fstatfs ++#define __NR_truncate64 __NR3264_truncate ++#define __NR_ftruncate64 __NR3264_ftruncate ++#define __NR_llseek __NR3264_lseek ++#define __NR_sendfile64 __NR3264_sendfile ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR_fstatat64 __NR3264_fstatat ++#define __NR_fstat64 __NR3264_fstat ++#endif ++#define __NR_mmap2 __NR3264_mmap ++#define __NR_fadvise64_64 __NR3264_fadvise64 ++#ifdef __NR3264_stat ++#define __NR_stat64 __NR3264_stat ++#define __NR_lstat64 __NR3264_lstat ++#endif ++#endif +--- /dev/null ++++ b/tests/include/powerpc/asm/unistd.h +@@ -0,0 +1,19 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * This file contains the system call numbers. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ */ ++#ifndef _ASM_POWERPC_UNISTD_H_ ++#define _ASM_POWERPC_UNISTD_H_ ++ ++#ifndef __powerpc64__ ++#include ++#else ++#include ++#endif ++ ++#endif /* _ASM_POWERPC_UNISTD_H_ */ +--- /dev/null ++++ b/tests/include/powerpc/asm/unistd_64.h +@@ -0,0 +1,398 @@ ++#ifndef _ASM_POWERPC_UNISTD_64_H ++#define _ASM_POWERPC_UNISTD_64_H ++ ++#define __NR_restart_syscall 0 ++#define __NR_exit 1 ++#define __NR_fork 2 ++#define __NR_read 3 ++#define __NR_write 4 ++#define __NR_open 5 ++#define __NR_close 6 ++#define __NR_waitpid 7 ++#define __NR_creat 8 ++#define __NR_link 9 ++#define __NR_unlink 10 ++#define __NR_execve 11 ++#define __NR_chdir 12 ++#define __NR_time 13 ++#define __NR_mknod 14 ++#define __NR_chmod 15 ++#define __NR_lchown 16 ++#define __NR_break 17 ++#define __NR_oldstat 18 ++#define __NR_lseek 19 ++#define __NR_getpid 20 ++#define __NR_mount 21 ++#define __NR_umount 22 ++#define __NR_setuid 23 ++#define __NR_getuid 24 ++#define __NR_stime 25 ++#define __NR_ptrace 26 ++#define __NR_alarm 27 ++#define __NR_oldfstat 28 ++#define __NR_pause 29 ++#define __NR_utime 30 ++#define __NR_stty 31 ++#define __NR_gtty 32 ++#define __NR_access 33 ++#define __NR_nice 34 ++#define __NR_ftime 35 ++#define __NR_sync 36 ++#define __NR_kill 37 ++#define __NR_rename 38 ++#define __NR_mkdir 39 ++#define __NR_rmdir 40 ++#define __NR_dup 41 ++#define __NR_pipe 42 ++#define __NR_times 43 ++#define __NR_prof 44 ++#define __NR_brk 45 ++#define __NR_setgid 46 ++#define __NR_getgid 47 ++#define __NR_signal 48 ++#define __NR_geteuid 49 ++#define __NR_getegid 50 ++#define __NR_acct 51 ++#define __NR_umount2 52 ++#define __NR_lock 53 ++#define __NR_ioctl 54 ++#define __NR_fcntl 55 ++#define __NR_mpx 56 ++#define __NR_setpgid 57 ++#define __NR_ulimit 58 ++#define __NR_oldolduname 59 ++#define __NR_umask 60 ++#define __NR_chroot 61 ++#define __NR_ustat 62 ++#define __NR_dup2 63 ++#define __NR_getppid 64 ++#define __NR_getpgrp 65 ++#define __NR_setsid 66 ++#define __NR_sigaction 67 ++#define __NR_sgetmask 68 ++#define __NR_ssetmask 69 ++#define __NR_setreuid 70 ++#define __NR_setregid 71 ++#define __NR_sigsuspend 72 ++#define __NR_sigpending 73 ++#define __NR_sethostname 74 ++#define __NR_setrlimit 75 ++#define __NR_getrlimit 76 ++#define __NR_getrusage 77 ++#define __NR_gettimeofday 78 ++#define __NR_settimeofday 79 ++#define __NR_getgroups 80 ++#define __NR_setgroups 81 ++#define __NR_select 82 ++#define __NR_symlink 83 ++#define __NR_oldlstat 84 ++#define __NR_readlink 85 ++#define __NR_uselib 86 ++#define __NR_swapon 87 ++#define __NR_reboot 88 ++#define __NR_readdir 89 ++#define __NR_mmap 90 ++#define __NR_munmap 91 ++#define __NR_truncate 92 ++#define __NR_ftruncate 93 ++#define __NR_fchmod 94 ++#define __NR_fchown 95 ++#define __NR_getpriority 96 ++#define __NR_setpriority 97 ++#define __NR_profil 98 ++#define __NR_statfs 99 ++#define __NR_fstatfs 100 ++#define __NR_ioperm 101 ++#define __NR_socketcall 102 ++#define __NR_syslog 103 ++#define __NR_setitimer 104 ++#define __NR_getitimer 105 ++#define __NR_stat 106 ++#define __NR_lstat 107 ++#define __NR_fstat 108 ++#define __NR_olduname 109 ++#define __NR_iopl 110 ++#define __NR_vhangup 111 ++#define __NR_idle 112 ++#define __NR_vm86 113 ++#define __NR_wait4 114 ++#define __NR_swapoff 115 ++#define __NR_sysinfo 116 ++#define __NR_ipc 117 ++#define __NR_fsync 118 ++#define __NR_sigreturn 119 ++#define __NR_clone 120 ++#define __NR_setdomainname 121 ++#define __NR_uname 122 ++#define __NR_modify_ldt 123 ++#define __NR_adjtimex 124 ++#define __NR_mprotect 125 ++#define __NR_sigprocmask 126 ++#define __NR_create_module 127 ++#define __NR_init_module 128 ++#define __NR_delete_module 129 ++#define __NR_get_kernel_syms 130 ++#define __NR_quotactl 131 ++#define __NR_getpgid 132 ++#define __NR_fchdir 133 ++#define __NR_bdflush 134 ++#define __NR_sysfs 135 ++#define __NR_personality 136 ++#define __NR_afs_syscall 137 ++#define __NR_setfsuid 138 ++#define __NR_setfsgid 139 ++#define __NR__llseek 140 ++#define __NR_getdents 141 ++#define __NR__newselect 142 ++#define __NR_flock 143 ++#define __NR_msync 144 ++#define __NR_readv 145 ++#define __NR_writev 146 ++#define __NR_getsid 147 ++#define __NR_fdatasync 148 ++#define __NR__sysctl 149 ++#define __NR_mlock 150 ++#define __NR_munlock 151 ++#define __NR_mlockall 152 ++#define __NR_munlockall 153 ++#define __NR_sched_setparam 154 ++#define __NR_sched_getparam 155 ++#define __NR_sched_setscheduler 156 ++#define __NR_sched_getscheduler 157 ++#define __NR_sched_yield 158 ++#define __NR_sched_get_priority_max 159 ++#define __NR_sched_get_priority_min 160 ++#define __NR_sched_rr_get_interval 161 ++#define __NR_nanosleep 162 ++#define __NR_mremap 163 ++#define __NR_setresuid 164 ++#define __NR_getresuid 165 ++#define __NR_query_module 166 ++#define __NR_poll 167 ++#define __NR_nfsservctl 168 ++#define __NR_setresgid 169 ++#define __NR_getresgid 170 ++#define __NR_prctl 171 ++#define __NR_rt_sigreturn 172 ++#define __NR_rt_sigaction 173 ++#define __NR_rt_sigprocmask 174 ++#define __NR_rt_sigpending 175 ++#define __NR_rt_sigtimedwait 176 ++#define __NR_rt_sigqueueinfo 177 ++#define __NR_rt_sigsuspend 178 ++#define __NR_pread64 179 ++#define __NR_pwrite64 180 ++#define __NR_chown 181 ++#define __NR_getcwd 182 ++#define __NR_capget 183 ++#define __NR_capset 184 ++#define __NR_sigaltstack 185 ++#define __NR_sendfile 186 ++#define __NR_getpmsg 187 ++#define __NR_putpmsg 188 ++#define __NR_vfork 189 ++#define __NR_ugetrlimit 190 ++#define __NR_readahead 191 ++#define __NR_pciconfig_read 198 ++#define __NR_pciconfig_write 199 ++#define __NR_pciconfig_iobase 200 ++#define __NR_multiplexer 201 ++#define __NR_getdents64 202 ++#define __NR_pivot_root 203 ++#define __NR_madvise 205 ++#define __NR_mincore 206 ++#define __NR_gettid 207 ++#define __NR_tkill 208 ++#define __NR_setxattr 209 ++#define __NR_lsetxattr 210 ++#define __NR_fsetxattr 211 ++#define __NR_getxattr 212 ++#define __NR_lgetxattr 213 ++#define __NR_fgetxattr 214 ++#define __NR_listxattr 215 ++#define __NR_llistxattr 216 ++#define __NR_flistxattr 217 ++#define __NR_removexattr 218 ++#define __NR_lremovexattr 219 ++#define __NR_fremovexattr 220 ++#define __NR_futex 221 ++#define __NR_sched_setaffinity 222 ++#define __NR_sched_getaffinity 223 ++#define __NR_tuxcall 225 ++#define __NR_io_setup 227 ++#define __NR_io_destroy 228 ++#define __NR_io_getevents 229 ++#define __NR_io_submit 230 ++#define __NR_io_cancel 231 ++#define __NR_set_tid_address 232 ++#define __NR_fadvise64 233 ++#define __NR_exit_group 234 ++#define __NR_lookup_dcookie 235 ++#define __NR_epoll_create 236 ++#define __NR_epoll_ctl 237 ++#define __NR_epoll_wait 238 ++#define __NR_remap_file_pages 239 ++#define __NR_timer_create 240 ++#define __NR_timer_settime 241 ++#define __NR_timer_gettime 242 ++#define __NR_timer_getoverrun 243 ++#define __NR_timer_delete 244 ++#define __NR_clock_settime 245 ++#define __NR_clock_gettime 246 ++#define __NR_clock_getres 247 ++#define __NR_clock_nanosleep 248 ++#define __NR_swapcontext 249 ++#define __NR_tgkill 250 ++#define __NR_utimes 251 ++#define __NR_statfs64 252 ++#define __NR_fstatfs64 253 ++#define __NR_rtas 255 ++#define __NR_sys_debug_setcontext 256 ++#define __NR_migrate_pages 258 ++#define __NR_mbind 259 ++#define __NR_get_mempolicy 260 ++#define __NR_set_mempolicy 261 ++#define __NR_mq_open 262 ++#define __NR_mq_unlink 263 ++#define __NR_mq_timedsend 264 ++#define __NR_mq_timedreceive 265 ++#define __NR_mq_notify 266 ++#define __NR_mq_getsetattr 267 ++#define __NR_kexec_load 268 ++#define __NR_add_key 269 ++#define __NR_request_key 270 ++#define __NR_keyctl 271 ++#define __NR_waitid 272 ++#define __NR_ioprio_set 273 ++#define __NR_ioprio_get 274 ++#define __NR_inotify_init 275 ++#define __NR_inotify_add_watch 276 ++#define __NR_inotify_rm_watch 277 ++#define __NR_spu_run 278 ++#define __NR_spu_create 279 ++#define __NR_pselect6 280 ++#define __NR_ppoll 281 ++#define __NR_unshare 282 ++#define __NR_splice 283 ++#define __NR_tee 284 ++#define __NR_vmsplice 285 ++#define __NR_openat 286 ++#define __NR_mkdirat 287 ++#define __NR_mknodat 288 ++#define __NR_fchownat 289 ++#define __NR_futimesat 290 ++#define __NR_newfstatat 291 ++#define __NR_unlinkat 292 ++#define __NR_renameat 293 ++#define __NR_linkat 294 ++#define __NR_symlinkat 295 ++#define __NR_readlinkat 296 ++#define __NR_fchmodat 297 ++#define __NR_faccessat 298 ++#define __NR_get_robust_list 299 ++#define __NR_set_robust_list 300 ++#define __NR_move_pages 301 ++#define __NR_getcpu 302 ++#define __NR_epoll_pwait 303 ++#define __NR_utimensat 304 ++#define __NR_signalfd 305 ++#define __NR_timerfd_create 306 ++#define __NR_eventfd 307 ++#define __NR_sync_file_range2 308 ++#define __NR_fallocate 309 ++#define __NR_subpage_prot 310 ++#define __NR_timerfd_settime 311 ++#define __NR_timerfd_gettime 312 ++#define __NR_signalfd4 313 ++#define __NR_eventfd2 314 ++#define __NR_epoll_create1 315 ++#define __NR_dup3 316 ++#define __NR_pipe2 317 ++#define __NR_inotify_init1 318 ++#define __NR_perf_event_open 319 ++#define __NR_preadv 320 ++#define __NR_pwritev 321 ++#define __NR_rt_tgsigqueueinfo 322 ++#define __NR_fanotify_init 323 ++#define __NR_fanotify_mark 324 ++#define __NR_prlimit64 325 ++#define __NR_socket 326 ++#define __NR_bind 327 ++#define __NR_connect 328 ++#define __NR_listen 329 ++#define __NR_accept 330 ++#define __NR_getsockname 331 ++#define __NR_getpeername 332 ++#define __NR_socketpair 333 ++#define __NR_send 334 ++#define __NR_sendto 335 ++#define __NR_recv 336 ++#define __NR_recvfrom 337 ++#define __NR_shutdown 338 ++#define __NR_setsockopt 339 ++#define __NR_getsockopt 340 ++#define __NR_sendmsg 341 ++#define __NR_recvmsg 342 ++#define __NR_recvmmsg 343 ++#define __NR_accept4 344 ++#define __NR_name_to_handle_at 345 ++#define __NR_open_by_handle_at 346 ++#define __NR_clock_adjtime 347 ++#define __NR_syncfs 348 ++#define __NR_sendmmsg 349 ++#define __NR_setns 350 ++#define __NR_process_vm_readv 351 ++#define __NR_process_vm_writev 352 ++#define __NR_finit_module 353 ++#define __NR_kcmp 354 ++#define __NR_sched_setattr 355 ++#define __NR_sched_getattr 356 ++#define __NR_renameat2 357 ++#define __NR_seccomp 358 ++#define __NR_getrandom 359 ++#define __NR_memfd_create 360 ++#define __NR_bpf 361 ++#define __NR_execveat 362 ++#define __NR_switch_endian 363 ++#define __NR_userfaultfd 364 ++#define __NR_membarrier 365 ++#define __NR_mlock2 378 ++#define __NR_copy_file_range 379 ++#define __NR_preadv2 380 ++#define __NR_pwritev2 381 ++#define __NR_kexec_file_load 382 ++#define __NR_statx 383 ++#define __NR_pkey_alloc 384 ++#define __NR_pkey_free 385 ++#define __NR_pkey_mprotect 386 ++#define __NR_rseq 387 ++#define __NR_io_pgetevents 388 ++#define __NR_semtimedop 392 ++#define __NR_semget 393 ++#define __NR_semctl 394 ++#define __NR_shmget 395 ++#define __NR_shmctl 396 ++#define __NR_shmat 397 ++#define __NR_shmdt 398 ++#define __NR_msgget 399 ++#define __NR_msgsnd 400 ++#define __NR_msgrcv 401 ++#define __NR_msgctl 402 ++#define __NR_pidfd_send_signal 424 ++#define __NR_io_uring_setup 425 ++#define __NR_io_uring_enter 426 ++#define __NR_io_uring_register 427 ++#define __NR_open_tree 428 ++#define __NR_move_mount 429 ++#define __NR_fsopen 430 ++#define __NR_fsconfig 431 ++#define __NR_fsmount 432 ++#define __NR_fspick 433 ++#define __NR_pidfd_open 434 ++#define __NR_clone3 435 ++#define __NR_openat2 437 ++#define __NR_pidfd_getfd 438 ++#define __NR_faccessat2 439 ++ ++ ++#endif /* _ASM_POWERPC_UNISTD_64_H */ +--- /dev/null ++++ b/tests/include/powerpc/asm/unistd_32.h +@@ -0,0 +1,426 @@ ++#ifndef _ASM_POWERPC_UNISTD_32_H ++#define _ASM_POWERPC_UNISTD_32_H ++ ++#define __NR_restart_syscall 0 ++#define __NR_exit 1 ++#define __NR_fork 2 ++#define __NR_read 3 ++#define __NR_write 4 ++#define __NR_open 5 ++#define __NR_close 6 ++#define __NR_waitpid 7 ++#define __NR_creat 8 ++#define __NR_link 9 ++#define __NR_unlink 10 ++#define __NR_execve 11 ++#define __NR_chdir 12 ++#define __NR_time 13 ++#define __NR_mknod 14 ++#define __NR_chmod 15 ++#define __NR_lchown 16 ++#define __NR_break 17 ++#define __NR_oldstat 18 ++#define __NR_lseek 19 ++#define __NR_getpid 20 ++#define __NR_mount 21 ++#define __NR_umount 22 ++#define __NR_setuid 23 ++#define __NR_getuid 24 ++#define __NR_stime 25 ++#define __NR_ptrace 26 ++#define __NR_alarm 27 ++#define __NR_oldfstat 28 ++#define __NR_pause 29 ++#define __NR_utime 30 ++#define __NR_stty 31 ++#define __NR_gtty 32 ++#define __NR_access 33 ++#define __NR_nice 34 ++#define __NR_ftime 35 ++#define __NR_sync 36 ++#define __NR_kill 37 ++#define __NR_rename 38 ++#define __NR_mkdir 39 ++#define __NR_rmdir 40 ++#define __NR_dup 41 ++#define __NR_pipe 42 ++#define __NR_times 43 ++#define __NR_prof 44 ++#define __NR_brk 45 ++#define __NR_setgid 46 ++#define __NR_getgid 47 ++#define __NR_signal 48 ++#define __NR_geteuid 49 ++#define __NR_getegid 50 ++#define __NR_acct 51 ++#define __NR_umount2 52 ++#define __NR_lock 53 ++#define __NR_ioctl 54 ++#define __NR_fcntl 55 ++#define __NR_mpx 56 ++#define __NR_setpgid 57 ++#define __NR_ulimit 58 ++#define __NR_oldolduname 59 ++#define __NR_umask 60 ++#define __NR_chroot 61 ++#define __NR_ustat 62 ++#define __NR_dup2 63 ++#define __NR_getppid 64 ++#define __NR_getpgrp 65 ++#define __NR_setsid 66 ++#define __NR_sigaction 67 ++#define __NR_sgetmask 68 ++#define __NR_ssetmask 69 ++#define __NR_setreuid 70 ++#define __NR_setregid 71 ++#define __NR_sigsuspend 72 ++#define __NR_sigpending 73 ++#define __NR_sethostname 74 ++#define __NR_setrlimit 75 ++#define __NR_getrlimit 76 ++#define __NR_getrusage 77 ++#define __NR_gettimeofday 78 ++#define __NR_settimeofday 79 ++#define __NR_getgroups 80 ++#define __NR_setgroups 81 ++#define __NR_select 82 ++#define __NR_symlink 83 ++#define __NR_oldlstat 84 ++#define __NR_readlink 85 ++#define __NR_uselib 86 ++#define __NR_swapon 87 ++#define __NR_reboot 88 ++#define __NR_readdir 89 ++#define __NR_mmap 90 ++#define __NR_munmap 91 ++#define __NR_truncate 92 ++#define __NR_ftruncate 93 ++#define __NR_fchmod 94 ++#define __NR_fchown 95 ++#define __NR_getpriority 96 ++#define __NR_setpriority 97 ++#define __NR_profil 98 ++#define __NR_statfs 99 ++#define __NR_fstatfs 100 ++#define __NR_ioperm 101 ++#define __NR_socketcall 102 ++#define __NR_syslog 103 ++#define __NR_setitimer 104 ++#define __NR_getitimer 105 ++#define __NR_stat 106 ++#define __NR_lstat 107 ++#define __NR_fstat 108 ++#define __NR_olduname 109 ++#define __NR_iopl 110 ++#define __NR_vhangup 111 ++#define __NR_idle 112 ++#define __NR_vm86 113 ++#define __NR_wait4 114 ++#define __NR_swapoff 115 ++#define __NR_sysinfo 116 ++#define __NR_ipc 117 ++#define __NR_fsync 118 ++#define __NR_sigreturn 119 ++#define __NR_clone 120 ++#define __NR_setdomainname 121 ++#define __NR_uname 122 ++#define __NR_modify_ldt 123 ++#define __NR_adjtimex 124 ++#define __NR_mprotect 125 ++#define __NR_sigprocmask 126 ++#define __NR_create_module 127 ++#define __NR_init_module 128 ++#define __NR_delete_module 129 ++#define __NR_get_kernel_syms 130 ++#define __NR_quotactl 131 ++#define __NR_getpgid 132 ++#define __NR_fchdir 133 ++#define __NR_bdflush 134 ++#define __NR_sysfs 135 ++#define __NR_personality 136 ++#define __NR_afs_syscall 137 ++#define __NR_setfsuid 138 ++#define __NR_setfsgid 139 ++#define __NR__llseek 140 ++#define __NR_getdents 141 ++#define __NR__newselect 142 ++#define __NR_flock 143 ++#define __NR_msync 144 ++#define __NR_readv 145 ++#define __NR_writev 146 ++#define __NR_getsid 147 ++#define __NR_fdatasync 148 ++#define __NR__sysctl 149 ++#define __NR_mlock 150 ++#define __NR_munlock 151 ++#define __NR_mlockall 152 ++#define __NR_munlockall 153 ++#define __NR_sched_setparam 154 ++#define __NR_sched_getparam 155 ++#define __NR_sched_setscheduler 156 ++#define __NR_sched_getscheduler 157 ++#define __NR_sched_yield 158 ++#define __NR_sched_get_priority_max 159 ++#define __NR_sched_get_priority_min 160 ++#define __NR_sched_rr_get_interval 161 ++#define __NR_nanosleep 162 ++#define __NR_mremap 163 ++#define __NR_setresuid 164 ++#define __NR_getresuid 165 ++#define __NR_query_module 166 ++#define __NR_poll 167 ++#define __NR_nfsservctl 168 ++#define __NR_setresgid 169 ++#define __NR_getresgid 170 ++#define __NR_prctl 171 ++#define __NR_rt_sigreturn 172 ++#define __NR_rt_sigaction 173 ++#define __NR_rt_sigprocmask 174 ++#define __NR_rt_sigpending 175 ++#define __NR_rt_sigtimedwait 176 ++#define __NR_rt_sigqueueinfo 177 ++#define __NR_rt_sigsuspend 178 ++#define __NR_pread64 179 ++#define __NR_pwrite64 180 ++#define __NR_chown 181 ++#define __NR_getcwd 182 ++#define __NR_capget 183 ++#define __NR_capset 184 ++#define __NR_sigaltstack 185 ++#define __NR_sendfile 186 ++#define __NR_getpmsg 187 ++#define __NR_putpmsg 188 ++#define __NR_vfork 189 ++#define __NR_ugetrlimit 190 ++#define __NR_readahead 191 ++#define __NR_mmap2 192 ++#define __NR_truncate64 193 ++#define __NR_ftruncate64 194 ++#define __NR_stat64 195 ++#define __NR_lstat64 196 ++#define __NR_fstat64 197 ++#define __NR_pciconfig_read 198 ++#define __NR_pciconfig_write 199 ++#define __NR_pciconfig_iobase 200 ++#define __NR_multiplexer 201 ++#define __NR_getdents64 202 ++#define __NR_pivot_root 203 ++#define __NR_fcntl64 204 ++#define __NR_madvise 205 ++#define __NR_mincore 206 ++#define __NR_gettid 207 ++#define __NR_tkill 208 ++#define __NR_setxattr 209 ++#define __NR_lsetxattr 210 ++#define __NR_fsetxattr 211 ++#define __NR_getxattr 212 ++#define __NR_lgetxattr 213 ++#define __NR_fgetxattr 214 ++#define __NR_listxattr 215 ++#define __NR_llistxattr 216 ++#define __NR_flistxattr 217 ++#define __NR_removexattr 218 ++#define __NR_lremovexattr 219 ++#define __NR_fremovexattr 220 ++#define __NR_futex 221 ++#define __NR_sched_setaffinity 222 ++#define __NR_sched_getaffinity 223 ++#define __NR_tuxcall 225 ++#define __NR_sendfile64 226 ++#define __NR_io_setup 227 ++#define __NR_io_destroy 228 ++#define __NR_io_getevents 229 ++#define __NR_io_submit 230 ++#define __NR_io_cancel 231 ++#define __NR_set_tid_address 232 ++#define __NR_fadvise64 233 ++#define __NR_exit_group 234 ++#define __NR_lookup_dcookie 235 ++#define __NR_epoll_create 236 ++#define __NR_epoll_ctl 237 ++#define __NR_epoll_wait 238 ++#define __NR_remap_file_pages 239 ++#define __NR_timer_create 240 ++#define __NR_timer_settime 241 ++#define __NR_timer_gettime 242 ++#define __NR_timer_getoverrun 243 ++#define __NR_timer_delete 244 ++#define __NR_clock_settime 245 ++#define __NR_clock_gettime 246 ++#define __NR_clock_getres 247 ++#define __NR_clock_nanosleep 248 ++#define __NR_swapcontext 249 ++#define __NR_tgkill 250 ++#define __NR_utimes 251 ++#define __NR_statfs64 252 ++#define __NR_fstatfs64 253 ++#define __NR_fadvise64_64 254 ++#define __NR_rtas 255 ++#define __NR_sys_debug_setcontext 256 ++#define __NR_migrate_pages 258 ++#define __NR_mbind 259 ++#define __NR_get_mempolicy 260 ++#define __NR_set_mempolicy 261 ++#define __NR_mq_open 262 ++#define __NR_mq_unlink 263 ++#define __NR_mq_timedsend 264 ++#define __NR_mq_timedreceive 265 ++#define __NR_mq_notify 266 ++#define __NR_mq_getsetattr 267 ++#define __NR_kexec_load 268 ++#define __NR_add_key 269 ++#define __NR_request_key 270 ++#define __NR_keyctl 271 ++#define __NR_waitid 272 ++#define __NR_ioprio_set 273 ++#define __NR_ioprio_get 274 ++#define __NR_inotify_init 275 ++#define __NR_inotify_add_watch 276 ++#define __NR_inotify_rm_watch 277 ++#define __NR_spu_run 278 ++#define __NR_spu_create 279 ++#define __NR_pselect6 280 ++#define __NR_ppoll 281 ++#define __NR_unshare 282 ++#define __NR_splice 283 ++#define __NR_tee 284 ++#define __NR_vmsplice 285 ++#define __NR_openat 286 ++#define __NR_mkdirat 287 ++#define __NR_mknodat 288 ++#define __NR_fchownat 289 ++#define __NR_futimesat 290 ++#define __NR_fstatat64 291 ++#define __NR_unlinkat 292 ++#define __NR_renameat 293 ++#define __NR_linkat 294 ++#define __NR_symlinkat 295 ++#define __NR_readlinkat 296 ++#define __NR_fchmodat 297 ++#define __NR_faccessat 298 ++#define __NR_get_robust_list 299 ++#define __NR_set_robust_list 300 ++#define __NR_move_pages 301 ++#define __NR_getcpu 302 ++#define __NR_epoll_pwait 303 ++#define __NR_utimensat 304 ++#define __NR_signalfd 305 ++#define __NR_timerfd_create 306 ++#define __NR_eventfd 307 ++#define __NR_sync_file_range2 308 ++#define __NR_fallocate 309 ++#define __NR_subpage_prot 310 ++#define __NR_timerfd_settime 311 ++#define __NR_timerfd_gettime 312 ++#define __NR_signalfd4 313 ++#define __NR_eventfd2 314 ++#define __NR_epoll_create1 315 ++#define __NR_dup3 316 ++#define __NR_pipe2 317 ++#define __NR_inotify_init1 318 ++#define __NR_perf_event_open 319 ++#define __NR_preadv 320 ++#define __NR_pwritev 321 ++#define __NR_rt_tgsigqueueinfo 322 ++#define __NR_fanotify_init 323 ++#define __NR_fanotify_mark 324 ++#define __NR_prlimit64 325 ++#define __NR_socket 326 ++#define __NR_bind 327 ++#define __NR_connect 328 ++#define __NR_listen 329 ++#define __NR_accept 330 ++#define __NR_getsockname 331 ++#define __NR_getpeername 332 ++#define __NR_socketpair 333 ++#define __NR_send 334 ++#define __NR_sendto 335 ++#define __NR_recv 336 ++#define __NR_recvfrom 337 ++#define __NR_shutdown 338 ++#define __NR_setsockopt 339 ++#define __NR_getsockopt 340 ++#define __NR_sendmsg 341 ++#define __NR_recvmsg 342 ++#define __NR_recvmmsg 343 ++#define __NR_accept4 344 ++#define __NR_name_to_handle_at 345 ++#define __NR_open_by_handle_at 346 ++#define __NR_clock_adjtime 347 ++#define __NR_syncfs 348 ++#define __NR_sendmmsg 349 ++#define __NR_setns 350 ++#define __NR_process_vm_readv 351 ++#define __NR_process_vm_writev 352 ++#define __NR_finit_module 353 ++#define __NR_kcmp 354 ++#define __NR_sched_setattr 355 ++#define __NR_sched_getattr 356 ++#define __NR_renameat2 357 ++#define __NR_seccomp 358 ++#define __NR_getrandom 359 ++#define __NR_memfd_create 360 ++#define __NR_bpf 361 ++#define __NR_execveat 362 ++#define __NR_switch_endian 363 ++#define __NR_userfaultfd 364 ++#define __NR_membarrier 365 ++#define __NR_mlock2 378 ++#define __NR_copy_file_range 379 ++#define __NR_preadv2 380 ++#define __NR_pwritev2 381 ++#define __NR_kexec_file_load 382 ++#define __NR_statx 383 ++#define __NR_pkey_alloc 384 ++#define __NR_pkey_free 385 ++#define __NR_pkey_mprotect 386 ++#define __NR_rseq 387 ++#define __NR_io_pgetevents 388 ++#define __NR_semget 393 ++#define __NR_semctl 394 ++#define __NR_shmget 395 ++#define __NR_shmctl 396 ++#define __NR_shmat 397 ++#define __NR_shmdt 398 ++#define __NR_msgget 399 ++#define __NR_msgsnd 400 ++#define __NR_msgrcv 401 ++#define __NR_msgctl 402 ++#define __NR_clock_gettime64 403 ++#define __NR_clock_settime64 404 ++#define __NR_clock_adjtime64 405 ++#define __NR_clock_getres_time64 406 ++#define __NR_clock_nanosleep_time64 407 ++#define __NR_timer_gettime64 408 ++#define __NR_timer_settime64 409 ++#define __NR_timerfd_gettime64 410 ++#define __NR_timerfd_settime64 411 ++#define __NR_utimensat_time64 412 ++#define __NR_pselect6_time64 413 ++#define __NR_ppoll_time64 414 ++#define __NR_io_pgetevents_time64 416 ++#define __NR_recvmmsg_time64 417 ++#define __NR_mq_timedsend_time64 418 ++#define __NR_mq_timedreceive_time64 419 ++#define __NR_semtimedop_time64 420 ++#define __NR_rt_sigtimedwait_time64 421 ++#define __NR_futex_time64 422 ++#define __NR_sched_rr_get_interval_time64 423 ++#define __NR_pidfd_send_signal 424 ++#define __NR_io_uring_setup 425 ++#define __NR_io_uring_enter 426 ++#define __NR_io_uring_register 427 ++#define __NR_open_tree 428 ++#define __NR_move_mount 429 ++#define __NR_fsopen 430 ++#define __NR_fsconfig 431 ++#define __NR_fsmount 432 ++#define __NR_fspick 433 ++#define __NR_pidfd_open 434 ++#define __NR_clone3 435 ++#define __NR_openat2 437 ++#define __NR_pidfd_getfd 438 ++#define __NR_faccessat2 439 ++ ++ ++#endif /* _ASM_POWERPC_UNISTD_32_H */ +--- /dev/null ++++ b/tests/include/powerpc/linux/unistd.h +@@ -0,0 +1,10 @@ ++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ ++#ifndef _LINUX_UNISTD_H_ ++#define _LINUX_UNISTD_H_ ++ ++/* ++ * Include machine specific syscall numbers ++ */ ++#include ++ ++#endif /* _LINUX_UNISTD_H_ */ +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -26,6 +26,7 @@ else + DBG_STATIC = -static + endif + ++CPPFLAGS = -I$(top_srcdir)/tests/include/$(build_cpu) ${AM_CPPFLAGS} + AM_LDFLAGS = ${DBG_STATIC} -lpthread + + LDADD = util.la ../src/libseccomp.la ${CODE_COVERAGE_LIBS} diff -Nru libseccomp-2.4.3/debian/patches/db-add-shadow-transactions.patch libseccomp-2.5.1/debian/patches/db-add-shadow-transactions.patch --- libseccomp-2.4.3/debian/patches/db-add-shadow-transactions.patch 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/db-add-shadow-transactions.patch 1970-01-01 09:30:00.000000000 +0930 @@ -1,208 +0,0 @@ -From bc3a6c0453b0350ee43e4925482f705a2fbf5a4d Mon Sep 17 00:00:00 2001 -From: Paul Moore -Origin: Upstream, https://github.com/seccomp/libseccomp/pull/180/commits/bc3a6c0453b0350ee43e4925482f705a2fbf5a4d -Bug: https://github.com/seccomp/libseccomp/issues/153 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1861177 -Date: Mon, 4 Nov 2019 20:15:20 -0500 -Subject: [PATCH] db: add shadow transactions - -Creating a transaction can be very time consuming on large filters since we -create a duplicate filter tree iteratively using the rules supplied by the -caller. In an effort to speed this up we introduce the idea of shadow -transactions where on a successful transaction commit we preserve the old -transaction checkpoint and bring it up to date with the current filter and -save it for future use. The next time we start a new transaction we check -to see if a shadow transaction exists, if it does we use that instead of -creating a new transaction checkpoint from scratch. - -Signed-off-by: Paul Moore ---- - src/db.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - src/db.h | 1 + - 2 files changed, 127 insertions(+), 1 deletion(-) - -Index: libseccomp-2.4.3/src/db.c -=================================================================== ---- libseccomp-2.4.3.orig/src/db.c -+++ libseccomp-2.4.3/src/db.c -@@ -909,6 +909,9 @@ static void _db_snap_release(struct db_f - { - unsigned int iter; - -+ if (snap == NULL) -+ return; -+ - if (snap->filter_cnt > 0) { - for (iter = 0; iter < snap->filter_cnt; iter++) { - if (snap->filters[iter]) -@@ -1128,6 +1131,7 @@ init_failure: - void db_col_release(struct db_filter_col *col) - { - unsigned int iter; -+ struct db_filter_snap *snap; - - if (col == NULL) - return; -@@ -1135,6 +1139,13 @@ void db_col_release(struct db_filter_col - /* set the state, just in case */ - col->state = _DB_STA_FREED; - -+ /* free any snapshots */ -+ while (col->snapshots != NULL) { -+ snap = col->snapshots; -+ col->snapshots = snap->next; -+ _db_snap_release(snap); -+ } -+ - /* free any filters */ - for (iter = 0; iter < col->filter_cnt; iter++) - _db_release(col->filters[iter]); -@@ -2307,6 +2318,20 @@ int db_col_transaction_start(struct db_f - struct db_filter *filter_o, *filter_s; - struct db_api_rule_list *rule_o, *rule_s = NULL; - -+ /* check to see if a shadow snapshot exists */ -+ if (col->snapshots && col->snapshots->shadow) { -+ /* we have a shadow! this will be easy */ -+ -+ /* NOTE: we don't bother to do any verification of the shadow -+ * because we start a new transaction every time we add -+ * a new rule to the filter(s); if this ever changes we -+ * will need to add a mechanism to verify that the shadow -+ * transaction is current/correct */ -+ -+ col->snapshots->shadow = false; -+ return 0; -+ } -+ - /* allocate the snapshot */ - snap = zmalloc(sizeof(*snap)); - if (snap == NULL) -@@ -2400,14 +2425,114 @@ void db_col_transaction_abort(struct db_ - * Commit the top most seccomp filter transaction - * @param col the filter collection - * -- * This function commits the most recent seccomp filter transaction. -+ * This function commits the most recent seccomp filter transaction and -+ * attempts to create a shadow transaction that is a duplicate of the current -+ * filter to speed up future transactions. - * - */ - void db_col_transaction_commit(struct db_filter_col *col) - { -+ int rc; -+ unsigned int iter; - struct db_filter_snap *snap; -+ struct db_filter *filter_o, *filter_s; -+ struct db_api_rule_list *rule_o, *rule_s; - - snap = col->snapshots; -+ if (snap == NULL) -+ return; -+ -+ /* check for a shadow set by a higher transaction commit */ -+ if (snap->shadow) { -+ /* leave the shadow intact, but drop the next snapshot */ -+ if (snap->next) { -+ snap->next = snap->next->next; -+ _db_snap_release(snap->next); -+ } -+ return; -+ } -+ -+ /* adjust the number of filters if needed */ -+ if (col->filter_cnt > snap->filter_cnt) { -+ unsigned int tmp_i; -+ struct db_filter **tmp_f; -+ -+ /* add filters */ -+ tmp_f = realloc(snap->filters, -+ sizeof(struct db_filter *) * col->filter_cnt); -+ if (tmp_f == NULL) -+ goto shadow_err; -+ snap->filters = tmp_f; -+ do { -+ tmp_i = snap->filter_cnt; -+ snap->filters[tmp_i] = -+ _db_init(col->filters[tmp_i]->arch); -+ if (snap->filters[tmp_i] == NULL) -+ goto shadow_err; -+ snap->filter_cnt++; -+ } while (snap->filter_cnt < col->filter_cnt); -+ } else if (col->filter_cnt < snap->filter_cnt) { -+ /* remove filters */ -+ -+ /* NOTE: while we release the filters we no longer need, we -+ * don't bother to resize the filter array, we just -+ * adjust the filter counter, this *should* be harmless -+ * at the cost of a not reaping all the memory possible */ -+ -+ do { -+ _db_release(snap->filters[snap->filter_cnt--]); -+ } while (snap->filter_cnt > col->filter_cnt); -+ } -+ -+ /* loop through each filter and update the rules on the snapshot */ -+ for (iter = 0; iter < col->filter_cnt; iter++) { -+ filter_o = col->filters[iter]; -+ filter_s = snap->filters[iter]; -+ -+ /* skip ahead to the new rule(s) */ -+ rule_o = filter_o->rules; -+ rule_s = filter_s->rules; -+ if (rule_o == NULL) -+ /* nothing to shadow */ -+ continue; -+ if (rule_s != NULL) { -+ do { -+ rule_o = rule_o->next; -+ rule_s = rule_s->next; -+ } while (rule_s != filter_s->rules); -+ -+ /* did we actually add any rules? */ -+ if (rule_o == filter_o->rules) -+ /* no, we are done in this case */ -+ continue; -+ } -+ -+ /* update the old snapshot to make it a shadow */ -+ do { -+ /* duplicate the rule */ -+ rule_s = db_rule_dup(rule_o); -+ if (rule_s == NULL) -+ goto shadow_err; -+ -+ /* add the rule */ -+ rc = _db_col_rule_add(filter_s, rule_s); -+ if (rc != 0) { -+ free(rule_s); -+ goto shadow_err; -+ } -+ -+ /* next rule */ -+ rule_o = rule_o->next; -+ } while (rule_o != filter_o->rules); -+ } -+ -+ /* success, mark the snapshot as a shadow and return */ -+ snap->shadow = true; -+ return; -+ -+shadow_err: -+ /* we failed making a shadow, cleanup and return */ - col->snapshots = snap->next; - _db_snap_release(snap); -+ return; - } -Index: libseccomp-2.4.3/src/db.h -=================================================================== ---- libseccomp-2.4.3.orig/src/db.h -+++ libseccomp-2.4.3/src/db.h -@@ -133,6 +133,7 @@ struct db_filter_snap { - /* individual filters */ - struct db_filter **filters; - unsigned int filter_cnt; -+ bool shadow; - - struct db_filter_snap *next; - }; diff -Nru libseccomp-2.4.3/debian/patches/db-consolidate-some-of-the-code-which-adds-rules.patch libseccomp-2.5.1/debian/patches/db-consolidate-some-of-the-code-which-adds-rules.patch --- libseccomp-2.4.3/debian/patches/db-consolidate-some-of-the-code-which-adds-rules.patch 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/db-consolidate-some-of-the-code-which-adds-rules.patch 1970-01-01 09:30:00.000000000 +0930 @@ -1,157 +0,0 @@ -From fb0dfd1289883b086311bb8ce6ebd8575378f24b Mon Sep 17 00:00:00 2001 -From: Paul Moore -Origin: Upstream, https://github.com/seccomp/libseccomp/pull/180/commits/fb0dfd1289883b086311bb8ce6ebd8575378f24b -Bug: https://github.com/seccomp/libseccomp/issues/153 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1861177 -Date: Fri, 1 Nov 2019 12:05:58 -0400 -Subject: [PATCH] db: consolidate some of the code which adds rules to a single - filter - -Pay back some of the technical debt in db_col_rule_add(), no logic -changes in this patch, just removing some code duplication. - -Signed-off-by: Paul Moore ---- - src/db.c | 85 +++++++++++++++++++++++++++++--------------------------- - 1 file changed, 44 insertions(+), 41 deletions(-) - -Index: libseccomp-2.4.3/src/db.c -=================================================================== ---- libseccomp-2.4.3.orig/src/db.c -+++ libseccomp-2.4.3/src/db.c -@@ -2147,6 +2147,44 @@ priority_failure: - } - - /** -+ * Add a new rule to a single filter -+ * @param filter the filter -+ * @param rule the filter rule -+ * -+ * This is a helper function for db_col_rule_add() and similar functions, it -+ * isn't generally useful. Returns zero on success, negative values on error. -+ * -+ */ -+static int _db_col_rule_add(struct db_filter *filter, -+ struct db_api_rule_list *rule) -+{ -+ int rc; -+ struct db_api_rule_list *iter; -+ -+ /* add the rule to the filter */ -+ rc = arch_filter_rule_add(filter, rule); -+ if (rc != 0) -+ return rc; -+ -+ /* insert the chain to the end of the rule list */ -+ iter = rule; -+ while (iter->next) -+ iter = iter->next; -+ if (filter->rules != NULL) { -+ rule->prev = filter->rules->prev; -+ iter->next = filter->rules; -+ filter->rules->prev->next = rule; -+ filter->rules->prev = iter; -+ } else { -+ rule->prev = iter; -+ iter->next = rule; -+ filter->rules = rule; -+ } -+ -+ return 0; -+} -+ -+/** - * Add a new rule to the current filter - * @param col the filter collection - * @param strict the strict flag -@@ -2174,7 +2212,7 @@ int db_col_rule_add(struct db_filter_col - size_t chain_size; - struct db_api_arg *chain = NULL; - struct scmp_arg_cmp arg_data; -- struct db_api_rule_list *rule, *rule_tmp; -+ struct db_api_rule_list *rule; - struct db_filter *db; - - /* collect the arguments for the filter rule */ -@@ -2222,9 +2260,6 @@ int db_col_rule_add(struct db_filter_col - - /* add the rule to the different filters in the collection */ - for (iter = 0; iter < col->filter_cnt; iter++) { -- -- /* TODO: consolidate with db_col_transaction_start() */ -- - db = col->filters[iter]; - - /* create the rule */ -@@ -2235,24 +2270,10 @@ int db_col_rule_add(struct db_filter_col - } - - /* add the rule */ -- rc_tmp = arch_filter_rule_add(db, rule); -- if (rc_tmp == 0) { -- /* insert the chain to the end of the rule list */ -- rule_tmp = rule; -- while (rule_tmp->next) -- rule_tmp = rule_tmp->next; -- if (db->rules != NULL) { -- rule->prev = db->rules->prev; -- rule_tmp->next = db->rules; -- db->rules->prev->next = rule; -- db->rules->prev = rule_tmp; -- } else { -- rule->prev = rule_tmp; -- rule_tmp->next = rule; -- db->rules = rule; -- } -- } else -+ rc_tmp = _db_col_rule_add(db, rule); -+ if (rc_tmp != 0) - free(rule); -+ - add_arch_fail: - if (rc_tmp != 0 && rc == 0) - rc = rc_tmp; -@@ -2284,7 +2305,7 @@ int db_col_transaction_start(struct db_f - unsigned int iter; - struct db_filter_snap *snap; - struct db_filter *filter_o, *filter_s; -- struct db_api_rule_list *rule_o, *rule_s = NULL, *rule_tmp; -+ struct db_api_rule_list *rule_o, *rule_s = NULL; - - /* allocate the snapshot */ - snap = zmalloc(sizeof(*snap)); -@@ -2314,33 +2335,15 @@ int db_col_transaction_start(struct db_f - if (rule_o == NULL) - continue; - do { -- -- /* TODO: consolidate with db_col_rule_add() */ -- - /* duplicate the rule */ - rule_s = db_rule_dup(rule_o); - if (rule_s == NULL) - goto trans_start_failure; - - /* add the rule */ -- rc = arch_filter_rule_add(filter_s, rule_s); -+ rc = _db_col_rule_add(filter_s, rule_s); - if (rc != 0) - goto trans_start_failure; -- -- /* insert the chain to the end of the rule list */ -- rule_tmp = rule_s; -- while (rule_tmp->next) -- rule_tmp = rule_tmp->next; -- if (filter_s->rules != NULL) { -- rule_s->prev = filter_s->rules->prev; -- rule_tmp->next = filter_s->rules; -- filter_s->rules->prev->next = rule_s; -- filter_s->rules->prev = rule_tmp; -- } else { -- rule_s->prev = rule_tmp; -- rule_tmp->next = rule_s; -- filter_s->rules = rule_s; -- } - rule_s = NULL; - - /* next rule */ diff -Nru libseccomp-2.4.3/debian/patches/fix-aarch64-syscalls.patch libseccomp-2.5.1/debian/patches/fix-aarch64-syscalls.patch --- libseccomp-2.4.3/debian/patches/fix-aarch64-syscalls.patch 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/fix-aarch64-syscalls.patch 1970-01-01 09:30:00.000000000 +0930 @@ -1,32 +0,0 @@ -Description: Fix missing aarch64 syscalls -Origin: Backport of https://github.com/seccomp/libseccomp/pull/235 -Author: Alex Murray ---- a/src/arch-aarch64-syscalls.c -+++ b/src/arch-aarch64-syscalls.c -@@ -68,7 +68,7 @@ const struct arch_syscall_def aarch64_sy - { "clock_settime", 112 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 220 }, -- { "clone3", __PNR_clone3 }, -+ { "clone3", 435 }, - { "close", 57 }, - { "connect", 203 }, - { "copy_file_range", 285 }, -@@ -159,7 +159,7 @@ const struct arch_syscall_def aarch64_sy - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 148 }, - { "getresuid32", __PNR_getresuid32 }, -- { "getrlimit", __PNR_getrlimit }, -+ { "getrlimit", 163 }, - { "getrusage", 165 }, - { "getsid", 156 }, - { "getsockname", 204 }, -@@ -391,7 +391,7 @@ const struct arch_syscall_def aarch64_sy - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 145 }, - { "setreuid32", __PNR_setreuid32 }, -- { "setrlimit", __PNR_setrlimit }, -+ { "setrlimit", 164 }, - { "setsid", 157 }, - { "setsockopt", 208 }, - { "settimeofday", 170 }, diff -Nru libseccomp-2.4.3/debian/patches/series libseccomp-2.5.1/debian/patches/series --- libseccomp-2.4.3/debian/patches/series 2020-06-29 22:22:22.000000000 +0930 +++ libseccomp-2.5.1/debian/patches/series 2020-12-15 11:19:10.000000000 +1030 @@ -1,4 +1 @@ -fix-aarch64-syscalls.patch -add-5.4-local-syscall-headers.patch -db-consolidate-some-of-the-code-which-adds-rules.patch -db-add-shadow-transactions.patch +add-5.8-powerpc-syscall-headers.patch diff -Nru libseccomp-2.4.3/doc/Makefile.am libseccomp-2.5.1/doc/Makefile.am --- libseccomp-2.4.3/doc/Makefile.am 2020-03-03 02:49:57.855374588 +1030 +++ libseccomp-2.5.1/doc/Makefile.am 2020-11-17 08:34:38.777027338 +1030 @@ -38,6 +38,12 @@ man/man3/seccomp_rule_add_array.3 \ man/man3/seccomp_rule_add_exact.3 \ man/man3/seccomp_rule_add_exact_array.3 \ + man/man3/seccomp_notify_alloc.3 \ + man/man3/seccomp_notify_fd.3 \ + man/man3/seccomp_notify_free.3 \ + man/man3/seccomp_notify_id_valid.3 \ + man/man3/seccomp_notify_receive.3 \ + man/man3/seccomp_notify_respond.3 \ man/man3/seccomp_syscall_priority.3 \ man/man3/seccomp_syscall_resolve_name.3 \ man/man3/seccomp_syscall_resolve_name_arch.3 \ diff -Nru libseccomp-2.4.3/doc/Makefile.in libseccomp-2.5.1/doc/Makefile.in --- libseccomp-2.4.3/doc/Makefile.in 2020-03-03 04:15:53.003766375 +1030 +++ libseccomp-2.5.1/doc/Makefile.in 2020-11-17 10:17:44.800797424 +1030 @@ -209,6 +209,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -275,13 +276,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -336,6 +337,12 @@ man/man3/seccomp_rule_add_array.3 \ man/man3/seccomp_rule_add_exact.3 \ man/man3/seccomp_rule_add_exact_array.3 \ + man/man3/seccomp_notify_alloc.3 \ + man/man3/seccomp_notify_fd.3 \ + man/man3/seccomp_notify_free.3 \ + man/man3/seccomp_notify_id_valid.3 \ + man/man3/seccomp_notify_receive.3 \ + man/man3/seccomp_notify_respond.3 \ man/man3/seccomp_syscall_priority.3 \ man/man3/seccomp_syscall_resolve_name.3 \ man/man3/seccomp_syscall_resolve_name_arch.3 \ diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_api_get.3 libseccomp-2.5.1/doc/man/man3/seccomp_api_get.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_api_get.3 2020-03-03 02:49:57.855374588 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_api_get.3 2020-11-17 08:34:38.777027338 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_api_get" 3 "8 October 2017" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_api_get" 3 "6 November 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -49,7 +49,17 @@ syscall to load the seccomp filter into the kernel. .TP .B 3 -The SCMP_FLTATR_CTL_LOG filter attribute and the SCMP_ACT_LOG action are supported. +The SCMP_FLTATR_CTL_LOG filter attribute and the SCMP_ACT_LOG action are +supported. +.TP +.B 4 +The SCMP_FLTATR_CTL_SSB filter attribute is supported. +.TP +.B 5 +The SCMP_ACT_NOTIFY action and the notify APIs are supported. +.TP +.B 6 +The simultaneous use of SCMP_FLTATR_CTL_TSYNC and the notify APIs are supported. .\" ////////////////////////////////////////////////////////////////////////// .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_arch_add.3 libseccomp-2.5.1/doc/man/man3/seccomp_arch_add.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_arch_add.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_arch_add.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_arch_add" 3 "7 May 2014" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_arch_add" 3 "15 June 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -14,6 +14,23 @@ .B #define SCMP_ARCH_NATIVE .B #define SCMP_ARCH_X86 .B #define SCMP_ARCH_X86_64 +.B #define SCMP_ARCH_X32 +.B #define SCMP_ARCH_ARM +.B #define SCMP_ARCH_AARCH64 +.B #define SCMP_ARCH_MIPS +.B #define SCMP_ARCH_MIPS64 +.B #define SCMP_ARCH_MIPS64N32 +.B #define SCMP_ARCH_MIPSEL +.B #define SCMP_ARCH_MIPSEL64 +.B #define SCMP_ARCH_MIPSEL64N32 +.B #define SCMP_ARCH_PPC +.B #define SCMP_ARCH_PPC64 +.B #define SCMP_ARCH_PPC64LE +.B #define SCMP_ARCH_S390 +.B #define SCMP_ARCH_S390X +.B #define SCMP_ARCH_PARISC +.B #define SCMP_ARCH_PARISC64 +.B #define SCMP_ARCH_RISCV64 .sp .BI "uint32_t seccomp_arch_resolve_name(const char *" arch_name ");" .BI "uint32_t seccomp_arch_native();" @@ -69,13 +86,28 @@ .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// The -.BR seccomp_arch_add () +.BR seccomp_arch_add (), +.BR seccomp_arch_remove (), and -.BR seccomp_arch_remove () -functions return zero on success, negative errno values on failure. The .BR seccomp_arch_exist () -function returns zero if the architecture exists, \-EEXIST if it does not, and -other negative errno values on failure. +functions return zero on success or one of the following error codes on +failure: +.TP +.B -EDOM +Architecture specific failure. +.TP +.B -EEXIST +In the case of +.BR seccomp_arch_add () +the architecture already exists and in the case of +.BR seccomp_arch_remove () +the architecture does not exist. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_attr_set.3 libseccomp-2.5.1/doc/man/man3/seccomp_attr_set.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_attr_set.3 2020-03-03 02:49:57.855374588 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_attr_set.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_attr_set" 3 "21 August 2014" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_attr_set" 3 "06 June 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -94,10 +94,61 @@ action. Defaults to off ( .I value == 0). +.TP +.B SCMP_FLTATR_CTL_SSB +A flag to disable Speculative Store Bypass mitigations for this filter. +Defaults to off ( +.I value +== 0). +.TP +.B SCMP_FLTATR_CTL_OPTIMIZE +A flag to specify the optimization level of the seccomp filter. By default +libseccomp generates a set of sequential \'if\' statements for each rule in +the filter. +.BR seccomp_syscall_priority(3) +can be used to prioritize the order for the default cause. The binary tree +optimization sorts by syscall numbers and generates consistent +.BR O(log\ n) +filter traversal for every rule in the filter. The binary tree may be +advantageous for large filters. Note that +.BR seccomp_syscall_priority(3) +is ignored when SCMP_FLTATR_CTL_OPTIMIZE == 2. +.RS +.P +The different optimization levels are described below: +.TP +.B 0 +Reserved value, not currently used. +.TP +.B 1 +Rules sorted by priority and complexity (DEFAULT). +.TP +.B 2 +Binary tree sorted by syscall number. +.RE +.TP +.B SCMP_FLTATR_API_SYSRAWRC +A flag to specify if libseccomp should pass system error codes back to the +caller instead of the default -ECANCELED. Defaults to off ( +.I value +== 0). .\" ////////////////////////////////////////////////////////////////////////// .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// -Returns zero on success, negative errno values on failure. +Returns zero on success or one of the following error codes on +failure: +.TP +.B -EACCES +Setting the attribute with the given value is not allowed. +.TP +.B -EEXIST +The attribute does not exist. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -EOPNOTSUPP +The library doesn't support the particular operation. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_export_bpf.3 libseccomp-2.5.1/doc/man/man3/seccomp_export_bpf.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_export_bpf.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_export_bpf.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_export_bpf" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_export_bpf" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -24,7 +24,7 @@ .BR seccomp_export_bpf () and .BR seccomp_export_pfc () -functions generate and output the current seccomp filter in either BPF (Berkley +functions generate and output the current seccomp filter in either BPF (Berkeley Packet Filter) or PFC (Pseudo Filter Code). The output of .BR seccomp_export_bpf () is suitable for loading into the kernel, while the output of @@ -45,7 +45,25 @@ .\" ////////////////////////////////////////////////////////////////////////// .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// -Returns zero on success, negative errno values on failure. +Return zero on success or one of the following error codes on +failure: +.TP +.B -ECANCELED +There was a system failure beyond the control of the library. +.TP +.B -EFAULT +Internal libseccomp failure. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. +.P +If the \fISCMP_FLTATR_API_SYSRAWRC\fP filter attribute is non-zero then +additional error codes may be returned to the caller; these additional error +codes are the negative \fIerrno\fP values returned by the system. Unfortunately +libseccomp can make no guarantees about these return values. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_init.3 libseccomp-2.5.1/doc/man/man3/seccomp_init.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_init.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_init.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_init" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_init" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -36,7 +36,17 @@ function releases the existing filter context state before reinitializing it and can only be called after a call to .BR seccomp_init () -has succeeded. +has succeeded. If +.BR seccomp_reset () +is called with a NULL filter, it resets the library's global task state, +including any notification file descriptors retrieved by +.BR seccomp_notify_fd(3) . +Normally this is not needed, but it may be required to continue using the +library after a +.BR fork () +or +.BR clone () +call to ensure the API level and user notification state is properly reset. .P When the caller is finished configuring the seccomp filter and has loaded it into the kernel, the caller should call @@ -98,7 +108,14 @@ .BR seccomp_init () function returns a filter context on success, NULL on failure. The .BR seccomp_reset () -function returns zero on success, negative errno values on failure. +function returns zero on success or one of the following error codes on +failure: +.TP +.B -EINVAL +Invalid input, either the context or action is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_load.3 libseccomp-2.5.1/doc/man/man3/seccomp_load.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_load.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_load.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_load" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_load" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -23,10 +23,40 @@ .I ctx into the kernel; if the function succeeds the new seccomp filter will be active when the function returns. +.P +As it is possible to have multiple stacked seccomp filters for a given task +(defined as either a process or a thread), it is important to remember that +each of the filters loaded for a given task are executed when a syscall is +made and the "strictest" rule is the rule that is applied. In the case of +seccomp, "strictest" is defined as the action with the lowest value (e.g. +.I SCMP_ACT_KILL +is "stricter" than +.I SCMP_ACT_ALLOW +). .\" ////////////////////////////////////////////////////////////////////////// .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// -Returns zero on success, negative errno values on failure. +Returns zero on success or one of the following error codes on failure: +.TP +.B -ECANCELED +There was a system failure beyond the control of the library. +.TP +.B -EFAULT +Internal libseccomp failure. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. +.TP +.B -ESRCH +Unable to load the filter due to thread issues. +.P +If the \fISCMP_FLTATR_API_SYSRAWRC\fP filter attribute is non-zero then +additional error codes may be returned to the caller; these additional error +codes are the negative \fIerrno\fP values returned by the system. Unfortunately +libseccomp can make no guarantees about these return values. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_merge.3 libseccomp-2.5.1/doc/man/man3/seccomp_merge.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_merge.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_merge.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_merge" 3 "28 September 2012" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_merge" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -41,7 +41,21 @@ .\" ////////////////////////////////////////////////////////////////////////// .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// -Returns zero on success and negative values on failure. +Returns zero on success or one of the following error codes on +failure: +.TP +.B -EDOM +Unable to merge the filters due to architecture issues, e.g. byte endian +mismatches. +.TP +.B -EEXIST +The architecture already exists in the filter. +.TP +.B -EINVAL +One of the filters is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_alloc.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_alloc.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_alloc.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_alloc.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1,114 @@ +.TH "seccomp_notify_alloc" 3 "30 May 2020" "tycho@tycho.ws" "libseccomp Documentation" +.\" ////////////////////////////////////////////////////////////////////////// +.SH NAME +.\" ////////////////////////////////////////////////////////////////////////// +seccomp_notify_alloc, seccomp_notify_free, seccomp_notify_receive, +seccomp_notify_respond, seccomp_notify_id_valid, seccomp_notify_fd \- Manage seccomp notifications +.\" ////////////////////////////////////////////////////////////////////////// +.SH SYNOPSIS +.\" ////////////////////////////////////////////////////////////////////////// +.nf +.B #include +.sp +.BI "int seccomp_notify_alloc(struct seccomp_notif **" req ", struct seccomp_notif_resp **" resp ")" +.BI "void seccomp_notify_free(struct seccomp_notif *" req ", struct seccomp_notif_resp *" resp ")" +.BI "int seccomp_notify_receive(int " fd ", struct seccomp_notif *" req ")" +.BI "int seccomp_notify_respond(int " fd ", struct seccomp_notif_resp *" resp ")" +.BI "int seccomp_notify_id_valid(int " fd ", uint64_t " id ")" +.BI "int seccomp_notify_fd(const scmp_filter_ctx " ctx ")" +.sp +Link with \fI\-lseccomp\fP. +.fi +.\" ////////////////////////////////////////////////////////////////////////// +.SH DESCRIPTION +.\" ////////////////////////////////////////////////////////////////////////// +.P +The +.BR seccomp_notify_alloc () +function dynamically allocates enough memory for a seccomp notification and +response. Note that one should always use these functions and not depend on the +structure sizes in headers, since the size can vary depending on the kernel +version. This function takes care to ask the kernel how big each structure +should be, and allocates the right amount of memory. The +.BR seccomp_notify_free () +function frees memory allocated by +.BR seccomp_notify_alloc (). +.P +The +.BR seccomp_notify_receive () +function receives a notification from a seccomp notify fd (obtained from +.BR seccomp_notify_fd ()). +.P +The +.BR seccomp_notify_respond () +function sends a response to a particular notification. The id field should be +the same as the id from the request, so that the kernel knows which request +this response corresponds to. +.P +The +.BR seccomp_notify_id_valid () +function checks to see if the syscall from a particular notification request is +still valid, i.e. if the task is still alive. See NOTES below for details on +race conditions. +.P +The +.BR seccomp_notify_fd () +returns the notification fd of a filter after it has been loaded. +.\" ////////////////////////////////////////////////////////////////////////// +.SH RETURN VALUE +.\" ////////////////////////////////////////////////////////////////////////// +The +.BR seccomp_notify_fd () +returns the notification fd of the loaded filter, -1 if a notification fd has +not yet been created, and -EINVAL if the filter context is invalid. +.P +The +.BR seccomp_notify_id_valid () +returns 0 if the id is valid, and -ENOENT if it is not. +.P +The +.BR seccomp_notify_alloc (), +.BR seccomp_notify_receive (), +and +.BR seccomp_notify_respond () +functions return zero on success, or one of the following error codes on +failure: +.TP +.B -ECANCELED +There was a system failure beyond the control of the library, check the +\fIerrno\fP value for more information. +.TP +.B -EFAULT +Internal libseccomp failure. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. +.TP +.B -EOPNOTSUPP +The library doesn't support the particular operation. +.\" ////////////////////////////////////////////////////////////////////////// +.SH NOTES +.\" ////////////////////////////////////////////////////////////////////////// +.P +Care should be taken to avoid two different time of check/time of use errors. +First, after opening any resources relevant to the pid for a notification (e.g. +/proc/pid/mem for reading tracee memory to make policy decisions), applications +should call +.BR seccomp_notify_id_valid () +to make sure that the resources the application has opened correspond to the +right pid, i.e. that the pid didn't die and a different task take its place. +.P +Second, the classic time of check/time of use issue with seccomp memory should +also be avoided: applications should copy any memory they wish to use to make +decisions from the tracee into its own address space before applying any policy +decisions, since a multi-threaded tracee may edit the memory at any time, +including after it's used to make a policy decision. +.P +A complete example of how to avoid these two races is available in the Linux +Kernel source tree at +.BR /samples/seccomp/user-trap.c. +.\" ////////////////////////////////////////////////////////////////////////// +.SH AUTHOR +.\" ////////////////////////////////////////////////////////////////////////// +Tycho Andersen +.\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_fd.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_fd.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_fd.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_fd.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_free.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_free.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_free.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_free.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_id_valid.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_id_valid.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_id_valid.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_id_valid.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_receive.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_receive.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_receive.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_receive.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_notify_respond.3 libseccomp-2.5.1/doc/man/man3/seccomp_notify_respond.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_notify_respond.3 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/doc/man/man3/seccomp_notify_respond.3 2020-11-17 08:34:38.778027347 +1030 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_rule_add.3 libseccomp-2.5.1/doc/man/man3/seccomp_rule_add.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_rule_add.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_rule_add.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_rule_add" 3 "17 February 2019" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_rule_add" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -87,6 +87,17 @@ The newly added filter rule does not take effect until the entire filter is loaded into the kernel using .BR seccomp_load (3). +When adding rules to a filter, it is important to consider the impact of +previously loaded filters; see the +.BR seccomp_load (3) +documentation for more information. +.P +All of the filter rules supplied by the calling application are combined into +a union, with additional logic to eliminate redundant syscall filters. For +example, if a rule is added which allows a given syscall with a specific set of +argument values and later a rule is added which allows the same syscall +regardless the argument values then the first, more specific rule, is +effectively dropped from the filter by the second more generic rule. .P The .BR SCMP_CMP (), @@ -120,6 +131,18 @@ help eliminate problems caused by an unwanted sign extension of negative datum values. .P +If syscall argument comparisons are included in the filter rule, all of the +comparisons must be true for the rule to match. +.P +When adding syscall argument comparisons to the filter it is important to +remember that while it is possible to have multiple comparisons in a single +rule, you can only compare each argument once in a single rule. In other words, +you can not have multiple comparisons of the 3rd syscall argument in a single +rule. +.P +In a filter containing multiple architectures, it is an error to add a filter +rule for a syscall that does not exist in all of the filter's architectures. +.P While it is possible to specify the .I syscall value directly using the standard @@ -127,7 +150,10 @@ values, in order to ensure proper operation across multiple architectures it is highly recommended to use the .BR SCMP_SYS () -macro instead. See the EXAMPLES section below. +macro instead. See the EXAMPLES section below. It is also important to +remember that regardless of the architectures present in the filter, the +syscall numbers used in filter rules are interpreted in the context of the +native architecture. .P Starting with Linux v4.8, there may be a need to create a rule with a syscall value of -1 to allow tracing programs to skip a syscall invocation; in order @@ -183,6 +209,22 @@ .B SCMP_ACT_ALLOW The seccomp filter will have no effect on the thread calling the syscall if it matches the filter rule. +.TP +.B SCMP_ACT_NOTIFY +A monitoring process will be notified when a process running the seccomp +filter calls a syscall that matches the filter rule. The process that invokes +the syscall waits in the kernel until the monitoring process has responded via +.B seccomp_notify_respond(3) +\&. + +When a filter utilizing +.B SCMP_ACT_NOTIFY +is loaded into the kernel, the kernel generates a notification fd that must be +used to communicate between the monitoring process and the process(es) being +filtered. See +.B seccomp_notif_fd(3) +for more information. + .P Valid comparison .I op @@ -259,12 +301,47 @@ .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// The +.BR SCMP_SYS () +macro returns a value suitable for use as the +.I syscall +value in the +.BR seccomp_rule_add* () +functions. In a similar manner, the +.BR SCMP_CMP () +and +.BR SCMP_A* () +macros return values suitable for use as argument comparisons in the +.BR seccomp_rule_add () +and +.BR seccomp_rule_add_exact () +functions. +.P +The .BR seccomp_rule_add (), .BR seccomp_rule_add_array (), .BR seccomp_rule_add_exact (), and .BR seccomp_rule_add_exact_array () -functions return zero on success, negative errno values on failure. +functions return zero on success or one of the following error codes on +failure: +.TP +.B -EDOM +Architecture specific failure. +.TP +.B -EEXIST +The rule already exists. +.TP +.B -EFAULT +Internal libseccomp failure. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. +.TP +.B -EOPNOTSUPP +The library doesn't support the particular operation. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/doc/man/man3/seccomp_syscall_priority.3 libseccomp-2.5.1/doc/man/man3/seccomp_syscall_priority.3 --- libseccomp-2.4.3/doc/man/man3/seccomp_syscall_priority.3 2020-03-03 02:13:34.186033117 +1030 +++ libseccomp-2.5.1/doc/man/man3/seccomp_syscall_priority.3 2020-11-17 08:34:38.778027347 +1030 @@ -1,4 +1,4 @@ -.TH "seccomp_syscall_priority" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation" +.TH "seccomp_syscall_priority" 3 "30 May 2020" "paul@paul-moore.com" "libseccomp Documentation" .\" ////////////////////////////////////////////////////////////////////////// .SH NAME .\" ////////////////////////////////////////////////////////////////////////// @@ -53,13 +53,28 @@ .SH RETURN VALUE .\" ////////////////////////////////////////////////////////////////////////// The -.BR seccomp_syscall_priority () -function returns zero on success, negative errno values on failure. The .BR SCMP_SYS () macro returns a value suitable for use as the .I syscall value in .BR seccomp_syscall_priority (). +.P +The +.BR seccomp_syscall_priority () +function returns zero on success or one of the following error codes on +failure: +.TP +.B -EDOM +Architecture specific failure. +.TP +.B -EFAULT +Internal libseccomp failure. +.TP +.B -EINVAL +Invalid input, either the context or architecture token is invalid. +.TP +.B -ENOMEM +The library was unable to allocate enough memory. .\" ////////////////////////////////////////////////////////////////////////// .SH EXAMPLES .\" ////////////////////////////////////////////////////////////////////////// diff -Nru libseccomp-2.4.3/include/Makefile.in libseccomp-2.5.1/include/Makefile.in --- libseccomp-2.4.3/include/Makefile.in 2020-03-03 04:15:53.015766325 +1030 +++ libseccomp-2.5.1/include/Makefile.in 2020-11-17 10:17:44.813797537 +1030 @@ -225,6 +225,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -291,13 +292,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ diff -Nru libseccomp-2.4.3/include/seccomp-syscalls.h libseccomp-2.5.1/include/seccomp-syscalls.h --- libseccomp-2.4.3/include/seccomp-syscalls.h 2020-03-03 02:49:57.855374588 +1030 +++ libseccomp-2.5.1/include/seccomp-syscalls.h 2020-11-17 08:34:59.763209755 +1030 @@ -273,6 +273,8 @@ #define __PNR_timerfd_settime64 -10239 #define __PNR_utimensat_time64 -10240 #define __PNR_ppoll -10241 +#define __PNR_renameat -10242 +#define __PNR_riscv_flush_icache -10243 /* * libseccomp syscall definitions @@ -1494,7 +1496,11 @@ #define __SNR_rename __PNR_rename #endif +#ifdef __NR_renameat #define __SNR_renameat __NR_renameat +#else +#define __SNR_renameat __PNR_renameat +#endif #define __SNR_renameat2 __NR_renameat2 @@ -1502,6 +1508,12 @@ #define __SNR_restart_syscall __NR_restart_syscall +#ifdef __NR_riscv_flush_icache +#define __SNR_riscv_flush_icache __NR_riscv_flush_icache +#else +#define __SNR_riscv_flush_icache __PNR_riscv_flush_icache +#endif + #ifdef __NR_rmdir #define __SNR_rmdir __NR_rmdir #else diff -Nru libseccomp-2.4.3/include/seccomp.h libseccomp-2.5.1/include/seccomp.h --- libseccomp-2.4.3/include/seccomp.h 2020-03-03 04:15:58.549743128 +1030 +++ libseccomp-2.5.1/include/seccomp.h 2020-11-17 10:17:49.885841627 +1030 @@ -27,6 +27,8 @@ #include #include #include +#include +#include #ifdef __cplusplus extern "C" { @@ -37,8 +39,8 @@ */ #define SCMP_VER_MAJOR 2 -#define SCMP_VER_MINOR 4 -#define SCMP_VER_MICRO 3 +#define SCMP_VER_MINOR 5 +#define SCMP_VER_MICRO 1 struct scmp_version { unsigned int major; @@ -66,6 +68,15 @@ SCMP_FLTATR_CTL_TSYNC = 4, /**< sync threads on filter load */ SCMP_FLTATR_API_TSKIP = 5, /**< allow rules with a -1 syscall */ SCMP_FLTATR_CTL_LOG = 6, /**< log not-allowed actions */ + SCMP_FLTATR_CTL_SSB = 7, /**< disable SSB mitigation */ + SCMP_FLTATR_CTL_OPTIMIZE = 8, /**< filter optimization level: + * 0 - currently unused + * 1 - rules weighted by priority and + * complexity (DEFAULT) + * 2 - binary tree sorted by syscall + * number + */ + SCMP_FLTATR_API_SYSRAWRC = 9, /**< return the system return codes */ _SCMP_FLTATR_MAX, }; @@ -194,6 +205,18 @@ #define SCMP_ARCH_PARISC64 AUDIT_ARCH_PARISC64 /** + * The RISC-V architecture tokens + */ +/* RISC-V support for audit was merged in 5.0-rc1 */ +#ifndef AUDIT_ARCH_RISCV64 +#ifndef EM_RISCV +#define EM_RISCV 243 +#endif /* EM_RISCV */ +#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#endif /* AUDIT_ARCH_RISCV64 */ +#define SCMP_ARCH_RISCV64 AUDIT_ARCH_RISCV64 + +/** * Convert a syscall name into the associated syscall number * @param x the syscall name */ @@ -320,6 +343,10 @@ */ #define SCMP_ACT_TRAP 0x00030000U /** + * Notifies userspace + */ +#define SCMP_ACT_NOTIFY 0x7fc00000U +/** * Return the specified error code */ #define SCMP_ACT_ERRNO(x) (0x00050000U | ((x) & 0x0000ffffU)) @@ -336,6 +363,25 @@ */ #define SCMP_ACT_ALLOW 0x7fff0000U +/* SECCOMP_RET_USER_NOTIF was added in kernel v5.0. */ +#ifndef SECCOMP_RET_USER_NOTIF +#define SECCOMP_RET_USER_NOTIF 0x7fc00000U + +struct seccomp_notif { + __u64 id; + __u32 pid; + __u32 flags; + struct seccomp_data data; +}; + +struct seccomp_notif_resp { + __u64 id; + __s64 val; + __s32 error; + __u32 flags; +}; +#endif + /* * functions */ @@ -368,6 +414,9 @@ * 3 : support for the SCMP_FLTATR_CTL_LOG filter attribute * support for the SCMP_ACT_LOG action * support for the SCMP_ACT_KILL_PROCESS action + * 4 : support for the SCMP_FLTATR_CTL_SSB filter attrbute + * 5 : support for the SCMP_ACT_NOTIFY action and notify APIs + * 6 : support the simultaneous use of SCMP_FLTATR_CTL_TSYNC and notify APIs * */ unsigned int seccomp_api_get(void); @@ -673,6 +722,73 @@ const struct scmp_arg_cmp *arg_array); /** + * Allocate a pair of notification request/response structures + * @param req the request location + * @param resp the response location + * + * This function allocates a pair of request/response structure by computing + * the correct sized based on the currently running kernel. It returns zero on + * success, and negative values on failure. + * + */ +int seccomp_notify_alloc(struct seccomp_notif **req, + struct seccomp_notif_resp **resp); + +/** + * Free a pair of notification request/response structures. + * @param req the request location + * @param resp the response location + */ +void seccomp_notify_free(struct seccomp_notif *req, + struct seccomp_notif_resp *resp); + +/** + * Receive a notification from a seccomp notification fd + * @param fd the notification fd + * @param req the request buffer to save into + * + * Blocks waiting for a notification on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int seccomp_notify_receive(int fd, struct seccomp_notif *req); + +/** + * Send a notification response to a seccomp notification fd + * @param fd the notification fd + * @param resp the response buffer to use + * + * Sends a notification response on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int seccomp_notify_respond(int fd, struct seccomp_notif_resp *resp); + +/** + * Check if a notification id is still valid + * @param fd the notification fd + * @param id the id to test + * + * Checks to see if a notification id is still valid. Returns 0 on success, and + * negative values on failure. + * + */ +int seccomp_notify_id_valid(int fd, uint64_t id); + +/** + * Return the notification fd from a filter that has already been loaded + * @param ctx the filter context + * + * This returns the listener fd that was generated when the seccomp policy was + * loaded. This is only valid after seccomp_load() with a filter that makes + * use of SCMP_ACT_NOTIFY. + * + */ +int seccomp_notify_fd(const scmp_filter_ctx ctx); + +/** * Generate seccomp Pseudo Filter Code (PFC) and export it to a file * @param ctx the filter context * @param fd the destination fd diff -Nru libseccomp-2.4.3/include/seccomp.h.in libseccomp-2.5.1/include/seccomp.h.in --- libseccomp-2.4.3/include/seccomp.h.in 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/include/seccomp.h.in 2020-11-17 08:34:59.763209755 +1030 @@ -27,6 +27,8 @@ #include #include #include +#include +#include #ifdef __cplusplus extern "C" { @@ -66,6 +68,15 @@ SCMP_FLTATR_CTL_TSYNC = 4, /**< sync threads on filter load */ SCMP_FLTATR_API_TSKIP = 5, /**< allow rules with a -1 syscall */ SCMP_FLTATR_CTL_LOG = 6, /**< log not-allowed actions */ + SCMP_FLTATR_CTL_SSB = 7, /**< disable SSB mitigation */ + SCMP_FLTATR_CTL_OPTIMIZE = 8, /**< filter optimization level: + * 0 - currently unused + * 1 - rules weighted by priority and + * complexity (DEFAULT) + * 2 - binary tree sorted by syscall + * number + */ + SCMP_FLTATR_API_SYSRAWRC = 9, /**< return the system return codes */ _SCMP_FLTATR_MAX, }; @@ -194,6 +205,18 @@ #define SCMP_ARCH_PARISC64 AUDIT_ARCH_PARISC64 /** + * The RISC-V architecture tokens + */ +/* RISC-V support for audit was merged in 5.0-rc1 */ +#ifndef AUDIT_ARCH_RISCV64 +#ifndef EM_RISCV +#define EM_RISCV 243 +#endif /* EM_RISCV */ +#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#endif /* AUDIT_ARCH_RISCV64 */ +#define SCMP_ARCH_RISCV64 AUDIT_ARCH_RISCV64 + +/** * Convert a syscall name into the associated syscall number * @param x the syscall name */ @@ -320,6 +343,10 @@ */ #define SCMP_ACT_TRAP 0x00030000U /** + * Notifies userspace + */ +#define SCMP_ACT_NOTIFY 0x7fc00000U +/** * Return the specified error code */ #define SCMP_ACT_ERRNO(x) (0x00050000U | ((x) & 0x0000ffffU)) @@ -336,6 +363,25 @@ */ #define SCMP_ACT_ALLOW 0x7fff0000U +/* SECCOMP_RET_USER_NOTIF was added in kernel v5.0. */ +#ifndef SECCOMP_RET_USER_NOTIF +#define SECCOMP_RET_USER_NOTIF 0x7fc00000U + +struct seccomp_notif { + __u64 id; + __u32 pid; + __u32 flags; + struct seccomp_data data; +}; + +struct seccomp_notif_resp { + __u64 id; + __s64 val; + __s32 error; + __u32 flags; +}; +#endif + /* * functions */ @@ -368,6 +414,9 @@ * 3 : support for the SCMP_FLTATR_CTL_LOG filter attribute * support for the SCMP_ACT_LOG action * support for the SCMP_ACT_KILL_PROCESS action + * 4 : support for the SCMP_FLTATR_CTL_SSB filter attrbute + * 5 : support for the SCMP_ACT_NOTIFY action and notify APIs + * 6 : support the simultaneous use of SCMP_FLTATR_CTL_TSYNC and notify APIs * */ unsigned int seccomp_api_get(void); @@ -673,6 +722,73 @@ const struct scmp_arg_cmp *arg_array); /** + * Allocate a pair of notification request/response structures + * @param req the request location + * @param resp the response location + * + * This function allocates a pair of request/response structure by computing + * the correct sized based on the currently running kernel. It returns zero on + * success, and negative values on failure. + * + */ +int seccomp_notify_alloc(struct seccomp_notif **req, + struct seccomp_notif_resp **resp); + +/** + * Free a pair of notification request/response structures. + * @param req the request location + * @param resp the response location + */ +void seccomp_notify_free(struct seccomp_notif *req, + struct seccomp_notif_resp *resp); + +/** + * Receive a notification from a seccomp notification fd + * @param fd the notification fd + * @param req the request buffer to save into + * + * Blocks waiting for a notification on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int seccomp_notify_receive(int fd, struct seccomp_notif *req); + +/** + * Send a notification response to a seccomp notification fd + * @param fd the notification fd + * @param resp the response buffer to use + * + * Sends a notification response on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int seccomp_notify_respond(int fd, struct seccomp_notif_resp *resp); + +/** + * Check if a notification id is still valid + * @param fd the notification fd + * @param id the id to test + * + * Checks to see if a notification id is still valid. Returns 0 on success, and + * negative values on failure. + * + */ +int seccomp_notify_id_valid(int fd, uint64_t id); + +/** + * Return the notification fd from a filter that has already been loaded + * @param ctx the filter context + * + * This returns the listener fd that was generated when the seccomp policy was + * loaded. This is only valid after seccomp_load() with a filter that makes + * use of SCMP_ACT_NOTIFY. + * + */ +int seccomp_notify_fd(const scmp_filter_ctx ctx); + +/** * Generate seccomp Pseudo Filter Code (PFC) and export it to a file * @param ctx the filter context * @param fd the destination fd diff -Nru libseccomp-2.4.3/src/Makefile.am libseccomp-2.5.1/src/Makefile.am --- libseccomp-2.4.3/src/Makefile.am 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/src/Makefile.am 2020-11-17 08:34:38.779027356 +1030 @@ -31,21 +31,26 @@ hash.h hash.c \ db.h db.c \ arch.c arch.h \ - arch-x86.h arch-x86.c arch-x86-syscalls.c \ - arch-x86_64.h arch-x86_64.c arch-x86_64-syscalls.c \ - arch-x32.h arch-x32.c arch-x32-syscalls.c \ - arch-arm.h arch-arm.c arch-arm-syscalls.c \ - arch-aarch64.h arch-aarch64.c arch-aarch64-syscalls.c \ - arch-mips.h arch-mips.c arch-mips-syscalls.c \ - arch-mips64.h arch-mips64.c arch-mips64-syscalls.c \ - arch-mips64n32.h arch-mips64n32.c arch-mips64n32-syscalls.c \ - arch-parisc.h arch-parisc.c arch-parisc64.c arch-parisc-syscalls.c \ - arch-ppc.h arch-ppc.c arch-ppc-syscalls.c \ - arch-ppc64.h arch-ppc64.c arch-ppc64-syscalls.c \ - arch-s390.h arch-s390.c arch-s390-syscalls.c \ - arch-s390x.h arch-s390x.c arch-s390x-syscalls.c - -EXTRA_DIST = arch-syscall-validate + arch-x86.h arch-x86.c \ + arch-x86_64.h arch-x86_64.c \ + arch-x32.h arch-x32.c \ + arch-arm.h arch-arm.c \ + arch-aarch64.h arch-aarch64.c \ + arch-mips.h arch-mips.c \ + arch-mips64.h arch-mips64.c \ + arch-mips64n32.h arch-mips64n32.c \ + arch-parisc.h arch-parisc.c \ + arch-parisc64.h arch-parisc64.c \ + arch-ppc.h arch-ppc.c \ + arch-ppc64.h arch-ppc64.c \ + arch-riscv64.h arch-riscv64.c \ + arch-s390.h arch-s390.c \ + arch-s390x.h arch-s390x.c \ + syscalls.h syscalls.c syscalls.perf.c + +EXTRA_DIST = \ + arch-syscall-validate arch-gperf-generate \ + syscalls.csv syscalls.perf.template TESTS = arch-syscall-check @@ -56,16 +61,25 @@ arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL} arch_syscall_check_SOURCES = arch-syscall-check.c ${SOURCES_ALL} -arch_syscall_check_CFLAGS = ${CODE_COVERAGE_CFLAGS} +arch_syscall_check_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS} arch_syscall_check_LDFLAGS = ${CODE_COVERAGE_LDFLAGS} libseccomp_la_SOURCES = ${SOURCES_ALL} -libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS} \ - -I${top_builddir}/include +libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS} libseccomp_la_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS} ${CFLAGS} \ -fPIC -DPIC -fvisibility=hidden libseccomp_la_LDFLAGS = ${AM_LDFLAGS} ${CODE_COVERAGE_LDFLAGS} ${LDFLAGS} \ -version-number ${VERSION_MAJOR}:${VERSION_MINOR}:${VERSION_MICRO} +EXTRA_DIST += syscalls.perf.c syscalls.perf +CLEANFILES = syscalls.perf.c syscalls.perf + +syscalls.perf: syscalls.csv syscalls.perf.template + ${AM_V_GEN} ${srcdir}/arch-gperf-generate \ + ${srcdir}/syscalls.csv ${srcdir}/syscalls.perf.template + +syscalls.perf.c: syscalls.perf + ${GPERF} -m 100 --null-strings --pic -tCEG -T -S1 $< > $@ + check-build: ${MAKE} ${AM_MAKEFLAGS} ${check_PROGRAMS} diff -Nru libseccomp-2.4.3/src/Makefile.in libseccomp-2.5.1/src/Makefile.in --- libseccomp-2.4.3/src/Makefile.in 2020-03-03 04:15:53.110765927 +1030 +++ libseccomp-2.5.1/src/Makefile.in 2020-11-17 10:17:44.889798198 +1030 @@ -157,26 +157,15 @@ libseccomp_la-helper.lo libseccomp_la-gen_pfc.lo \ libseccomp_la-gen_bpf.lo libseccomp_la-hash.lo \ libseccomp_la-db.lo libseccomp_la-arch.lo \ - libseccomp_la-arch-x86.lo libseccomp_la-arch-x86-syscalls.lo \ - libseccomp_la-arch-x86_64.lo \ - libseccomp_la-arch-x86_64-syscalls.lo \ - libseccomp_la-arch-x32.lo libseccomp_la-arch-x32-syscalls.lo \ - libseccomp_la-arch-arm.lo libseccomp_la-arch-arm-syscalls.lo \ - libseccomp_la-arch-aarch64.lo \ - libseccomp_la-arch-aarch64-syscalls.lo \ - libseccomp_la-arch-mips.lo libseccomp_la-arch-mips-syscalls.lo \ - libseccomp_la-arch-mips64.lo \ - libseccomp_la-arch-mips64-syscalls.lo \ - libseccomp_la-arch-mips64n32.lo \ - libseccomp_la-arch-mips64n32-syscalls.lo \ + libseccomp_la-arch-x86.lo libseccomp_la-arch-x86_64.lo \ + libseccomp_la-arch-x32.lo libseccomp_la-arch-arm.lo \ + libseccomp_la-arch-aarch64.lo libseccomp_la-arch-mips.lo \ + libseccomp_la-arch-mips64.lo libseccomp_la-arch-mips64n32.lo \ libseccomp_la-arch-parisc.lo libseccomp_la-arch-parisc64.lo \ - libseccomp_la-arch-parisc-syscalls.lo \ - libseccomp_la-arch-ppc.lo libseccomp_la-arch-ppc-syscalls.lo \ - libseccomp_la-arch-ppc64.lo \ - libseccomp_la-arch-ppc64-syscalls.lo \ - libseccomp_la-arch-s390.lo libseccomp_la-arch-s390-syscalls.lo \ - libseccomp_la-arch-s390x.lo \ - libseccomp_la-arch-s390x-syscalls.lo + libseccomp_la-arch-ppc.lo libseccomp_la-arch-ppc64.lo \ + libseccomp_la-arch-riscv64.lo libseccomp_la-arch-s390.lo \ + libseccomp_la-arch-s390x.lo libseccomp_la-syscalls.lo \ + libseccomp_la-syscalls.perf.lo am_libseccomp_la_OBJECTS = $(am__objects_1) libseccomp_la_OBJECTS = $(am_libseccomp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -195,32 +184,22 @@ arch_syscall_check-db.$(OBJEXT) \ arch_syscall_check-arch.$(OBJEXT) \ arch_syscall_check-arch-x86.$(OBJEXT) \ - arch_syscall_check-arch-x86-syscalls.$(OBJEXT) \ arch_syscall_check-arch-x86_64.$(OBJEXT) \ - arch_syscall_check-arch-x86_64-syscalls.$(OBJEXT) \ arch_syscall_check-arch-x32.$(OBJEXT) \ - arch_syscall_check-arch-x32-syscalls.$(OBJEXT) \ arch_syscall_check-arch-arm.$(OBJEXT) \ - arch_syscall_check-arch-arm-syscalls.$(OBJEXT) \ arch_syscall_check-arch-aarch64.$(OBJEXT) \ - arch_syscall_check-arch-aarch64-syscalls.$(OBJEXT) \ arch_syscall_check-arch-mips.$(OBJEXT) \ - arch_syscall_check-arch-mips-syscalls.$(OBJEXT) \ arch_syscall_check-arch-mips64.$(OBJEXT) \ - arch_syscall_check-arch-mips64-syscalls.$(OBJEXT) \ arch_syscall_check-arch-mips64n32.$(OBJEXT) \ - arch_syscall_check-arch-mips64n32-syscalls.$(OBJEXT) \ arch_syscall_check-arch-parisc.$(OBJEXT) \ arch_syscall_check-arch-parisc64.$(OBJEXT) \ - arch_syscall_check-arch-parisc-syscalls.$(OBJEXT) \ arch_syscall_check-arch-ppc.$(OBJEXT) \ - arch_syscall_check-arch-ppc-syscalls.$(OBJEXT) \ arch_syscall_check-arch-ppc64.$(OBJEXT) \ - arch_syscall_check-arch-ppc64-syscalls.$(OBJEXT) \ + arch_syscall_check-arch-riscv64.$(OBJEXT) \ arch_syscall_check-arch-s390.$(OBJEXT) \ - arch_syscall_check-arch-s390-syscalls.$(OBJEXT) \ arch_syscall_check-arch-s390x.$(OBJEXT) \ - arch_syscall_check-arch-s390x-syscalls.$(OBJEXT) + arch_syscall_check-syscalls.$(OBJEXT) \ + arch_syscall_check-syscalls.perf.$(OBJEXT) am_arch_syscall_check_OBJECTS = \ arch_syscall_check-arch-syscall-check.$(OBJEXT) \ $(am__objects_2) @@ -233,19 +212,13 @@ am__objects_3 = api.$(OBJEXT) system.$(OBJEXT) helper.$(OBJEXT) \ gen_pfc.$(OBJEXT) gen_bpf.$(OBJEXT) hash.$(OBJEXT) \ db.$(OBJEXT) arch.$(OBJEXT) arch-x86.$(OBJEXT) \ - arch-x86-syscalls.$(OBJEXT) arch-x86_64.$(OBJEXT) \ - arch-x86_64-syscalls.$(OBJEXT) arch-x32.$(OBJEXT) \ - arch-x32-syscalls.$(OBJEXT) arch-arm.$(OBJEXT) \ - arch-arm-syscalls.$(OBJEXT) arch-aarch64.$(OBJEXT) \ - arch-aarch64-syscalls.$(OBJEXT) arch-mips.$(OBJEXT) \ - arch-mips-syscalls.$(OBJEXT) arch-mips64.$(OBJEXT) \ - arch-mips64-syscalls.$(OBJEXT) arch-mips64n32.$(OBJEXT) \ - arch-mips64n32-syscalls.$(OBJEXT) arch-parisc.$(OBJEXT) \ - arch-parisc64.$(OBJEXT) arch-parisc-syscalls.$(OBJEXT) \ - arch-ppc.$(OBJEXT) arch-ppc-syscalls.$(OBJEXT) \ - arch-ppc64.$(OBJEXT) arch-ppc64-syscalls.$(OBJEXT) \ - arch-s390.$(OBJEXT) arch-s390-syscalls.$(OBJEXT) \ - arch-s390x.$(OBJEXT) arch-s390x-syscalls.$(OBJEXT) + arch-x86_64.$(OBJEXT) arch-x32.$(OBJEXT) arch-arm.$(OBJEXT) \ + arch-aarch64.$(OBJEXT) arch-mips.$(OBJEXT) \ + arch-mips64.$(OBJEXT) arch-mips64n32.$(OBJEXT) \ + arch-parisc.$(OBJEXT) arch-parisc64.$(OBJEXT) \ + arch-ppc.$(OBJEXT) arch-ppc64.$(OBJEXT) arch-riscv64.$(OBJEXT) \ + arch-s390.$(OBJEXT) arch-s390x.$(OBJEXT) syscalls.$(OBJEXT) \ + syscalls.perf.$(OBJEXT) am_arch_syscall_dump_OBJECTS = arch-syscall-dump.$(OBJEXT) \ $(am__objects_3) arch_syscall_dump_OBJECTS = $(am_arch_syscall_dump_OBJECTS) @@ -265,51 +238,31 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/api.Po \ - ./$(DEPDIR)/arch-aarch64-syscalls.Po \ - ./$(DEPDIR)/arch-aarch64.Po ./$(DEPDIR)/arch-arm-syscalls.Po \ - ./$(DEPDIR)/arch-arm.Po ./$(DEPDIR)/arch-mips-syscalls.Po \ - ./$(DEPDIR)/arch-mips.Po ./$(DEPDIR)/arch-mips64-syscalls.Po \ - ./$(DEPDIR)/arch-mips64.Po \ - ./$(DEPDIR)/arch-mips64n32-syscalls.Po \ - ./$(DEPDIR)/arch-mips64n32.Po \ - ./$(DEPDIR)/arch-parisc-syscalls.Po ./$(DEPDIR)/arch-parisc.Po \ - ./$(DEPDIR)/arch-parisc64.Po ./$(DEPDIR)/arch-ppc-syscalls.Po \ - ./$(DEPDIR)/arch-ppc.Po ./$(DEPDIR)/arch-ppc64-syscalls.Po \ - ./$(DEPDIR)/arch-ppc64.Po ./$(DEPDIR)/arch-s390-syscalls.Po \ - ./$(DEPDIR)/arch-s390.Po ./$(DEPDIR)/arch-s390x-syscalls.Po \ +am__depfiles_remade = ./$(DEPDIR)/api.Po ./$(DEPDIR)/arch-aarch64.Po \ + ./$(DEPDIR)/arch-arm.Po ./$(DEPDIR)/arch-mips.Po \ + ./$(DEPDIR)/arch-mips64.Po ./$(DEPDIR)/arch-mips64n32.Po \ + ./$(DEPDIR)/arch-parisc.Po ./$(DEPDIR)/arch-parisc64.Po \ + ./$(DEPDIR)/arch-ppc.Po ./$(DEPDIR)/arch-ppc64.Po \ + ./$(DEPDIR)/arch-riscv64.Po ./$(DEPDIR)/arch-s390.Po \ ./$(DEPDIR)/arch-s390x.Po ./$(DEPDIR)/arch-syscall-dump.Po \ - ./$(DEPDIR)/arch-x32-syscalls.Po ./$(DEPDIR)/arch-x32.Po \ - ./$(DEPDIR)/arch-x86-syscalls.Po ./$(DEPDIR)/arch-x86.Po \ - ./$(DEPDIR)/arch-x86_64-syscalls.Po ./$(DEPDIR)/arch-x86_64.Po \ - ./$(DEPDIR)/arch.Po ./$(DEPDIR)/arch_syscall_check-api.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po \ + ./$(DEPDIR)/arch-x32.Po ./$(DEPDIR)/arch-x86.Po \ + ./$(DEPDIR)/arch-x86_64.Po ./$(DEPDIR)/arch.Po \ + ./$(DEPDIR)/arch_syscall_check-api.Po \ ./$(DEPDIR)/arch_syscall_check-arch-aarch64.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-arm.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-mips.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-mips64.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-mips64n32.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-parisc.Po \ ./$(DEPDIR)/arch_syscall_check-arch-parisc64.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-ppc.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-ppc64.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po \ + ./$(DEPDIR)/arch_syscall_check-arch-riscv64.Po \ ./$(DEPDIR)/arch_syscall_check-arch-s390.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-s390x.Po \ ./$(DEPDIR)/arch_syscall_check-arch-syscall-check.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-x32.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-x86.Po \ - ./$(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po \ ./$(DEPDIR)/arch_syscall_check-arch-x86_64.Po \ ./$(DEPDIR)/arch_syscall_check-arch.Po \ ./$(DEPDIR)/arch_syscall_check-db.Po \ @@ -317,36 +270,26 @@ ./$(DEPDIR)/arch_syscall_check-gen_pfc.Po \ ./$(DEPDIR)/arch_syscall_check-hash.Po \ ./$(DEPDIR)/arch_syscall_check-helper.Po \ + ./$(DEPDIR)/arch_syscall_check-syscalls.Po \ + ./$(DEPDIR)/arch_syscall_check-syscalls.perf.Po \ ./$(DEPDIR)/arch_syscall_check-system.Po ./$(DEPDIR)/db.Po \ ./$(DEPDIR)/gen_bpf.Po ./$(DEPDIR)/gen_pfc.Po \ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/helper.Po \ ./$(DEPDIR)/libseccomp_la-api.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-aarch64.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-arm-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-arm.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-mips-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-mips.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-mips64.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-mips64n32.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-parisc.Plo \ ./$(DEPDIR)/libseccomp_la-arch-parisc64.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-ppc.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-ppc64.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-s390-syscalls.Plo \ + ./$(DEPDIR)/libseccomp_la-arch-riscv64.Plo \ ./$(DEPDIR)/libseccomp_la-arch-s390.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-s390x.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-x32-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-x32.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-x86-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-x86.Plo \ - ./$(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Plo \ ./$(DEPDIR)/libseccomp_la-arch-x86_64.Plo \ ./$(DEPDIR)/libseccomp_la-arch.Plo \ ./$(DEPDIR)/libseccomp_la-db.Plo \ @@ -354,7 +297,10 @@ ./$(DEPDIR)/libseccomp_la-gen_pfc.Plo \ ./$(DEPDIR)/libseccomp_la-hash.Plo \ ./$(DEPDIR)/libseccomp_la-helper.Plo \ - ./$(DEPDIR)/libseccomp_la-system.Plo ./$(DEPDIR)/system.Po + ./$(DEPDIR)/libseccomp_la-syscalls.Plo \ + ./$(DEPDIR)/libseccomp_la-syscalls.perf.Plo \ + ./$(DEPDIR)/libseccomp_la-system.Plo ./$(DEPDIR)/syscalls.Po \ + ./$(DEPDIR)/syscalls.perf.Po ./$(DEPDIR)/system.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -505,6 +451,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -571,13 +518,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -618,36 +565,39 @@ hash.h hash.c \ db.h db.c \ arch.c arch.h \ - arch-x86.h arch-x86.c arch-x86-syscalls.c \ - arch-x86_64.h arch-x86_64.c arch-x86_64-syscalls.c \ - arch-x32.h arch-x32.c arch-x32-syscalls.c \ - arch-arm.h arch-arm.c arch-arm-syscalls.c \ - arch-aarch64.h arch-aarch64.c arch-aarch64-syscalls.c \ - arch-mips.h arch-mips.c arch-mips-syscalls.c \ - arch-mips64.h arch-mips64.c arch-mips64-syscalls.c \ - arch-mips64n32.h arch-mips64n32.c arch-mips64n32-syscalls.c \ - arch-parisc.h arch-parisc.c arch-parisc64.c arch-parisc-syscalls.c \ - arch-ppc.h arch-ppc.c arch-ppc-syscalls.c \ - arch-ppc64.h arch-ppc64.c arch-ppc64-syscalls.c \ - arch-s390.h arch-s390.c arch-s390-syscalls.c \ - arch-s390x.h arch-s390x.c arch-s390x-syscalls.c + arch-x86.h arch-x86.c \ + arch-x86_64.h arch-x86_64.c \ + arch-x32.h arch-x32.c \ + arch-arm.h arch-arm.c \ + arch-aarch64.h arch-aarch64.c \ + arch-mips.h arch-mips.c \ + arch-mips64.h arch-mips64.c \ + arch-mips64n32.h arch-mips64n32.c \ + arch-parisc.h arch-parisc.c \ + arch-parisc64.h arch-parisc64.c \ + arch-ppc.h arch-ppc.c \ + arch-ppc64.h arch-ppc64.c \ + arch-riscv64.h arch-riscv64.c \ + arch-s390.h arch-s390.c \ + arch-s390x.h arch-s390x.c \ + syscalls.h syscalls.c syscalls.perf.c -EXTRA_DIST = arch-syscall-validate +EXTRA_DIST = arch-syscall-validate arch-gperf-generate syscalls.csv \ + syscalls.perf.template syscalls.perf.c syscalls.perf lib_LTLIBRARIES = libseccomp.la arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL} arch_syscall_check_SOURCES = arch-syscall-check.c ${SOURCES_ALL} -arch_syscall_check_CFLAGS = ${CODE_COVERAGE_CFLAGS} +arch_syscall_check_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS} arch_syscall_check_LDFLAGS = ${CODE_COVERAGE_LDFLAGS} libseccomp_la_SOURCES = ${SOURCES_ALL} -libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS} \ - -I${top_builddir}/include - +libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS} libseccomp_la_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS} ${CFLAGS} \ -fPIC -DPIC -fvisibility=hidden libseccomp_la_LDFLAGS = ${AM_LDFLAGS} ${CODE_COVERAGE_LDFLAGS} ${LDFLAGS} \ -version-number ${VERSION_MAJOR}:${VERSION_MINOR}:${VERSION_MICRO} +CLEANFILES = syscalls.perf.c syscalls.perf all: all-recursive .SUFFIXES: @@ -744,63 +694,39 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/api.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-aarch64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-aarch64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-arm-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-arm.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips64n32-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips64n32.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-parisc-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-parisc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-parisc64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390-syscalls.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-riscv64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390x-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390x.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-syscall-dump.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x32-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x32.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x86-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x86.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x86_64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-x86_64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-api.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-aarch64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-arm.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-mips64n32.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-parisc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-parisc64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-ppc.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-ppc64.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-riscv64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-s390.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-s390x.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-syscall-check.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x32.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x86.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch-x86_64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-arch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-db.Po@am__quote@ # am--include-marker @@ -808,6 +734,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-gen_pfc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-helper.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-syscalls.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-syscalls.perf.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_syscall_check-system.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_bpf.Po@am__quote@ # am--include-marker @@ -815,32 +743,20 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-api.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-aarch64.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-arm-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-arm.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips64.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-mips64n32.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-parisc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-parisc64.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-ppc.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-ppc64.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-s390-syscalls.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-riscv64.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-s390.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-s390x.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x32-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x32.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x86-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x86.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch-x86_64.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-arch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-db.Plo@am__quote@ # am--include-marker @@ -848,7 +764,11 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-gen_pfc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-hash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-helper.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-syscalls.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-syscalls.perf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libseccomp_la-system.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syscalls.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syscalls.perf.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @@ -944,13 +864,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x86.lo `test -f 'arch-x86.c' || echo '$(srcdir)/'`arch-x86.c -libseccomp_la-arch-x86-syscalls.lo: arch-x86-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-x86-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-x86-syscalls.Tpo -c -o libseccomp_la-arch-x86-syscalls.lo `test -f 'arch-x86-syscalls.c' || echo '$(srcdir)/'`arch-x86-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-x86-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-x86-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86-syscalls.c' object='libseccomp_la-arch-x86-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x86-syscalls.lo `test -f 'arch-x86-syscalls.c' || echo '$(srcdir)/'`arch-x86-syscalls.c - libseccomp_la-arch-x86_64.lo: arch-x86_64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-x86_64.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-x86_64.Tpo -c -o libseccomp_la-arch-x86_64.lo `test -f 'arch-x86_64.c' || echo '$(srcdir)/'`arch-x86_64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-x86_64.Tpo $(DEPDIR)/libseccomp_la-arch-x86_64.Plo @@ -958,13 +871,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x86_64.lo `test -f 'arch-x86_64.c' || echo '$(srcdir)/'`arch-x86_64.c -libseccomp_la-arch-x86_64-syscalls.lo: arch-x86_64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-x86_64-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Tpo -c -o libseccomp_la-arch-x86_64-syscalls.lo `test -f 'arch-x86_64-syscalls.c' || echo '$(srcdir)/'`arch-x86_64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86_64-syscalls.c' object='libseccomp_la-arch-x86_64-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x86_64-syscalls.lo `test -f 'arch-x86_64-syscalls.c' || echo '$(srcdir)/'`arch-x86_64-syscalls.c - libseccomp_la-arch-x32.lo: arch-x32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-x32.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-x32.Tpo -c -o libseccomp_la-arch-x32.lo `test -f 'arch-x32.c' || echo '$(srcdir)/'`arch-x32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-x32.Tpo $(DEPDIR)/libseccomp_la-arch-x32.Plo @@ -972,13 +878,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x32.lo `test -f 'arch-x32.c' || echo '$(srcdir)/'`arch-x32.c -libseccomp_la-arch-x32-syscalls.lo: arch-x32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-x32-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-x32-syscalls.Tpo -c -o libseccomp_la-arch-x32-syscalls.lo `test -f 'arch-x32-syscalls.c' || echo '$(srcdir)/'`arch-x32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-x32-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-x32-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x32-syscalls.c' object='libseccomp_la-arch-x32-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-x32-syscalls.lo `test -f 'arch-x32-syscalls.c' || echo '$(srcdir)/'`arch-x32-syscalls.c - libseccomp_la-arch-arm.lo: arch-arm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-arm.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-arm.Tpo -c -o libseccomp_la-arch-arm.lo `test -f 'arch-arm.c' || echo '$(srcdir)/'`arch-arm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-arm.Tpo $(DEPDIR)/libseccomp_la-arch-arm.Plo @@ -986,13 +885,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-arm.lo `test -f 'arch-arm.c' || echo '$(srcdir)/'`arch-arm.c -libseccomp_la-arch-arm-syscalls.lo: arch-arm-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-arm-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-arm-syscalls.Tpo -c -o libseccomp_la-arch-arm-syscalls.lo `test -f 'arch-arm-syscalls.c' || echo '$(srcdir)/'`arch-arm-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-arm-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-arm-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-arm-syscalls.c' object='libseccomp_la-arch-arm-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-arm-syscalls.lo `test -f 'arch-arm-syscalls.c' || echo '$(srcdir)/'`arch-arm-syscalls.c - libseccomp_la-arch-aarch64.lo: arch-aarch64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-aarch64.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-aarch64.Tpo -c -o libseccomp_la-arch-aarch64.lo `test -f 'arch-aarch64.c' || echo '$(srcdir)/'`arch-aarch64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-aarch64.Tpo $(DEPDIR)/libseccomp_la-arch-aarch64.Plo @@ -1000,13 +892,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-aarch64.lo `test -f 'arch-aarch64.c' || echo '$(srcdir)/'`arch-aarch64.c -libseccomp_la-arch-aarch64-syscalls.lo: arch-aarch64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-aarch64-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Tpo -c -o libseccomp_la-arch-aarch64-syscalls.lo `test -f 'arch-aarch64-syscalls.c' || echo '$(srcdir)/'`arch-aarch64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-aarch64-syscalls.c' object='libseccomp_la-arch-aarch64-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-aarch64-syscalls.lo `test -f 'arch-aarch64-syscalls.c' || echo '$(srcdir)/'`arch-aarch64-syscalls.c - libseccomp_la-arch-mips.lo: arch-mips.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips.Tpo -c -o libseccomp_la-arch-mips.lo `test -f 'arch-mips.c' || echo '$(srcdir)/'`arch-mips.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips.Tpo $(DEPDIR)/libseccomp_la-arch-mips.Plo @@ -1014,13 +899,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips.lo `test -f 'arch-mips.c' || echo '$(srcdir)/'`arch-mips.c -libseccomp_la-arch-mips-syscalls.lo: arch-mips-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips-syscalls.Tpo -c -o libseccomp_la-arch-mips-syscalls.lo `test -f 'arch-mips-syscalls.c' || echo '$(srcdir)/'`arch-mips-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-mips-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips-syscalls.c' object='libseccomp_la-arch-mips-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips-syscalls.lo `test -f 'arch-mips-syscalls.c' || echo '$(srcdir)/'`arch-mips-syscalls.c - libseccomp_la-arch-mips64.lo: arch-mips64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips64.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips64.Tpo -c -o libseccomp_la-arch-mips64.lo `test -f 'arch-mips64.c' || echo '$(srcdir)/'`arch-mips64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips64.Tpo $(DEPDIR)/libseccomp_la-arch-mips64.Plo @@ -1028,13 +906,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips64.lo `test -f 'arch-mips64.c' || echo '$(srcdir)/'`arch-mips64.c -libseccomp_la-arch-mips64-syscalls.lo: arch-mips64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips64-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Tpo -c -o libseccomp_la-arch-mips64-syscalls.lo `test -f 'arch-mips64-syscalls.c' || echo '$(srcdir)/'`arch-mips64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64-syscalls.c' object='libseccomp_la-arch-mips64-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips64-syscalls.lo `test -f 'arch-mips64-syscalls.c' || echo '$(srcdir)/'`arch-mips64-syscalls.c - libseccomp_la-arch-mips64n32.lo: arch-mips64n32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips64n32.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips64n32.Tpo -c -o libseccomp_la-arch-mips64n32.lo `test -f 'arch-mips64n32.c' || echo '$(srcdir)/'`arch-mips64n32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips64n32.Tpo $(DEPDIR)/libseccomp_la-arch-mips64n32.Plo @@ -1042,13 +913,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips64n32.lo `test -f 'arch-mips64n32.c' || echo '$(srcdir)/'`arch-mips64n32.c -libseccomp_la-arch-mips64n32-syscalls.lo: arch-mips64n32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-mips64n32-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Tpo -c -o libseccomp_la-arch-mips64n32-syscalls.lo `test -f 'arch-mips64n32-syscalls.c' || echo '$(srcdir)/'`arch-mips64n32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64n32-syscalls.c' object='libseccomp_la-arch-mips64n32-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-mips64n32-syscalls.lo `test -f 'arch-mips64n32-syscalls.c' || echo '$(srcdir)/'`arch-mips64n32-syscalls.c - libseccomp_la-arch-parisc.lo: arch-parisc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-parisc.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-parisc.Tpo -c -o libseccomp_la-arch-parisc.lo `test -f 'arch-parisc.c' || echo '$(srcdir)/'`arch-parisc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-parisc.Tpo $(DEPDIR)/libseccomp_la-arch-parisc.Plo @@ -1063,13 +927,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-parisc64.lo `test -f 'arch-parisc64.c' || echo '$(srcdir)/'`arch-parisc64.c -libseccomp_la-arch-parisc-syscalls.lo: arch-parisc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-parisc-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Tpo -c -o libseccomp_la-arch-parisc-syscalls.lo `test -f 'arch-parisc-syscalls.c' || echo '$(srcdir)/'`arch-parisc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-parisc-syscalls.c' object='libseccomp_la-arch-parisc-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-parisc-syscalls.lo `test -f 'arch-parisc-syscalls.c' || echo '$(srcdir)/'`arch-parisc-syscalls.c - libseccomp_la-arch-ppc.lo: arch-ppc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-ppc.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-ppc.Tpo -c -o libseccomp_la-arch-ppc.lo `test -f 'arch-ppc.c' || echo '$(srcdir)/'`arch-ppc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-ppc.Tpo $(DEPDIR)/libseccomp_la-arch-ppc.Plo @@ -1077,13 +934,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-ppc.lo `test -f 'arch-ppc.c' || echo '$(srcdir)/'`arch-ppc.c -libseccomp_la-arch-ppc-syscalls.lo: arch-ppc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-ppc-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Tpo -c -o libseccomp_la-arch-ppc-syscalls.lo `test -f 'arch-ppc-syscalls.c' || echo '$(srcdir)/'`arch-ppc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc-syscalls.c' object='libseccomp_la-arch-ppc-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-ppc-syscalls.lo `test -f 'arch-ppc-syscalls.c' || echo '$(srcdir)/'`arch-ppc-syscalls.c - libseccomp_la-arch-ppc64.lo: arch-ppc64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-ppc64.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-ppc64.Tpo -c -o libseccomp_la-arch-ppc64.lo `test -f 'arch-ppc64.c' || echo '$(srcdir)/'`arch-ppc64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-ppc64.Tpo $(DEPDIR)/libseccomp_la-arch-ppc64.Plo @@ -1091,12 +941,12 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-ppc64.lo `test -f 'arch-ppc64.c' || echo '$(srcdir)/'`arch-ppc64.c -libseccomp_la-arch-ppc64-syscalls.lo: arch-ppc64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-ppc64-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Tpo -c -o libseccomp_la-arch-ppc64-syscalls.lo `test -f 'arch-ppc64-syscalls.c' || echo '$(srcdir)/'`arch-ppc64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc64-syscalls.c' object='libseccomp_la-arch-ppc64-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ +libseccomp_la-arch-riscv64.lo: arch-riscv64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-riscv64.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-riscv64.Tpo -c -o libseccomp_la-arch-riscv64.lo `test -f 'arch-riscv64.c' || echo '$(srcdir)/'`arch-riscv64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-riscv64.Tpo $(DEPDIR)/libseccomp_la-arch-riscv64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-riscv64.c' object='libseccomp_la-arch-riscv64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-ppc64-syscalls.lo `test -f 'arch-ppc64-syscalls.c' || echo '$(srcdir)/'`arch-ppc64-syscalls.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-riscv64.lo `test -f 'arch-riscv64.c' || echo '$(srcdir)/'`arch-riscv64.c libseccomp_la-arch-s390.lo: arch-s390.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-s390.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-s390.Tpo -c -o libseccomp_la-arch-s390.lo `test -f 'arch-s390.c' || echo '$(srcdir)/'`arch-s390.c @@ -1105,13 +955,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-s390.lo `test -f 'arch-s390.c' || echo '$(srcdir)/'`arch-s390.c -libseccomp_la-arch-s390-syscalls.lo: arch-s390-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-s390-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-s390-syscalls.Tpo -c -o libseccomp_la-arch-s390-syscalls.lo `test -f 'arch-s390-syscalls.c' || echo '$(srcdir)/'`arch-s390-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-s390-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-s390-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390-syscalls.c' object='libseccomp_la-arch-s390-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-s390-syscalls.lo `test -f 'arch-s390-syscalls.c' || echo '$(srcdir)/'`arch-s390-syscalls.c - libseccomp_la-arch-s390x.lo: arch-s390x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-s390x.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-s390x.Tpo -c -o libseccomp_la-arch-s390x.lo `test -f 'arch-s390x.c' || echo '$(srcdir)/'`arch-s390x.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-s390x.Tpo $(DEPDIR)/libseccomp_la-arch-s390x.Plo @@ -1119,12 +962,19 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-s390x.lo `test -f 'arch-s390x.c' || echo '$(srcdir)/'`arch-s390x.c -libseccomp_la-arch-s390x-syscalls.lo: arch-s390x-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-arch-s390x-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Tpo -c -o libseccomp_la-arch-s390x-syscalls.lo `test -f 'arch-s390x-syscalls.c' || echo '$(srcdir)/'`arch-s390x-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Tpo $(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390x-syscalls.c' object='libseccomp_la-arch-s390x-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ +libseccomp_la-syscalls.lo: syscalls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-syscalls.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-syscalls.Tpo -c -o libseccomp_la-syscalls.lo `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-syscalls.Tpo $(DEPDIR)/libseccomp_la-syscalls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.c' object='libseccomp_la-syscalls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-syscalls.lo `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c + +libseccomp_la-syscalls.perf.lo: syscalls.perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -MT libseccomp_la-syscalls.perf.lo -MD -MP -MF $(DEPDIR)/libseccomp_la-syscalls.perf.Tpo -c -o libseccomp_la-syscalls.perf.lo `test -f 'syscalls.perf.c' || echo '$(srcdir)/'`syscalls.perf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libseccomp_la-syscalls.perf.Tpo $(DEPDIR)/libseccomp_la-syscalls.perf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.perf.c' object='libseccomp_la-syscalls.perf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-arch-s390x-syscalls.lo `test -f 'arch-s390x-syscalls.c' || echo '$(srcdir)/'`arch-s390x-syscalls.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libseccomp_la_CPPFLAGS) $(CPPFLAGS) $(libseccomp_la_CFLAGS) $(CFLAGS) -c -o libseccomp_la-syscalls.perf.lo `test -f 'syscalls.perf.c' || echo '$(srcdir)/'`syscalls.perf.c arch_syscall_check-arch-syscall-check.o: arch-syscall-check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-syscall-check.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-syscall-check.Tpo -c -o arch_syscall_check-arch-syscall-check.o `test -f 'arch-syscall-check.c' || echo '$(srcdir)/'`arch-syscall-check.c @@ -1266,20 +1116,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86.obj `if test -f 'arch-x86.c'; then $(CYGPATH_W) 'arch-x86.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86.c'; fi` -arch_syscall_check-arch-x86-syscalls.o: arch-x86-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x86-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Tpo -c -o arch_syscall_check-arch-x86-syscalls.o `test -f 'arch-x86-syscalls.c' || echo '$(srcdir)/'`arch-x86-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86-syscalls.c' object='arch_syscall_check-arch-x86-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86-syscalls.o `test -f 'arch-x86-syscalls.c' || echo '$(srcdir)/'`arch-x86-syscalls.c - -arch_syscall_check-arch-x86-syscalls.obj: arch-x86-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x86-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Tpo -c -o arch_syscall_check-arch-x86-syscalls.obj `if test -f 'arch-x86-syscalls.c'; then $(CYGPATH_W) 'arch-x86-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86-syscalls.c' object='arch_syscall_check-arch-x86-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86-syscalls.obj `if test -f 'arch-x86-syscalls.c'; then $(CYGPATH_W) 'arch-x86-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86-syscalls.c'; fi` - arch_syscall_check-arch-x86_64.o: arch-x86_64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x86_64.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x86_64.Tpo -c -o arch_syscall_check-arch-x86_64.o `test -f 'arch-x86_64.c' || echo '$(srcdir)/'`arch-x86_64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x86_64.Tpo $(DEPDIR)/arch_syscall_check-arch-x86_64.Po @@ -1294,20 +1130,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86_64.obj `if test -f 'arch-x86_64.c'; then $(CYGPATH_W) 'arch-x86_64.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86_64.c'; fi` -arch_syscall_check-arch-x86_64-syscalls.o: arch-x86_64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x86_64-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Tpo -c -o arch_syscall_check-arch-x86_64-syscalls.o `test -f 'arch-x86_64-syscalls.c' || echo '$(srcdir)/'`arch-x86_64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86_64-syscalls.c' object='arch_syscall_check-arch-x86_64-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86_64-syscalls.o `test -f 'arch-x86_64-syscalls.c' || echo '$(srcdir)/'`arch-x86_64-syscalls.c - -arch_syscall_check-arch-x86_64-syscalls.obj: arch-x86_64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x86_64-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Tpo -c -o arch_syscall_check-arch-x86_64-syscalls.obj `if test -f 'arch-x86_64-syscalls.c'; then $(CYGPATH_W) 'arch-x86_64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86_64-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x86_64-syscalls.c' object='arch_syscall_check-arch-x86_64-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x86_64-syscalls.obj `if test -f 'arch-x86_64-syscalls.c'; then $(CYGPATH_W) 'arch-x86_64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x86_64-syscalls.c'; fi` - arch_syscall_check-arch-x32.o: arch-x32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x32.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x32.Tpo -c -o arch_syscall_check-arch-x32.o `test -f 'arch-x32.c' || echo '$(srcdir)/'`arch-x32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x32.Tpo $(DEPDIR)/arch_syscall_check-arch-x32.Po @@ -1322,20 +1144,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x32.obj `if test -f 'arch-x32.c'; then $(CYGPATH_W) 'arch-x32.c'; else $(CYGPATH_W) '$(srcdir)/arch-x32.c'; fi` -arch_syscall_check-arch-x32-syscalls.o: arch-x32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x32-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Tpo -c -o arch_syscall_check-arch-x32-syscalls.o `test -f 'arch-x32-syscalls.c' || echo '$(srcdir)/'`arch-x32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x32-syscalls.c' object='arch_syscall_check-arch-x32-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x32-syscalls.o `test -f 'arch-x32-syscalls.c' || echo '$(srcdir)/'`arch-x32-syscalls.c - -arch_syscall_check-arch-x32-syscalls.obj: arch-x32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-x32-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Tpo -c -o arch_syscall_check-arch-x32-syscalls.obj `if test -f 'arch-x32-syscalls.c'; then $(CYGPATH_W) 'arch-x32-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x32-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-x32-syscalls.c' object='arch_syscall_check-arch-x32-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-x32-syscalls.obj `if test -f 'arch-x32-syscalls.c'; then $(CYGPATH_W) 'arch-x32-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-x32-syscalls.c'; fi` - arch_syscall_check-arch-arm.o: arch-arm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-arm.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-arm.Tpo -c -o arch_syscall_check-arch-arm.o `test -f 'arch-arm.c' || echo '$(srcdir)/'`arch-arm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-arm.Tpo $(DEPDIR)/arch_syscall_check-arch-arm.Po @@ -1350,20 +1158,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-arm.obj `if test -f 'arch-arm.c'; then $(CYGPATH_W) 'arch-arm.c'; else $(CYGPATH_W) '$(srcdir)/arch-arm.c'; fi` -arch_syscall_check-arch-arm-syscalls.o: arch-arm-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-arm-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Tpo -c -o arch_syscall_check-arch-arm-syscalls.o `test -f 'arch-arm-syscalls.c' || echo '$(srcdir)/'`arch-arm-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-arm-syscalls.c' object='arch_syscall_check-arch-arm-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-arm-syscalls.o `test -f 'arch-arm-syscalls.c' || echo '$(srcdir)/'`arch-arm-syscalls.c - -arch_syscall_check-arch-arm-syscalls.obj: arch-arm-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-arm-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Tpo -c -o arch_syscall_check-arch-arm-syscalls.obj `if test -f 'arch-arm-syscalls.c'; then $(CYGPATH_W) 'arch-arm-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-arm-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-arm-syscalls.c' object='arch_syscall_check-arch-arm-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-arm-syscalls.obj `if test -f 'arch-arm-syscalls.c'; then $(CYGPATH_W) 'arch-arm-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-arm-syscalls.c'; fi` - arch_syscall_check-arch-aarch64.o: arch-aarch64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-aarch64.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-aarch64.Tpo -c -o arch_syscall_check-arch-aarch64.o `test -f 'arch-aarch64.c' || echo '$(srcdir)/'`arch-aarch64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-aarch64.Tpo $(DEPDIR)/arch_syscall_check-arch-aarch64.Po @@ -1378,20 +1172,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-aarch64.obj `if test -f 'arch-aarch64.c'; then $(CYGPATH_W) 'arch-aarch64.c'; else $(CYGPATH_W) '$(srcdir)/arch-aarch64.c'; fi` -arch_syscall_check-arch-aarch64-syscalls.o: arch-aarch64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-aarch64-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Tpo -c -o arch_syscall_check-arch-aarch64-syscalls.o `test -f 'arch-aarch64-syscalls.c' || echo '$(srcdir)/'`arch-aarch64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-aarch64-syscalls.c' object='arch_syscall_check-arch-aarch64-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-aarch64-syscalls.o `test -f 'arch-aarch64-syscalls.c' || echo '$(srcdir)/'`arch-aarch64-syscalls.c - -arch_syscall_check-arch-aarch64-syscalls.obj: arch-aarch64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-aarch64-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Tpo -c -o arch_syscall_check-arch-aarch64-syscalls.obj `if test -f 'arch-aarch64-syscalls.c'; then $(CYGPATH_W) 'arch-aarch64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-aarch64-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-aarch64-syscalls.c' object='arch_syscall_check-arch-aarch64-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-aarch64-syscalls.obj `if test -f 'arch-aarch64-syscalls.c'; then $(CYGPATH_W) 'arch-aarch64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-aarch64-syscalls.c'; fi` - arch_syscall_check-arch-mips.o: arch-mips.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips.Tpo -c -o arch_syscall_check-arch-mips.o `test -f 'arch-mips.c' || echo '$(srcdir)/'`arch-mips.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips.Tpo $(DEPDIR)/arch_syscall_check-arch-mips.Po @@ -1406,20 +1186,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips.obj `if test -f 'arch-mips.c'; then $(CYGPATH_W) 'arch-mips.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips.c'; fi` -arch_syscall_check-arch-mips-syscalls.o: arch-mips-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Tpo -c -o arch_syscall_check-arch-mips-syscalls.o `test -f 'arch-mips-syscalls.c' || echo '$(srcdir)/'`arch-mips-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips-syscalls.c' object='arch_syscall_check-arch-mips-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips-syscalls.o `test -f 'arch-mips-syscalls.c' || echo '$(srcdir)/'`arch-mips-syscalls.c - -arch_syscall_check-arch-mips-syscalls.obj: arch-mips-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Tpo -c -o arch_syscall_check-arch-mips-syscalls.obj `if test -f 'arch-mips-syscalls.c'; then $(CYGPATH_W) 'arch-mips-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips-syscalls.c' object='arch_syscall_check-arch-mips-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips-syscalls.obj `if test -f 'arch-mips-syscalls.c'; then $(CYGPATH_W) 'arch-mips-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips-syscalls.c'; fi` - arch_syscall_check-arch-mips64.o: arch-mips64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64.Tpo -c -o arch_syscall_check-arch-mips64.o `test -f 'arch-mips64.c' || echo '$(srcdir)/'`arch-mips64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64.Po @@ -1434,20 +1200,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64.obj `if test -f 'arch-mips64.c'; then $(CYGPATH_W) 'arch-mips64.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64.c'; fi` -arch_syscall_check-arch-mips64-syscalls.o: arch-mips64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Tpo -c -o arch_syscall_check-arch-mips64-syscalls.o `test -f 'arch-mips64-syscalls.c' || echo '$(srcdir)/'`arch-mips64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64-syscalls.c' object='arch_syscall_check-arch-mips64-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64-syscalls.o `test -f 'arch-mips64-syscalls.c' || echo '$(srcdir)/'`arch-mips64-syscalls.c - -arch_syscall_check-arch-mips64-syscalls.obj: arch-mips64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Tpo -c -o arch_syscall_check-arch-mips64-syscalls.obj `if test -f 'arch-mips64-syscalls.c'; then $(CYGPATH_W) 'arch-mips64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64-syscalls.c' object='arch_syscall_check-arch-mips64-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64-syscalls.obj `if test -f 'arch-mips64-syscalls.c'; then $(CYGPATH_W) 'arch-mips64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64-syscalls.c'; fi` - arch_syscall_check-arch-mips64n32.o: arch-mips64n32.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64n32.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64n32.Tpo -c -o arch_syscall_check-arch-mips64n32.o `test -f 'arch-mips64n32.c' || echo '$(srcdir)/'`arch-mips64n32.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64n32.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64n32.Po @@ -1462,20 +1214,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64n32.obj `if test -f 'arch-mips64n32.c'; then $(CYGPATH_W) 'arch-mips64n32.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64n32.c'; fi` -arch_syscall_check-arch-mips64n32-syscalls.o: arch-mips64n32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64n32-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Tpo -c -o arch_syscall_check-arch-mips64n32-syscalls.o `test -f 'arch-mips64n32-syscalls.c' || echo '$(srcdir)/'`arch-mips64n32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64n32-syscalls.c' object='arch_syscall_check-arch-mips64n32-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64n32-syscalls.o `test -f 'arch-mips64n32-syscalls.c' || echo '$(srcdir)/'`arch-mips64n32-syscalls.c - -arch_syscall_check-arch-mips64n32-syscalls.obj: arch-mips64n32-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-mips64n32-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Tpo -c -o arch_syscall_check-arch-mips64n32-syscalls.obj `if test -f 'arch-mips64n32-syscalls.c'; then $(CYGPATH_W) 'arch-mips64n32-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64n32-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-mips64n32-syscalls.c' object='arch_syscall_check-arch-mips64n32-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-mips64n32-syscalls.obj `if test -f 'arch-mips64n32-syscalls.c'; then $(CYGPATH_W) 'arch-mips64n32-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-mips64n32-syscalls.c'; fi` - arch_syscall_check-arch-parisc.o: arch-parisc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-parisc.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-parisc.Tpo -c -o arch_syscall_check-arch-parisc.o `test -f 'arch-parisc.c' || echo '$(srcdir)/'`arch-parisc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-parisc.Tpo $(DEPDIR)/arch_syscall_check-arch-parisc.Po @@ -1504,20 +1242,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-parisc64.obj `if test -f 'arch-parisc64.c'; then $(CYGPATH_W) 'arch-parisc64.c'; else $(CYGPATH_W) '$(srcdir)/arch-parisc64.c'; fi` -arch_syscall_check-arch-parisc-syscalls.o: arch-parisc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-parisc-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Tpo -c -o arch_syscall_check-arch-parisc-syscalls.o `test -f 'arch-parisc-syscalls.c' || echo '$(srcdir)/'`arch-parisc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-parisc-syscalls.c' object='arch_syscall_check-arch-parisc-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-parisc-syscalls.o `test -f 'arch-parisc-syscalls.c' || echo '$(srcdir)/'`arch-parisc-syscalls.c - -arch_syscall_check-arch-parisc-syscalls.obj: arch-parisc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-parisc-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Tpo -c -o arch_syscall_check-arch-parisc-syscalls.obj `if test -f 'arch-parisc-syscalls.c'; then $(CYGPATH_W) 'arch-parisc-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-parisc-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-parisc-syscalls.c' object='arch_syscall_check-arch-parisc-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-parisc-syscalls.obj `if test -f 'arch-parisc-syscalls.c'; then $(CYGPATH_W) 'arch-parisc-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-parisc-syscalls.c'; fi` - arch_syscall_check-arch-ppc.o: arch-ppc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc.Tpo -c -o arch_syscall_check-arch-ppc.o `test -f 'arch-ppc.c' || echo '$(srcdir)/'`arch-ppc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc.Po @@ -1532,20 +1256,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc.obj `if test -f 'arch-ppc.c'; then $(CYGPATH_W) 'arch-ppc.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc.c'; fi` -arch_syscall_check-arch-ppc-syscalls.o: arch-ppc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Tpo -c -o arch_syscall_check-arch-ppc-syscalls.o `test -f 'arch-ppc-syscalls.c' || echo '$(srcdir)/'`arch-ppc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc-syscalls.c' object='arch_syscall_check-arch-ppc-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc-syscalls.o `test -f 'arch-ppc-syscalls.c' || echo '$(srcdir)/'`arch-ppc-syscalls.c - -arch_syscall_check-arch-ppc-syscalls.obj: arch-ppc-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Tpo -c -o arch_syscall_check-arch-ppc-syscalls.obj `if test -f 'arch-ppc-syscalls.c'; then $(CYGPATH_W) 'arch-ppc-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc-syscalls.c' object='arch_syscall_check-arch-ppc-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc-syscalls.obj `if test -f 'arch-ppc-syscalls.c'; then $(CYGPATH_W) 'arch-ppc-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc-syscalls.c'; fi` - arch_syscall_check-arch-ppc64.o: arch-ppc64.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc64.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc64.Tpo -c -o arch_syscall_check-arch-ppc64.o `test -f 'arch-ppc64.c' || echo '$(srcdir)/'`arch-ppc64.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc64.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc64.Po @@ -1560,19 +1270,19 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc64.obj `if test -f 'arch-ppc64.c'; then $(CYGPATH_W) 'arch-ppc64.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc64.c'; fi` -arch_syscall_check-arch-ppc64-syscalls.o: arch-ppc64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc64-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Tpo -c -o arch_syscall_check-arch-ppc64-syscalls.o `test -f 'arch-ppc64-syscalls.c' || echo '$(srcdir)/'`arch-ppc64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc64-syscalls.c' object='arch_syscall_check-arch-ppc64-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc64-syscalls.o `test -f 'arch-ppc64-syscalls.c' || echo '$(srcdir)/'`arch-ppc64-syscalls.c - -arch_syscall_check-arch-ppc64-syscalls.obj: arch-ppc64-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-ppc64-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Tpo -c -o arch_syscall_check-arch-ppc64-syscalls.obj `if test -f 'arch-ppc64-syscalls.c'; then $(CYGPATH_W) 'arch-ppc64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc64-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-ppc64-syscalls.c' object='arch_syscall_check-arch-ppc64-syscalls.obj' libtool=no @AMDEPBACKSLASH@ +arch_syscall_check-arch-riscv64.o: arch-riscv64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-riscv64.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-riscv64.Tpo -c -o arch_syscall_check-arch-riscv64.o `test -f 'arch-riscv64.c' || echo '$(srcdir)/'`arch-riscv64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-riscv64.Tpo $(DEPDIR)/arch_syscall_check-arch-riscv64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-riscv64.c' object='arch_syscall_check-arch-riscv64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-riscv64.o `test -f 'arch-riscv64.c' || echo '$(srcdir)/'`arch-riscv64.c + +arch_syscall_check-arch-riscv64.obj: arch-riscv64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-riscv64.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-riscv64.Tpo -c -o arch_syscall_check-arch-riscv64.obj `if test -f 'arch-riscv64.c'; then $(CYGPATH_W) 'arch-riscv64.c'; else $(CYGPATH_W) '$(srcdir)/arch-riscv64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-riscv64.Tpo $(DEPDIR)/arch_syscall_check-arch-riscv64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-riscv64.c' object='arch_syscall_check-arch-riscv64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-ppc64-syscalls.obj `if test -f 'arch-ppc64-syscalls.c'; then $(CYGPATH_W) 'arch-ppc64-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-ppc64-syscalls.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-riscv64.obj `if test -f 'arch-riscv64.c'; then $(CYGPATH_W) 'arch-riscv64.c'; else $(CYGPATH_W) '$(srcdir)/arch-riscv64.c'; fi` arch_syscall_check-arch-s390.o: arch-s390.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390.Tpo -c -o arch_syscall_check-arch-s390.o `test -f 'arch-s390.c' || echo '$(srcdir)/'`arch-s390.c @@ -1588,20 +1298,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390.obj `if test -f 'arch-s390.c'; then $(CYGPATH_W) 'arch-s390.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390.c'; fi` -arch_syscall_check-arch-s390-syscalls.o: arch-s390-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Tpo -c -o arch_syscall_check-arch-s390-syscalls.o `test -f 'arch-s390-syscalls.c' || echo '$(srcdir)/'`arch-s390-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390-syscalls.c' object='arch_syscall_check-arch-s390-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390-syscalls.o `test -f 'arch-s390-syscalls.c' || echo '$(srcdir)/'`arch-s390-syscalls.c - -arch_syscall_check-arch-s390-syscalls.obj: arch-s390-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Tpo -c -o arch_syscall_check-arch-s390-syscalls.obj `if test -f 'arch-s390-syscalls.c'; then $(CYGPATH_W) 'arch-s390-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390-syscalls.c' object='arch_syscall_check-arch-s390-syscalls.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390-syscalls.obj `if test -f 'arch-s390-syscalls.c'; then $(CYGPATH_W) 'arch-s390-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390-syscalls.c'; fi` - arch_syscall_check-arch-s390x.o: arch-s390x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390x.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390x.Tpo -c -o arch_syscall_check-arch-s390x.o `test -f 'arch-s390x.c' || echo '$(srcdir)/'`arch-s390x.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-s390x.Tpo $(DEPDIR)/arch_syscall_check-arch-s390x.Po @@ -1616,19 +1312,33 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390x.obj `if test -f 'arch-s390x.c'; then $(CYGPATH_W) 'arch-s390x.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390x.c'; fi` -arch_syscall_check-arch-s390x-syscalls.o: arch-s390x-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390x-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Tpo -c -o arch_syscall_check-arch-s390x-syscalls.o `test -f 'arch-s390x-syscalls.c' || echo '$(srcdir)/'`arch-s390x-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390x-syscalls.c' object='arch_syscall_check-arch-s390x-syscalls.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390x-syscalls.o `test -f 'arch-s390x-syscalls.c' || echo '$(srcdir)/'`arch-s390x-syscalls.c - -arch_syscall_check-arch-s390x-syscalls.obj: arch-s390x-syscalls.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-arch-s390x-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Tpo -c -o arch_syscall_check-arch-s390x-syscalls.obj `if test -f 'arch-s390x-syscalls.c'; then $(CYGPATH_W) 'arch-s390x-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390x-syscalls.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Tpo $(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arch-s390x-syscalls.c' object='arch_syscall_check-arch-s390x-syscalls.obj' libtool=no @AMDEPBACKSLASH@ +arch_syscall_check-syscalls.o: syscalls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-syscalls.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-syscalls.Tpo -c -o arch_syscall_check-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-syscalls.Tpo $(DEPDIR)/arch_syscall_check-syscalls.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.c' object='arch_syscall_check-syscalls.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c + +arch_syscall_check-syscalls.obj: syscalls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-syscalls.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-syscalls.Tpo -c -o arch_syscall_check-syscalls.obj `if test -f 'syscalls.c'; then $(CYGPATH_W) 'syscalls.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-syscalls.Tpo $(DEPDIR)/arch_syscall_check-syscalls.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.c' object='arch_syscall_check-syscalls.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-arch-s390x-syscalls.obj `if test -f 'arch-s390x-syscalls.c'; then $(CYGPATH_W) 'arch-s390x-syscalls.c'; else $(CYGPATH_W) '$(srcdir)/arch-s390x-syscalls.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-syscalls.obj `if test -f 'syscalls.c'; then $(CYGPATH_W) 'syscalls.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.c'; fi` + +arch_syscall_check-syscalls.perf.o: syscalls.perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-syscalls.perf.o -MD -MP -MF $(DEPDIR)/arch_syscall_check-syscalls.perf.Tpo -c -o arch_syscall_check-syscalls.perf.o `test -f 'syscalls.perf.c' || echo '$(srcdir)/'`syscalls.perf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-syscalls.perf.Tpo $(DEPDIR)/arch_syscall_check-syscalls.perf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.perf.c' object='arch_syscall_check-syscalls.perf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-syscalls.perf.o `test -f 'syscalls.perf.c' || echo '$(srcdir)/'`syscalls.perf.c + +arch_syscall_check-syscalls.perf.obj: syscalls.perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -MT arch_syscall_check-syscalls.perf.obj -MD -MP -MF $(DEPDIR)/arch_syscall_check-syscalls.perf.Tpo -c -o arch_syscall_check-syscalls.perf.obj `if test -f 'syscalls.perf.c'; then $(CYGPATH_W) 'syscalls.perf.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.perf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arch_syscall_check-syscalls.perf.Tpo $(DEPDIR)/arch_syscall_check-syscalls.perf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscalls.perf.c' object='arch_syscall_check-syscalls.perf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(arch_syscall_check_CFLAGS) $(CFLAGS) -c -o arch_syscall_check-syscalls.perf.obj `if test -f 'syscalls.perf.c'; then $(CYGPATH_W) 'syscalls.perf.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.perf.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1918,6 +1628,7 @@ mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -1933,63 +1644,39 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/api.Po - -rm -f ./$(DEPDIR)/arch-aarch64-syscalls.Po -rm -f ./$(DEPDIR)/arch-aarch64.Po - -rm -f ./$(DEPDIR)/arch-arm-syscalls.Po -rm -f ./$(DEPDIR)/arch-arm.Po - -rm -f ./$(DEPDIR)/arch-mips-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips.Po - -rm -f ./$(DEPDIR)/arch-mips64-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips64.Po - -rm -f ./$(DEPDIR)/arch-mips64n32-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips64n32.Po - -rm -f ./$(DEPDIR)/arch-parisc-syscalls.Po -rm -f ./$(DEPDIR)/arch-parisc.Po -rm -f ./$(DEPDIR)/arch-parisc64.Po - -rm -f ./$(DEPDIR)/arch-ppc-syscalls.Po -rm -f ./$(DEPDIR)/arch-ppc.Po - -rm -f ./$(DEPDIR)/arch-ppc64-syscalls.Po -rm -f ./$(DEPDIR)/arch-ppc64.Po - -rm -f ./$(DEPDIR)/arch-s390-syscalls.Po + -rm -f ./$(DEPDIR)/arch-riscv64.Po -rm -f ./$(DEPDIR)/arch-s390.Po - -rm -f ./$(DEPDIR)/arch-s390x-syscalls.Po -rm -f ./$(DEPDIR)/arch-s390x.Po -rm -f ./$(DEPDIR)/arch-syscall-dump.Po - -rm -f ./$(DEPDIR)/arch-x32-syscalls.Po -rm -f ./$(DEPDIR)/arch-x32.Po - -rm -f ./$(DEPDIR)/arch-x86-syscalls.Po -rm -f ./$(DEPDIR)/arch-x86.Po - -rm -f ./$(DEPDIR)/arch-x86_64-syscalls.Po -rm -f ./$(DEPDIR)/arch-x86_64.Po -rm -f ./$(DEPDIR)/arch.Po -rm -f ./$(DEPDIR)/arch_syscall_check-api.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-aarch64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-arm.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64n32.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-arch-riscv64.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390x.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-syscall-check.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x32.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86_64.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch.Po -rm -f ./$(DEPDIR)/arch_syscall_check-db.Po @@ -1997,6 +1684,8 @@ -rm -f ./$(DEPDIR)/arch_syscall_check-gen_pfc.Po -rm -f ./$(DEPDIR)/arch_syscall_check-hash.Po -rm -f ./$(DEPDIR)/arch_syscall_check-helper.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-syscalls.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-syscalls.perf.Po -rm -f ./$(DEPDIR)/arch_syscall_check-system.Po -rm -f ./$(DEPDIR)/db.Po -rm -f ./$(DEPDIR)/gen_bpf.Po @@ -2004,32 +1693,20 @@ -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/helper.Po -rm -f ./$(DEPDIR)/libseccomp_la-api.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-aarch64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-arm-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-arm.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64n32.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390-syscalls.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-arch-riscv64.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390x.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x32-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x32.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86_64.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch.Plo -rm -f ./$(DEPDIR)/libseccomp_la-db.Plo @@ -2037,7 +1714,11 @@ -rm -f ./$(DEPDIR)/libseccomp_la-gen_pfc.Plo -rm -f ./$(DEPDIR)/libseccomp_la-hash.Plo -rm -f ./$(DEPDIR)/libseccomp_la-helper.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-syscalls.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-syscalls.perf.Plo -rm -f ./$(DEPDIR)/libseccomp_la-system.Plo + -rm -f ./$(DEPDIR)/syscalls.Po + -rm -f ./$(DEPDIR)/syscalls.perf.Po -rm -f ./$(DEPDIR)/system.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ @@ -2085,63 +1766,39 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/api.Po - -rm -f ./$(DEPDIR)/arch-aarch64-syscalls.Po -rm -f ./$(DEPDIR)/arch-aarch64.Po - -rm -f ./$(DEPDIR)/arch-arm-syscalls.Po -rm -f ./$(DEPDIR)/arch-arm.Po - -rm -f ./$(DEPDIR)/arch-mips-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips.Po - -rm -f ./$(DEPDIR)/arch-mips64-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips64.Po - -rm -f ./$(DEPDIR)/arch-mips64n32-syscalls.Po -rm -f ./$(DEPDIR)/arch-mips64n32.Po - -rm -f ./$(DEPDIR)/arch-parisc-syscalls.Po -rm -f ./$(DEPDIR)/arch-parisc.Po -rm -f ./$(DEPDIR)/arch-parisc64.Po - -rm -f ./$(DEPDIR)/arch-ppc-syscalls.Po -rm -f ./$(DEPDIR)/arch-ppc.Po - -rm -f ./$(DEPDIR)/arch-ppc64-syscalls.Po -rm -f ./$(DEPDIR)/arch-ppc64.Po - -rm -f ./$(DEPDIR)/arch-s390-syscalls.Po + -rm -f ./$(DEPDIR)/arch-riscv64.Po -rm -f ./$(DEPDIR)/arch-s390.Po - -rm -f ./$(DEPDIR)/arch-s390x-syscalls.Po -rm -f ./$(DEPDIR)/arch-s390x.Po -rm -f ./$(DEPDIR)/arch-syscall-dump.Po - -rm -f ./$(DEPDIR)/arch-x32-syscalls.Po -rm -f ./$(DEPDIR)/arch-x32.Po - -rm -f ./$(DEPDIR)/arch-x86-syscalls.Po -rm -f ./$(DEPDIR)/arch-x86.Po - -rm -f ./$(DEPDIR)/arch-x86_64-syscalls.Po -rm -f ./$(DEPDIR)/arch-x86_64.Po -rm -f ./$(DEPDIR)/arch.Po -rm -f ./$(DEPDIR)/arch_syscall_check-api.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-aarch64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-aarch64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-arm-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-arm.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64n32-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-mips64n32.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-parisc64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-ppc64.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390-syscalls.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-arch-riscv64.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390x-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-s390x.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-syscall-check.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x32-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x32.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86.Po - -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86_64-syscalls.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch-x86_64.Po -rm -f ./$(DEPDIR)/arch_syscall_check-arch.Po -rm -f ./$(DEPDIR)/arch_syscall_check-db.Po @@ -2149,6 +1806,8 @@ -rm -f ./$(DEPDIR)/arch_syscall_check-gen_pfc.Po -rm -f ./$(DEPDIR)/arch_syscall_check-hash.Po -rm -f ./$(DEPDIR)/arch_syscall_check-helper.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-syscalls.Po + -rm -f ./$(DEPDIR)/arch_syscall_check-syscalls.perf.Po -rm -f ./$(DEPDIR)/arch_syscall_check-system.Po -rm -f ./$(DEPDIR)/db.Po -rm -f ./$(DEPDIR)/gen_bpf.Po @@ -2156,32 +1815,20 @@ -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/helper.Po -rm -f ./$(DEPDIR)/libseccomp_la-api.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-aarch64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-aarch64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-arm-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-arm.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64n32-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-mips64n32.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-parisc64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-ppc64.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390-syscalls.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-arch-riscv64.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390x-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-s390x.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x32-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x32.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86.Plo - -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86_64-syscalls.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch-x86_64.Plo -rm -f ./$(DEPDIR)/libseccomp_la-arch.Plo -rm -f ./$(DEPDIR)/libseccomp_la-db.Plo @@ -2189,7 +1836,11 @@ -rm -f ./$(DEPDIR)/libseccomp_la-gen_pfc.Plo -rm -f ./$(DEPDIR)/libseccomp_la-hash.Plo -rm -f ./$(DEPDIR)/libseccomp_la-helper.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-syscalls.Plo + -rm -f ./$(DEPDIR)/libseccomp_la-syscalls.perf.Plo -rm -f ./$(DEPDIR)/libseccomp_la-system.Plo + -rm -f ./$(DEPDIR)/syscalls.Po + -rm -f ./$(DEPDIR)/syscalls.perf.Po -rm -f ./$(DEPDIR)/system.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2232,6 +1883,13 @@ @CODE_COVERAGE_RULES@ +syscalls.perf: syscalls.csv syscalls.perf.template + ${AM_V_GEN} ${srcdir}/arch-gperf-generate \ + ${srcdir}/syscalls.csv ${srcdir}/syscalls.perf.template + +syscalls.perf.c: syscalls.perf + ${GPERF} -m 100 --null-strings --pic -tCEG -T -S1 $< > $@ + check-build: ${MAKE} ${AM_MAKEFLAGS} ${check_PROGRAMS} diff -Nru libseccomp-2.4.3/src/api.c libseccomp-2.5.1/src/api.c --- libseccomp-2.4.3/src/api.c 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/src/api.c 2020-11-17 08:34:38.779027356 +1030 @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -34,6 +35,7 @@ #include "db.h" #include "gen_pfc.h" #include "gen_bpf.h" +#include "helper.h" #include "system.h" #define API __attribute__((visibility("default"))) @@ -47,6 +49,72 @@ unsigned int seccomp_api_level = 0; /** + * Filter the error codes we send back to callers + * @param err the error code + * + * We consider error codes part of our API so we want to make sure we don't + * accidentally send an undocumented error code to our callers. This function + * helps with that. + * + */ +static int _rc_filter(int err) +{ + /* pass through success values */ + if (err >= 0) + return err; + + /* filter the error codes */ + switch (err) { + case -EACCES: + /* NOTE: operation is not permitted by libseccomp */ + case -ECANCELED: + /* NOTE: kernel level error that is beyond the control of + * libseccomp */ + case -EDOM: + /* NOTE: failure due to arch/ABI */ + case -EEXIST: + /* NOTE: operation failed due to existing rule or filter */ + case -EINVAL: + /* NOTE: invalid input to the libseccomp API */ + case -ENOENT: + /* NOTE: no matching entry found */ + case -ENOMEM: + /* NOTE: unable to allocate enough memory to perform the + * requested operation */ + case -EOPNOTSUPP: + /* NOTE: operation is not supported */ + case -ESRCH: + /* NOTE: operation failed due to multi-threading */ + return err; + default: + /* NOTE: this is the default "internal libseccomp error" + * error code, it is our catch-all */ + return -EFAULT; + } +} + +/** + * Filter the system error codes we send back to callers + * @param col the filter collection + * @param err the error code + * + * This is similar to _rc_filter(), but it first checks the filter attribute + * to determine if we should be filtering the return codes. + * + */ +static int _rc_filter_sys(struct db_filter_col *col, int err) +{ + /* pass through success values */ + if (err >= 0) + return err; + + /* pass the return code if the SCMP_FLTATR_API_SYSRAWRC is true */ + if (db_col_attr_read(col, SCMP_FLTATR_API_SYSRAWRC)) + return err; + return -ECANCELED; +} + +/** * Validate a filter context * @param ctx the filter context * @@ -97,17 +165,29 @@ /* NOTE: level 1 is the base level, start checking at 2 */ - /* level 2 */ if (sys_chk_seccomp_syscall() && sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC) == 1) level = 2; - /* level 3 */ if (level == 2 && sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_LOG) == 1 && - sys_chk_seccomp_action(SCMP_ACT_LOG) == 1) + sys_chk_seccomp_action(SCMP_ACT_LOG) == 1 && + sys_chk_seccomp_action(SCMP_ACT_KILL_PROCESS) == 1) level = 3; + if (level == 3 && + sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW) == 1) + level = 4; + + if (level == 4 && + sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER) == 1 && + sys_chk_seccomp_action(SCMP_ACT_NOTIFY) == 1) + level = 5; + + if (level == 5 && + sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH) == 1) + level = 6; + /* update the stored api level and return */ seccomp_api_level = level; return seccomp_api_level; @@ -136,6 +216,10 @@ sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, false); sys_set_seccomp_action(SCMP_ACT_LOG, false); sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, false); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, false); break; case 2: sys_set_seccomp_syscall(true); @@ -143,6 +227,10 @@ sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, false); sys_set_seccomp_action(SCMP_ACT_LOG, false); sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, false); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, false); break; case 3: sys_set_seccomp_syscall(true); @@ -150,19 +238,59 @@ sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, true); sys_set_seccomp_action(SCMP_ACT_LOG, true); sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, false); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, false); + break; + case 4: + sys_set_seccomp_syscall(true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, true); + sys_set_seccomp_action(SCMP_ACT_LOG, true); + sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, false); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, false); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, false); + break; + case 5: + sys_set_seccomp_syscall(true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, true); + sys_set_seccomp_action(SCMP_ACT_LOG, true); + sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, true); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, false); + break; + case 6: + sys_set_seccomp_syscall(true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_LOG, true); + sys_set_seccomp_action(SCMP_ACT_LOG, true); + sys_set_seccomp_action(SCMP_ACT_KILL_PROCESS, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_NEW_LISTENER, true); + sys_set_seccomp_action(SCMP_ACT_NOTIFY, true); + sys_set_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH, true); break; default: - return -EINVAL; + return _rc_filter(-EINVAL); } seccomp_api_level = level; - return 0; + return _rc_filter(0); } /* NOTE - function header comment in include/seccomp.h */ API scmp_filter_ctx seccomp_init(uint32_t def_action) { - if (db_action_valid(def_action) < 0) + /* force a runtime api level detection */ + _seccomp_api_update(); + + if (db_col_action_valid(NULL, def_action) < 0) return NULL; return db_col_init(def_action); @@ -173,10 +301,19 @@ { struct db_filter_col *col = (struct db_filter_col *)ctx; - if (ctx == NULL || db_action_valid(def_action) < 0) - return -EINVAL; + /* a NULL filter context indicates we are resetting the global state */ + if (ctx == NULL) { + /* reset the global state and redetermine the api level */ + sys_reset_state(); + _seccomp_api_update(); + return _rc_filter(0); + } + /* ensure the default action is valid */ + if (db_col_action_valid(NULL, def_action) < 0) + return _rc_filter(-EINVAL); - return db_col_reset(col, def_action); + /* reset the filter */ + return _rc_filter(db_col_reset(col, def_action)); } /* NOTE - function header comment in include/seccomp.h */ @@ -186,22 +323,21 @@ } /* NOTE - function header comment in include/seccomp.h */ -API int seccomp_merge(scmp_filter_ctx ctx_dst, - scmp_filter_ctx ctx_src) +API int seccomp_merge(scmp_filter_ctx ctx_dst, scmp_filter_ctx ctx_src) { struct db_filter_col *col_dst = (struct db_filter_col *)ctx_dst; struct db_filter_col *col_src = (struct db_filter_col *)ctx_src; if (db_col_valid(col_dst) || db_col_valid(col_src)) - return -EINVAL; + return _rc_filter(-EINVAL); /* NOTE: only the default action, NNP, and TSYNC settings must match */ if ((col_dst->attr.act_default != col_src->attr.act_default) || (col_dst->attr.nnp_enable != col_src->attr.nnp_enable) || (col_dst->attr.tsync_enable != col_src->attr.tsync_enable)) - return -EINVAL; + return _rc_filter(-EINVAL); - return db_col_merge(col_dst, col_src); + return _rc_filter(db_col_merge(col_dst, col_src)); } /* NOTE - function header comment in include/seccomp.h */ @@ -226,8 +362,7 @@ } /* NOTE - function header comment in include/seccomp.h */ -API int seccomp_arch_exist(const scmp_filter_ctx ctx, - uint32_t arch_token) +API int seccomp_arch_exist(const scmp_filter_ctx ctx, uint32_t arch_token) { struct db_filter_col *col = (struct db_filter_col *)ctx; @@ -235,9 +370,9 @@ arch_token = arch_def_native->token; if (arch_valid(arch_token)) - return -EINVAL; + return _rc_filter(-EINVAL); - return (db_col_arch_exist(col, arch_token) ? 0 : -EEXIST); + return _rc_filter((db_col_arch_exist(col, arch_token) ? 0 : -EEXIST)); } /* NOTE - function header comment in include/seccomp.h */ @@ -251,11 +386,11 @@ arch = arch_def_lookup(arch_token); if (arch == NULL) - return -EINVAL; + return _rc_filter(-EINVAL); if (db_col_arch_exist(col, arch_token)) - return -EEXIST; + return _rc_filter(-EEXIST); - return db_col_db_new(col, arch); + return _rc_filter(db_col_db_new(col, arch)); } /* NOTE - function header comment in include/seccomp.h */ @@ -267,23 +402,25 @@ arch_token = arch_def_native->token; if (arch_valid(arch_token)) - return -EINVAL; + return _rc_filter(-EINVAL); if (db_col_arch_exist(col, arch_token) != -EEXIST) - return -EEXIST; + return _rc_filter(-EEXIST); - return db_col_db_remove(col, arch_token); + return _rc_filter(db_col_db_remove(col, arch_token)); } /* NOTE - function header comment in include/seccomp.h */ API int seccomp_load(const scmp_filter_ctx ctx) { struct db_filter_col *col; + bool rawrc; if (_ctx_valid(ctx)) - return -EINVAL; + return _rc_filter(-EINVAL); col = (struct db_filter_col *)ctx; - return sys_filter_load(col); + rawrc = db_col_attr_read(col, SCMP_FLTATR_API_SYSRAWRC); + return _rc_filter(sys_filter_load(col, rawrc)); } /* NOTE - function header comment in include/seccomp.h */ @@ -291,9 +428,10 @@ enum scmp_filter_attr attr, uint32_t *value) { if (_ctx_valid(ctx)) - return -EINVAL; + return _rc_filter(-EINVAL); - return db_col_attr_get((const struct db_filter_col *)ctx, attr, value); + return _rc_filter(db_col_attr_get((const struct db_filter_col *)ctx, + attr, value)); } /* NOTE - function header comment in include/seccomp.h */ @@ -301,9 +439,10 @@ enum scmp_filter_attr attr, uint32_t value) { if (_ctx_valid(ctx)) - return -EINVAL; + return _rc_filter(-EINVAL); - return db_col_attr_set((struct db_filter_col *)ctx, attr, value); + return _rc_filter(db_col_attr_set((struct db_filter_col *)ctx, + attr, value)); } /* NOTE - function header comment in include/seccomp.h */ @@ -391,9 +530,9 @@ struct db_filter_col *col = (struct db_filter_col *)ctx; if (db_col_valid(col) || _syscall_valid(col, syscall)) - return -EINVAL; + return _rc_filter(-EINVAL); - return db_col_syscall_priority(col, syscall, priority); + return _rc_filter(db_col_syscall_priority(col, syscall, priority)); } /* NOTE - function header comment in include/seccomp.h */ @@ -406,20 +545,21 @@ struct db_filter_col *col = (struct db_filter_col *)ctx; if (arg_cnt > ARG_COUNT_MAX) - return -EINVAL; + return _rc_filter(-EINVAL); if (arg_cnt > 0 && arg_array == NULL) - return -EINVAL; + return _rc_filter(-EINVAL); if (db_col_valid(col) || _syscall_valid(col, syscall)) - return -EINVAL; + return _rc_filter(-EINVAL); - rc = db_action_valid(action); + rc = db_col_action_valid(col, action); if (rc < 0) - return rc; + return _rc_filter(rc); if (action == col->attr.act_default) - return -EPERM; + return _rc_filter(-EACCES); - return db_col_rule_add(col, 0, action, syscall, arg_cnt, arg_array); + return _rc_filter(db_col_rule_add(col, 0, action, + syscall, arg_cnt, arg_array)); } /* NOTE - function header comment in include/seccomp.h */ @@ -434,7 +574,7 @@ /* arg_cnt is unsigned, so no need to check the lower bound */ if (arg_cnt > ARG_COUNT_MAX) - return -EINVAL; + return _rc_filter(-EINVAL); va_start(arg_list, arg_cnt); for (iter = 0; iter < arg_cnt; ++iter) @@ -442,7 +582,7 @@ rc = seccomp_rule_add_array(ctx, action, syscall, arg_cnt, arg_array); va_end(arg_list); - return rc; + return _rc_filter(rc); } /* NOTE - function header comment in include/seccomp.h */ @@ -455,23 +595,24 @@ struct db_filter_col *col = (struct db_filter_col *)ctx; if (arg_cnt > ARG_COUNT_MAX) - return -EINVAL; + return _rc_filter(-EINVAL); if (arg_cnt > 0 && arg_array == NULL) - return -EINVAL; + return _rc_filter(-EINVAL); if (db_col_valid(col) || _syscall_valid(col, syscall)) - return -EINVAL; + return _rc_filter(-EINVAL); - rc = db_action_valid(action); + rc = db_col_action_valid(col, action); if (rc < 0) - return rc; + return _rc_filter(rc); if (action == col->attr.act_default) - return -EPERM; + return _rc_filter(-EACCES); if (col->filter_cnt > 1) - return -EOPNOTSUPP; + return _rc_filter(-EOPNOTSUPP); - return db_col_rule_add(col, 1, action, syscall, arg_cnt, arg_array); + return _rc_filter(db_col_rule_add(col, 1, action, + syscall, arg_cnt, arg_array)); } /* NOTE - function header comment in include/seccomp.h */ @@ -486,7 +627,7 @@ /* arg_cnt is unsigned, so no need to check the lower bound */ if (arg_cnt > ARG_COUNT_MAX) - return -EINVAL; + return _rc_filter(-EINVAL); va_start(arg_list, arg_cnt); for (iter = 0; iter < arg_cnt; ++iter) @@ -495,34 +636,98 @@ action, syscall, arg_cnt, arg_array); va_end(arg_list); - return rc; + return _rc_filter(rc); +} + +/* NOTE - function header comment in include/seccomp.h */ +API int seccomp_notify_alloc(struct seccomp_notif **req, + struct seccomp_notif_resp **resp) +{ + /* force a runtime api level detection */ + _seccomp_api_update(); + + return _rc_filter(sys_notify_alloc(req, resp)); +} + +/* NOTE - function header comment in include/seccomp.h */ +API void seccomp_notify_free(struct seccomp_notif *req, + struct seccomp_notif_resp *resp) +{ + if (req) + free(req); + if (resp) + free(resp); +} + +/* NOTE - function header comment in include/seccomp.h */ +API int seccomp_notify_receive(int fd, struct seccomp_notif *req) +{ + return _rc_filter(sys_notify_receive(fd, req)); +} + +/* NOTE - function header comment in include/seccomp.h */ +API int seccomp_notify_respond(int fd, struct seccomp_notif_resp *resp) +{ + return _rc_filter(sys_notify_respond(fd, resp)); +} + +/* NOTE - function header comment in include/seccomp.h */ +API int seccomp_notify_id_valid(int fd, uint64_t id) +{ + /* force a runtime api level detection */ + _seccomp_api_update(); + + return _rc_filter(sys_notify_id_valid(fd, id)); +} + +/* NOTE - function header comment in include/seccomp.h */ +API int seccomp_notify_fd(const scmp_filter_ctx ctx) +{ + /* NOTE: for historical reasons, and possibly future use, we require a + * valid filter context even though we don't actual use it here; the + * api update is also not strictly necessary, but keep it for now */ + + /* force a runtime api level detection */ + _seccomp_api_update(); + + if (_ctx_valid(ctx)) + return _rc_filter(-EINVAL); + + return _rc_filter(sys_notify_fd()); } /* NOTE - function header comment in include/seccomp.h */ API int seccomp_export_pfc(const scmp_filter_ctx ctx, int fd) { + int rc; + struct db_filter_col *col; + if (_ctx_valid(ctx)) - return -EINVAL; + return _rc_filter(-EINVAL); + col = (struct db_filter_col *)ctx; - return gen_pfc_generate((struct db_filter_col *)ctx, fd); + rc = gen_pfc_generate(col, fd); + return _rc_filter_sys(col, rc); } /* NOTE - function header comment in include/seccomp.h */ API int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd) { int rc; + struct db_filter_col *col; struct bpf_program *program; if (_ctx_valid(ctx)) - return -EINVAL; + return _rc_filter(-EINVAL); + col = (struct db_filter_col *)ctx; - program = gen_bpf_generate((struct db_filter_col *)ctx); - if (program == NULL) - return -ENOMEM; + rc = gen_bpf_generate(col, &program); + if (rc < 0) + return _rc_filter(rc); rc = write(fd, program->blks, BPF_PGM_SIZE(program)); gen_bpf_release(program); if (rc < 0) - return -errno; + return _rc_filter_sys(col, -errno); return 0; } diff -Nru libseccomp-2.4.3/src/arch-aarch64-syscalls.c libseccomp-2.5.1/src/arch-aarch64-syscalls.c --- libseccomp-2.4.3/src/arch-aarch64-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-aarch64-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,559 +0,0 @@ -/** - * Enhanced Seccomp AArch64 Syscall Table - * - * Copyright (c) 2014 Red Hat - * Author: Marcin Juszkiewicz - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-aarch64.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def aarch64_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", __PNR__newselect }, - { "_sysctl", __PNR__sysctl }, - { "accept", 202 }, - { "accept4", 242 }, - { "access", __PNR_access }, - { "acct", 89 }, - { "add_key", 217 }, - { "adjtimex", 171 }, - { "afs_syscall", __PNR_afs_syscall }, - { "alarm", __PNR_alarm }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", __PNR_bdflush }, - { "bind", 200 }, - { "bpf", 280 }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 214 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 90 }, - { "capset", 91 }, - { "chdir", 49 }, - { "chmod", __PNR_chmod }, - { "chown", __PNR_chown }, - { "chown32", __PNR_chown32 }, - { "chroot", 51 }, - { "clock_adjtime", 266 }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", 114 }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", 113 }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", 115 }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", 112 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 220 }, - { "clone3", __PNR_clone3 }, - { "close", 57 }, - { "connect", 203 }, - { "copy_file_range", 285 }, - { "creat", __PNR_creat }, - { "create_module", __PNR_create_module }, - { "delete_module", 106 }, - { "dup", 23 }, - { "dup2", __PNR_dup2 }, - { "dup3", 24 }, - { "epoll_create", __PNR_epoll_create }, - { "epoll_create1", 20 }, - { "epoll_ctl", 21 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 22 }, - { "epoll_wait", __PNR_epoll_wait }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", __PNR_eventfd }, - { "eventfd2", 19 }, - { "execve", 221 }, - { "execveat", 281 }, - { "exit", 93 }, - { "exit_group", 94 }, - { "faccessat", 48 }, - { "fadvise64", 223 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", 47 }, - { "fanotify_init", 262 }, - { "fanotify_mark", 263 }, - { "fchdir", 50 }, - { "fchmod", 52 }, - { "fchmodat", 53 }, - { "fchown", 55 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 54 }, - { "fcntl", 25 }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", 83 }, - { "fgetxattr", 10 }, - { "finit_module", 273 }, - { "flistxattr", 13 }, - { "flock", 32 }, - { "fork", __PNR_fork }, - { "fremovexattr", 16 }, - { "fsconfig", 431 }, - { "fsetxattr", 7 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 80 }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstatat64 }, - { "fstatfs", 44 }, - { "fstatfs64", __PNR_fstatfs64 }, - { "fsync", 82 }, - { "ftime", __PNR_ftime }, - { "ftruncate", 46 }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", 98 }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", __PNR_futimesat }, - { "get_kernel_syms", __PNR_get_kernel_syms }, - { "get_mempolicy", 236 }, - { "get_robust_list", 100 }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 168 }, - { "getcwd", 17 }, - { "getdents", __PNR_getdents }, - { "getdents64", 61 }, - { "getegid", 177 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 175 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 176 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 158 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 102 }, - { "getpeername", 205 }, - { "getpgid", 155 }, - { "getpgrp", __PNR_getpgrp }, - { "getpid", 172 }, - { "getpmsg", __PNR_getpmsg }, - { "getppid", 173 }, - { "getpriority", 141 }, - { "getrandom", 278 }, - { "getresgid", 150 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 148 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", __PNR_getrlimit }, - { "getrusage", 165 }, - { "getsid", 156 }, - { "getsockname", 204 }, - { "getsockopt", 209 }, - { "gettid", 178 }, - { "gettimeofday", 169 }, - { "getuid", 174 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 8 }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", 105 }, - { "inotify_add_watch", 27 }, - { "inotify_init", __PNR_inotify_init }, - { "inotify_init1", 26 }, - { "inotify_rm_watch", 28 }, - { "io_cancel", 3 }, - { "io_destroy", 1 }, - { "io_getevents", 4 }, - { "io_pgetevents", 292 }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", 0 }, - { "io_submit", 2 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 29 }, - { "ioperm", __PNR_ioperm }, - { "iopl", __PNR_iopl }, - { "ioprio_get", 31 }, - { "ioprio_set", 30 }, - { "ipc", __PNR_ipc }, - { "kcmp", 272 }, - { "kexec_file_load", 294 }, - { "kexec_load", 104 }, - { "keyctl", 219 }, - { "kill", 129 }, - { "lchown", __PNR_lchown }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 9 }, - { "link", __PNR_link }, - { "linkat", 37 }, - { "listen", 201 }, - { "listxattr", 11 }, - { "llistxattr", 12 }, - { "lock", __PNR_lock }, - { "lookup_dcookie", 18 }, - { "lremovexattr", 15 }, - { "lseek", 62 }, - { "lsetxattr", 6 }, - { "lstat", __PNR_lstat }, - { "lstat64", __PNR_lstat64 }, - { "madvise", 233 }, - { "mbind", 235 }, - { "membarrier", 283 }, - { "memfd_create", 279 }, - { "migrate_pages", 238 }, - { "mincore", 232 }, - { "mkdir", __PNR_mkdir }, - { "mkdirat", 34 }, - { "mknod", __PNR_mknod }, - { "mknodat", 33 }, - { "mlock", 228 }, - { "mlock2", 284 }, - { "mlockall", 230 }, - { "mmap", 222 }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", 40 }, - { "move_mount", 429 }, - { "move_pages", 239 }, - { "mprotect", 226 }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", 185 }, - { "mq_notify", 184 }, - { "mq_open", 180 }, - { "mq_timedreceive", 183 }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", 182 }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", 181 }, - { "mremap", 216 }, - { "msgctl", 187 }, - { "msgget", 186 }, - { "msgrcv", 188 }, - { "msgsnd", 189 }, - { "msync", 227 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 229 }, - { "munlockall", 231 }, - { "munmap", 215 }, - { "name_to_handle_at", 264 }, - { "nanosleep", 101 }, - { "newfstatat", 79 }, - { "nfsservctl", 42 }, - { "nice", __PNR_nice }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", __PNR_open }, - { "open_by_handle_at", 265 }, - { "open_tree", 428 }, - { "openat", 56 }, - { "pause", __PNR_pause }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 241 }, - { "personality", 92 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", __PNR_pipe }, - { "pipe2", 59 }, - { "pivot_root", 41 }, - { "pkey_alloc", 289 }, - { "pkey_free", 290 }, - { "pkey_mprotect", 288 }, - { "poll", __PNR_poll }, - { "ppoll", 73 }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", 167 }, - { "pread64", 67 }, - { "preadv", 69 }, - { "preadv2", 286 }, - { "prlimit64", 261 }, - { "process_vm_readv", 270 }, - { "process_vm_writev", 271 }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", 72 }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", 117 }, - { "putpmsg", __PNR_putpmsg }, - { "pwrite64", 68 }, - { "pwritev", 70 }, - { "pwritev2", 287 }, - { "query_module", __PNR_query_module }, - { "quotactl", 60 }, - { "read", 63 }, - { "readahead", 213 }, - { "readdir", __PNR_readdir }, - { "readlink", __PNR_readlink }, - { "readlinkat", 78 }, - { "readv", 65 }, - { "reboot", 142 }, - { "recv", __PNR_recv }, - { "recvfrom", 207 }, - { "recvmmsg", 243 }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", 212 }, - { "remap_file_pages", 234 }, - { "removexattr", 14 }, - { "rename", __PNR_rename }, - { "renameat", 38 }, - { "renameat2", 276 }, - { "request_key", 218 }, - { "restart_syscall", 128 }, - { "rmdir", __PNR_rmdir }, - { "rseq", 293 }, - { "rt_sigaction", 134 }, - { "rt_sigpending", 136 }, - { "rt_sigprocmask", 135 }, - { "rt_sigqueueinfo", 138 }, - { "rt_sigreturn", 139 }, - { "rt_sigsuspend", 133 }, - { "rt_sigtimedwait", 137 }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", 240 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 125 }, - { "sched_get_priority_min", 126 }, - { "sched_getaffinity", 123 }, - { "sched_getattr", 275 }, - { "sched_getparam", 121 }, - { "sched_getscheduler", 120 }, - { "sched_rr_get_interval", 127 }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", 122 }, - { "sched_setattr", 274 }, - { "sched_setparam", 118 }, - { "sched_setscheduler", 119 }, - { "sched_yield", 124 }, - { "seccomp", 277 }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", 191 }, - { "semget", 190 }, - { "semop", 193 }, - { "semtimedop", 192 }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", __PNR_send }, - { "sendfile", 71 }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", 269 }, - { "sendmsg", 211 }, - { "sendto", 206 }, - { "set_mempolicy", 237 }, - { "set_robust_list", 99 }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", 96 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 162 }, - { "setfsgid", 152 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 151 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 144 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 159 }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", 161 }, - { "setitimer", 103 }, - { "setns", 268 }, - { "setpgid", 154 }, - { "setpriority", 140 }, - { "setregid", 143 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 149 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 147 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 145 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", __PNR_setrlimit }, - { "setsid", 157 }, - { "setsockopt", 208 }, - { "settimeofday", 170 }, - { "setuid", 146 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 5 }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", 196 }, - { "shmctl", 195 }, - { "shmdt", 197 }, - { "shmget", 194 }, - { "shutdown", 210 }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", 132 }, - { "signal", __PNR_signal }, - { "signalfd", __PNR_signalfd }, - { "signalfd4", 74 }, - { "sigpending", __PNR_sigpending }, - { "sigprocmask", __PNR_sigprocmask }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", 198 }, - { "socketcall", __PNR_socketcall }, - { "socketpair", 199 }, - { "splice", 76 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", __PNR_stat }, - { "stat64", __PNR_stat64 }, - { "statfs", 43 }, - { "statfs64", __PNR_statfs64 }, - { "statx", 291 }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 225 }, - { "swapon", 224 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", __PNR_symlink }, - { "symlinkat", 36 }, - { "sync", 81 }, - { "sync_file_range", 84 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 267 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", __PNR_sysfs }, - { "sysinfo", 179 }, - { "syslog", 116 }, - { "sysmips", __PNR_sysmips }, - { "tee", 77 }, - { "tgkill", 131 }, - { "time", __PNR_time }, - { "timer_create", 107 }, - { "timer_delete", 111 }, - { "timer_getoverrun", 109 }, - { "timer_gettime", 108 }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", 110 }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", 85 }, - { "timerfd_gettime", 87 }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", 86 }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", 153 }, - { "tkill", 130 }, - { "truncate", 45 }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", 166 }, - { "umount", __PNR_umount }, - { "umount2", 39 }, - { "uname", 160 }, - { "unlink", __PNR_unlink }, - { "unlinkat", 35 }, - { "unshare", 97 }, - { "uselib", __PNR_uselib }, - { "userfaultfd", 282 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", __PNR_ustat }, - { "utime", __PNR_utime }, - { "utimensat", 88 }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", __PNR_utimes }, - { "vfork", __PNR_vfork }, - { "vhangup", 58 }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 75 }, - { "vserver", __PNR_vserver }, - { "wait4", 260 }, - { "waitid", 95 }, - { "waitpid", __PNR_waitpid }, - { "write", 64 }, - { "writev", 66 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int aarch64_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = aarch64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *aarch64_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = aarch64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *aarch64_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &aarch64_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-aarch64.h libseccomp-2.5.1/src/arch-aarch64.h --- libseccomp-2.4.3/src/arch-aarch64.h 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-aarch64.h 2020-11-17 08:34:38.779027356 +1030 @@ -22,16 +22,8 @@ #ifndef _ARCH_AARCH64_H #define _ARCH_AARCH64_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_aarch64; - -int aarch64_syscall_resolve_name(const char *name); -const char *aarch64_syscall_resolve_num(int num); -const struct arch_syscall_def *aarch64_syscall_iterate(unsigned int spot); +ARCH_DECL(aarch64) #endif diff -Nru libseccomp-2.4.3/src/arch-arm-syscalls.c libseccomp-2.5.1/src/arch-arm-syscalls.c --- libseccomp-2.4.3/src/arch-arm-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-arm-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,570 +0,0 @@ -/** - * Enhanced Seccomp ARM Syscall Table - * - * Copyright (c) 2013 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-arm.h" - -#define __SCMP_NR_OABI_SYSCALL_BASE 0x900000 -#define __SCMP_ARM_NR_BASE 0x0f0000 - -/* NOTE: we currently only support the ARM EABI, more info at the URL below: - * -> http://wiki.embeddedarm.com/wiki/EABI_vs_OABI */ -#if 1 -#define __SCMP_NR_BASE 0 -#else -#define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE -#endif - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def arm_syscall_table[] = { \ - /* NOTE: arm_sync_file_range() and sync_file_range2() share values */ - { "_llseek", (__SCMP_NR_BASE + 140) }, - { "_newselect", (__SCMP_NR_BASE + 142) }, - { "_sysctl", (__SCMP_NR_BASE + 149) }, - { "accept", (__SCMP_NR_BASE + 285) }, - { "accept4", (__SCMP_NR_BASE + 366) }, - { "access", (__SCMP_NR_BASE + 33) }, - { "acct", (__SCMP_NR_BASE + 51) }, - { "add_key", (__SCMP_NR_BASE + 309) }, - { "adjtimex", (__SCMP_NR_BASE + 124) }, - { "afs_syscall", __PNR_afs_syscall }, - { "alarm", __PNR_alarm }, - { "arm_fadvise64_64", (__SCMP_NR_BASE + 270) }, - { "arm_sync_file_range", (__SCMP_NR_BASE + 341) }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", (__SCMP_NR_BASE + 134) }, - { "bind", (__SCMP_NR_BASE + 282) }, - { "bpf", (__SCMP_NR_BASE + 386) }, - { "break", __PNR_break }, - { "breakpoint", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 1)) }, - { "brk", (__SCMP_NR_BASE + 45) }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 2)) }, - { "capget", (__SCMP_NR_BASE + 184) }, - { "capset", (__SCMP_NR_BASE + 185) }, - { "chdir", (__SCMP_NR_BASE + 12) }, - { "chmod", (__SCMP_NR_BASE + 15) }, - { "chown", (__SCMP_NR_BASE + 182) }, - { "chown32", (__SCMP_NR_BASE + 212) }, - { "chroot", (__SCMP_NR_BASE + 61) }, - { "clock_adjtime", (__SCMP_NR_BASE + 372) }, - { "clock_adjtime64", (__SCMP_NR_BASE + 405) }, - { "clock_getres", (__SCMP_NR_BASE + 264) }, - { "clock_getres_time64", (__SCMP_NR_BASE + 406) }, - { "clock_gettime", (__SCMP_NR_BASE + 263) }, - { "clock_gettime64", (__SCMP_NR_BASE + 403) }, - { "clock_nanosleep", (__SCMP_NR_BASE + 265) }, - { "clock_nanosleep_time64", (__SCMP_NR_BASE + 407) }, - { "clock_settime", (__SCMP_NR_BASE + 262) }, - { "clock_settime64", (__SCMP_NR_BASE + 404) }, - { "clone", (__SCMP_NR_BASE + 120) }, - { "clone3", (__SCMP_NR_BASE + 435) }, - { "close", (__SCMP_NR_BASE + 6) }, - { "connect", (__SCMP_NR_BASE + 283) }, - { "copy_file_range", (__SCMP_NR_BASE + 391) }, - { "creat", (__SCMP_NR_BASE + 8) }, - { "create_module", __PNR_create_module }, - { "delete_module", (__SCMP_NR_BASE + 129) }, - { "dup", (__SCMP_NR_BASE + 41) }, - { "dup2", (__SCMP_NR_BASE + 63) }, - { "dup3", (__SCMP_NR_BASE + 358) }, - { "epoll_create", (__SCMP_NR_BASE + 250) }, - { "epoll_create1", (__SCMP_NR_BASE + 357) }, - { "epoll_ctl", (__SCMP_NR_BASE + 251) }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", (__SCMP_NR_BASE + 346) }, - { "epoll_wait", (__SCMP_NR_BASE + 252) }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", (__SCMP_NR_BASE + 351) }, - { "eventfd2", (__SCMP_NR_BASE + 356) }, - { "execve", (__SCMP_NR_BASE + 11) }, - { "execveat", (__SCMP_NR_BASE + 387) }, - { "exit", (__SCMP_NR_BASE + 1) }, - { "exit_group", (__SCMP_NR_BASE + 248) }, - { "faccessat", (__SCMP_NR_BASE + 334) }, - { "fadvise64", __PNR_fadvise64 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", (__SCMP_NR_BASE + 352) }, - { "fanotify_init", (__SCMP_NR_BASE + 367) }, - { "fanotify_mark", (__SCMP_NR_BASE + 368) }, - { "fchdir", (__SCMP_NR_BASE + 133) }, - { "fchmod", (__SCMP_NR_BASE + 94) }, - { "fchmodat", (__SCMP_NR_BASE + 333) }, - { "fchown", (__SCMP_NR_BASE + 95) }, - { "fchown32", (__SCMP_NR_BASE + 207) }, - { "fchownat", (__SCMP_NR_BASE + 325) }, - { "fcntl", (__SCMP_NR_BASE + 55) }, - { "fcntl64", (__SCMP_NR_BASE + 221) }, - { "fdatasync", (__SCMP_NR_BASE + 148) }, - { "fgetxattr", (__SCMP_NR_BASE + 231) }, - { "finit_module", (__SCMP_NR_BASE + 379) }, - { "flistxattr", (__SCMP_NR_BASE + 234) }, - { "flock", (__SCMP_NR_BASE + 143) }, - { "fork", (__SCMP_NR_BASE + 2) }, - { "fremovexattr", (__SCMP_NR_BASE + 237) }, - { "fsconfig", (__SCMP_NR_BASE + 431) }, - { "fsetxattr", (__SCMP_NR_BASE + 228) }, - { "fsmount", (__SCMP_NR_BASE + 432) }, - { "fsopen", (__SCMP_NR_BASE + 430) }, - { "fspick", (__SCMP_NR_BASE + 433) }, - { "fstat", (__SCMP_NR_BASE + 108) }, - { "fstat64", (__SCMP_NR_BASE + 197) }, - { "fstatat64", (__SCMP_NR_BASE + 327) }, - { "fstatfs", (__SCMP_NR_BASE + 100) }, - { "fstatfs64", (__SCMP_NR_BASE + 267) }, - { "fsync", (__SCMP_NR_BASE + 118) }, - { "ftime", __PNR_ftime }, - { "ftruncate", (__SCMP_NR_BASE + 93) }, - { "ftruncate64", (__SCMP_NR_BASE + 194) }, - { "futex", (__SCMP_NR_BASE + 240) }, - { "futex_time64", (__SCMP_NR_BASE + 422) }, - { "futimesat", (__SCMP_NR_BASE + 326) }, - { "get_kernel_syms", __PNR_get_kernel_syms }, - { "get_mempolicy", (__SCMP_NR_BASE + 320) }, - { "get_robust_list", (__SCMP_NR_BASE + 339) }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 6)) }, - { "getcpu", (__SCMP_NR_BASE + 345) }, - { "getcwd", (__SCMP_NR_BASE + 183) }, - { "getdents", (__SCMP_NR_BASE + 141) }, - { "getdents64", (__SCMP_NR_BASE + 217) }, - { "getegid", (__SCMP_NR_BASE + 50) }, - { "getegid32", (__SCMP_NR_BASE + 202) }, - { "geteuid", (__SCMP_NR_BASE + 49) }, - { "geteuid32", (__SCMP_NR_BASE + 201) }, - { "getgid", (__SCMP_NR_BASE + 47) }, - { "getgid32", (__SCMP_NR_BASE + 200) }, - { "getgroups", (__SCMP_NR_BASE + 80) }, - { "getgroups32", (__SCMP_NR_BASE + 205) }, - { "getitimer", (__SCMP_NR_BASE + 105) }, - { "getpeername", (__SCMP_NR_BASE + 287) }, - { "getpgid", (__SCMP_NR_BASE + 132) }, - { "getpgrp", (__SCMP_NR_BASE + 65) }, - { "getpid", (__SCMP_NR_BASE + 20) }, - { "getpmsg", __PNR_getpmsg }, - { "getppid", (__SCMP_NR_BASE + 64) }, - { "getpriority", (__SCMP_NR_BASE + 96) }, - { "getrandom", (__SCMP_NR_BASE + 384) }, - { "getresgid", (__SCMP_NR_BASE + 171) }, - { "getresgid32", (__SCMP_NR_BASE + 211) }, - { "getresuid", (__SCMP_NR_BASE + 165) }, - { "getresuid32", (__SCMP_NR_BASE + 209) }, - { "getrlimit", __PNR_getrlimit }, - { "getrusage", (__SCMP_NR_BASE + 77) }, - { "getsid", (__SCMP_NR_BASE + 147) }, - { "getsockname", (__SCMP_NR_BASE + 286) }, - { "getsockopt", (__SCMP_NR_BASE + 295) }, - { "gettid", (__SCMP_NR_BASE + 224) }, - { "gettimeofday", (__SCMP_NR_BASE + 78) }, - { "getuid", (__SCMP_NR_BASE + 24) }, - { "getuid32", (__SCMP_NR_BASE + 199) }, - { "getxattr", (__SCMP_NR_BASE + 229) }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", (__SCMP_NR_BASE + 128) }, - { "inotify_add_watch", (__SCMP_NR_BASE + 317) }, - { "inotify_init", (__SCMP_NR_BASE + 316) }, - { "inotify_init1", (__SCMP_NR_BASE + 360) }, - { "inotify_rm_watch", (__SCMP_NR_BASE + 318) }, - { "io_cancel", (__SCMP_NR_BASE + 247) }, - { "io_destroy", (__SCMP_NR_BASE + 244) }, - { "io_getevents", (__SCMP_NR_BASE + 245) }, - { "io_pgetevents", (__SCMP_NR_BASE + 399) }, - { "io_pgetevents_time64", (__SCMP_NR_BASE + 416) }, - { "io_setup", (__SCMP_NR_BASE + 243) }, - { "io_submit", (__SCMP_NR_BASE + 246) }, - { "io_uring_setup", (__SCMP_NR_BASE + 425) }, - { "io_uring_enter", (__SCMP_NR_BASE + 426) }, - { "io_uring_register", (__SCMP_NR_BASE + 427) }, - { "ioctl", (__SCMP_NR_BASE + 54) }, - { "ioperm", __PNR_ioperm }, - { "iopl", __PNR_iopl }, - { "ioprio_get", (__SCMP_NR_BASE + 315) }, - { "ioprio_set", (__SCMP_NR_BASE + 314) }, - { "ipc", __PNR_ipc }, - { "kcmp", (__SCMP_NR_BASE + 378) }, - { "kexec_file_load", (__SCMP_NR_BASE + 401) }, - { "kexec_load", (__SCMP_NR_BASE + 347) }, - { "keyctl", (__SCMP_NR_BASE + 311) }, - { "kill", (__SCMP_NR_BASE + 37) }, - { "lchown", (__SCMP_NR_BASE + 16) }, - { "lchown32", (__SCMP_NR_BASE + 198) }, - { "lgetxattr", (__SCMP_NR_BASE + 230) }, - { "link", (__SCMP_NR_BASE + 9) }, - { "linkat", (__SCMP_NR_BASE + 330) }, - { "listen", (__SCMP_NR_BASE + 284) }, - { "listxattr", (__SCMP_NR_BASE + 232) }, - { "llistxattr", (__SCMP_NR_BASE + 233) }, - { "lock", __PNR_lock }, - { "lookup_dcookie", (__SCMP_NR_BASE + 249) }, - { "lremovexattr", (__SCMP_NR_BASE + 236) }, - { "lseek", (__SCMP_NR_BASE + 19) }, - { "lsetxattr", (__SCMP_NR_BASE + 227) }, - { "lstat", (__SCMP_NR_BASE + 107) }, - { "lstat64", (__SCMP_NR_BASE + 196) }, - { "madvise", (__SCMP_NR_BASE + 220) }, - { "mbind", (__SCMP_NR_BASE + 319) }, - { "membarrier", (__SCMP_NR_BASE + 389) }, - { "memfd_create", (__SCMP_NR_BASE + 385) }, - { "migrate_pages", (__SCMP_NR_BASE + 400) }, - { "mincore", (__SCMP_NR_BASE + 219) }, - { "mkdir", (__SCMP_NR_BASE + 39) }, - { "mkdirat", (__SCMP_NR_BASE + 323) }, - { "mknod", (__SCMP_NR_BASE + 14) }, - { "mknodat", (__SCMP_NR_BASE + 324) }, - { "mlock", (__SCMP_NR_BASE + 150) }, - { "mlock2", (__SCMP_NR_BASE + 390) }, - { "mlockall", (__SCMP_NR_BASE + 152) }, - { "mmap", __PNR_mmap }, - { "mmap2", (__SCMP_NR_BASE + 192) }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", (__SCMP_NR_BASE + 21) }, - { "move_mount", (__SCMP_NR_BASE + 429) }, - { "move_pages", (__SCMP_NR_BASE + 344) }, - { "mprotect", (__SCMP_NR_BASE + 125) }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", (__SCMP_NR_BASE + 279) }, - { "mq_notify", (__SCMP_NR_BASE + 278) }, - { "mq_open", (__SCMP_NR_BASE + 274) }, - { "mq_timedreceive", (__SCMP_NR_BASE + 277) }, - { "mq_timedreceive_time64", (__SCMP_NR_BASE + 419) }, - { "mq_timedsend", (__SCMP_NR_BASE + 276) }, - { "mq_timedsend_time64", (__SCMP_NR_BASE + 418) }, - { "mq_unlink", (__SCMP_NR_BASE + 275) }, - { "mremap", (__SCMP_NR_BASE + 163) }, - { "msgctl", (__SCMP_NR_BASE + 304) }, - { "msgget", (__SCMP_NR_BASE + 303) }, - { "msgrcv", (__SCMP_NR_BASE + 302) }, - { "msgsnd", (__SCMP_NR_BASE + 301) }, - { "msync", (__SCMP_NR_BASE + 144) }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", (__SCMP_NR_BASE + 151) }, - { "munlockall", (__SCMP_NR_BASE + 153) }, - { "munmap", (__SCMP_NR_BASE + 91) }, - { "name_to_handle_at", (__SCMP_NR_BASE + 370) }, - { "nanosleep", (__SCMP_NR_BASE + 162) }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", (__SCMP_NR_BASE + 169) }, - { "nice", (__SCMP_NR_BASE + 34) }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", (__SCMP_NR_BASE + 5) }, - { "open_by_handle_at", (__SCMP_NR_BASE + 371) }, - { "open_tree", (__SCMP_NR_BASE + 428) }, - { "openat", (__SCMP_NR_BASE + 322) }, - { "pause", (__SCMP_NR_BASE + 29) }, - { "pciconfig_iobase", (__SCMP_NR_BASE + 271) }, - { "pciconfig_read", (__SCMP_NR_BASE + 272) }, - { "pciconfig_write", (__SCMP_NR_BASE + 273) }, - { "perf_event_open", (__SCMP_NR_BASE + 364) }, - { "personality", (__SCMP_NR_BASE + 136) }, - { "pidfd_open", (__SCMP_NR_BASE + 434) }, - { "pidfd_send_signal", (__SCMP_NR_BASE + 424) }, - { "pipe", (__SCMP_NR_BASE + 42) }, - { "pipe2", (__SCMP_NR_BASE + 359) }, - { "pivot_root", (__SCMP_NR_BASE + 218) }, - { "pkey_alloc", (__SCMP_NR_BASE + 395) }, - { "pkey_free", (__SCMP_NR_BASE + 396) }, - { "pkey_mprotect", (__SCMP_NR_BASE + 394) }, - { "poll", (__SCMP_NR_BASE + 168) }, - { "ppoll", (__SCMP_NR_BASE + 336) }, - { "ppoll_time64", (__SCMP_NR_BASE + 414) }, - { "prctl", (__SCMP_NR_BASE + 172) }, - { "pread64", (__SCMP_NR_BASE + 180) }, - { "preadv", (__SCMP_NR_BASE + 361) }, - { "preadv2", (__SCMP_NR_BASE + 392) }, - { "prlimit64", (__SCMP_NR_BASE + 369) }, - { "process_vm_readv", (__SCMP_NR_BASE + 376) }, - { "process_vm_writev", (__SCMP_NR_BASE + 377) }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", (__SCMP_NR_BASE + 335) }, - { "pselect6_time64", (__SCMP_NR_BASE + 413) }, - { "ptrace", (__SCMP_NR_BASE + 26) }, - { "putpmsg", __PNR_putpmsg }, - { "pwrite64", (__SCMP_NR_BASE + 181) }, - { "pwritev", (__SCMP_NR_BASE + 362) }, - { "pwritev2", (__SCMP_NR_BASE + 393) }, - { "query_module", __PNR_query_module }, - { "quotactl", (__SCMP_NR_BASE + 131) }, - { "read", (__SCMP_NR_BASE + 3) }, - { "readahead", (__SCMP_NR_BASE + 225) }, - { "readdir", __PNR_readdir }, - { "readlink", (__SCMP_NR_BASE + 85) }, - { "readlinkat", (__SCMP_NR_BASE + 332) }, - { "readv", (__SCMP_NR_BASE + 145) }, - { "reboot", (__SCMP_NR_BASE + 88) }, - { "recv", (__SCMP_NR_BASE + 291) }, - { "recvfrom", (__SCMP_NR_BASE + 292) }, - { "recvmmsg", (__SCMP_NR_BASE + 365) }, - { "recvmmsg_time64", (__SCMP_NR_BASE + 417) }, - { "recvmsg", (__SCMP_NR_BASE + 297) }, - { "remap_file_pages", (__SCMP_NR_BASE + 253) }, - { "removexattr", (__SCMP_NR_BASE + 235) }, - { "rename", (__SCMP_NR_BASE + 38) }, - { "renameat", (__SCMP_NR_BASE + 329) }, - { "renameat2", (__SCMP_NR_BASE + 382) }, - { "request_key", (__SCMP_NR_BASE + 310) }, - { "restart_syscall", (__SCMP_NR_BASE + 0) }, - { "rmdir", (__SCMP_NR_BASE + 40) }, - { "rseq", (__SCMP_NR_BASE + 398) }, - { "rt_sigaction", (__SCMP_NR_BASE + 174) }, - { "rt_sigpending", (__SCMP_NR_BASE + 176) }, - { "rt_sigprocmask", (__SCMP_NR_BASE + 175) }, - { "rt_sigqueueinfo", (__SCMP_NR_BASE + 178) }, - { "rt_sigreturn", (__SCMP_NR_BASE + 173) }, - { "rt_sigsuspend", (__SCMP_NR_BASE + 179) }, - { "rt_sigtimedwait", (__SCMP_NR_BASE + 177) }, - { "rt_sigtimedwait_time64", (__SCMP_NR_BASE + 421) }, - { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 363) }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", (__SCMP_NR_BASE + 159) }, - { "sched_get_priority_min", (__SCMP_NR_BASE + 160) }, - { "sched_getaffinity", (__SCMP_NR_BASE + 242) }, - { "sched_getattr", (__SCMP_NR_BASE + 381) }, - { "sched_getparam", (__SCMP_NR_BASE + 155) }, - { "sched_getscheduler", (__SCMP_NR_BASE + 157) }, - { "sched_rr_get_interval", (__SCMP_NR_BASE + 161) }, - { "sched_rr_get_interval_time64", (__SCMP_NR_BASE + 423) }, - { "sched_setaffinity", (__SCMP_NR_BASE + 241) }, - { "sched_setattr", (__SCMP_NR_BASE + 380) }, - { "sched_setparam", (__SCMP_NR_BASE + 154) }, - { "sched_setscheduler", (__SCMP_NR_BASE + 156) }, - { "sched_yield", (__SCMP_NR_BASE + 158) }, - { "seccomp", (__SCMP_NR_BASE + 383) }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", (__SCMP_NR_BASE + 300) }, - { "semget", (__SCMP_NR_BASE + 299) }, - { "semop", (__SCMP_NR_BASE + 298) }, - { "semtimedop", (__SCMP_NR_BASE + 312) }, - { "semtimedop_time64", (__SCMP_NR_BASE + 420) }, - { "send", (__SCMP_NR_BASE + 289) }, - { "sendfile", (__SCMP_NR_BASE + 187) }, - { "sendfile64", (__SCMP_NR_BASE + 239) }, - { "sendmmsg", (__SCMP_NR_BASE + 374) }, - { "sendmsg", (__SCMP_NR_BASE + 296) }, - { "sendto", (__SCMP_NR_BASE + 290) }, - { "set_mempolicy", (__SCMP_NR_BASE + 321) }, - { "set_robust_list", (__SCMP_NR_BASE + 338) }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", (__SCMP_NR_BASE + 256) }, - { "set_tls", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 5)) }, - { "setdomainname", (__SCMP_NR_BASE + 121) }, - { "setfsgid", (__SCMP_NR_BASE + 139) }, - { "setfsgid32", (__SCMP_NR_BASE + 216) }, - { "setfsuid", (__SCMP_NR_BASE + 138) }, - { "setfsuid32", (__SCMP_NR_BASE + 215) }, - { "setgid", (__SCMP_NR_BASE + 46) }, - { "setgid32", (__SCMP_NR_BASE + 214) }, - { "setgroups", (__SCMP_NR_BASE + 81) }, - { "setgroups32", (__SCMP_NR_BASE + 206) }, - { "sethostname", (__SCMP_NR_BASE + 74) }, - { "setitimer", (__SCMP_NR_BASE + 104) }, - { "setns", (__SCMP_NR_BASE + 375) }, - { "setpgid", (__SCMP_NR_BASE + 57) }, - { "setpriority", (__SCMP_NR_BASE + 97) }, - { "setregid", (__SCMP_NR_BASE + 71) }, - { "setregid32", (__SCMP_NR_BASE + 204) }, - { "setresgid", (__SCMP_NR_BASE + 170) }, - { "setresgid32", (__SCMP_NR_BASE + 210) }, - { "setresuid", (__SCMP_NR_BASE + 164) }, - { "setresuid32", (__SCMP_NR_BASE + 208) }, - { "setreuid", (__SCMP_NR_BASE + 70) }, - { "setreuid32", (__SCMP_NR_BASE + 203) }, - { "setrlimit", (__SCMP_NR_BASE + 75) }, - { "setsid", (__SCMP_NR_BASE + 66) }, - { "setsockopt", (__SCMP_NR_BASE + 294) }, - { "settimeofday", (__SCMP_NR_BASE + 79) }, - { "setuid", (__SCMP_NR_BASE + 23) }, - { "setuid32", (__SCMP_NR_BASE + 213) }, - { "setxattr", (__SCMP_NR_BASE + 226) }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", (__SCMP_NR_BASE + 305) }, - { "shmctl", (__SCMP_NR_BASE + 308) }, - { "shmdt", (__SCMP_NR_BASE + 306) }, - { "shmget", (__SCMP_NR_BASE + 307) }, - { "shutdown", (__SCMP_NR_BASE + 293) }, - { "sigaction", (__SCMP_NR_BASE + 67) }, - { "sigaltstack", (__SCMP_NR_BASE + 186) }, - { "signal", __PNR_signal }, - { "signalfd", (__SCMP_NR_BASE + 349) }, - { "signalfd4", (__SCMP_NR_BASE + 355) }, - { "sigpending", (__SCMP_NR_BASE + 73) }, - { "sigprocmask", (__SCMP_NR_BASE + 126) }, - { "sigreturn", (__SCMP_NR_BASE + 119) }, - { "sigsuspend", (__SCMP_NR_BASE + 72) }, - { "socket", (__SCMP_NR_BASE + 281) }, - { "socketcall", __PNR_socketcall }, - { "socketpair", (__SCMP_NR_BASE + 288) }, - { "splice", (__SCMP_NR_BASE + 340) }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", (__SCMP_NR_BASE + 106) }, - { "stat64", (__SCMP_NR_BASE + 195) }, - { "statfs", (__SCMP_NR_BASE + 99) }, - { "statfs64", (__SCMP_NR_BASE + 266) }, - { "statx", (__SCMP_NR_BASE + 397) }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", (__SCMP_NR_BASE + 115) }, - { "swapon", (__SCMP_NR_BASE + 87) }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", (__SCMP_NR_BASE + 83) }, - { "symlinkat", (__SCMP_NR_BASE + 331) }, - { "sync", (__SCMP_NR_BASE + 36) }, - { "sync_file_range", __PNR_sync_file_range }, - { "sync_file_range2", (__SCMP_NR_BASE + 341) }, - { "syncfs", (__SCMP_NR_BASE + 373) }, - { "syscall", (__PNR_syscall) }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", (__SCMP_NR_BASE + 135) }, - { "sysinfo", (__SCMP_NR_BASE + 116) }, - { "syslog", (__SCMP_NR_BASE + 103) }, - { "sysmips", __PNR_sysmips }, - { "tee", (__SCMP_NR_BASE + 342) }, - { "tgkill", (__SCMP_NR_BASE + 268) }, - { "time", __PNR_time }, - { "timer_create", (__SCMP_NR_BASE + 257) }, - { "timer_delete", (__SCMP_NR_BASE + 261) }, - { "timer_getoverrun", (__SCMP_NR_BASE + 260) }, - { "timer_gettime", (__SCMP_NR_BASE + 259) }, - { "timer_gettime64", (__SCMP_NR_BASE + 408) }, - { "timer_settime", (__SCMP_NR_BASE + 258) }, - { "timer_settime64", (__SCMP_NR_BASE + 409) }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", (__SCMP_NR_BASE + 350) }, - { "timerfd_gettime", (__SCMP_NR_BASE + 354) }, - { "timerfd_gettime64", (__SCMP_NR_BASE + 410) }, - { "timerfd_settime", (__SCMP_NR_BASE + 353) }, - { "timerfd_settime64", (__SCMP_NR_BASE + 411) }, - { "times", (__SCMP_NR_BASE + 43) }, - { "tkill", (__SCMP_NR_BASE + 238) }, - { "truncate", (__SCMP_NR_BASE + 92) }, - { "truncate64", (__SCMP_NR_BASE + 193) }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", (__SCMP_NR_BASE + 191) }, - { "ulimit", __PNR_ulimit }, - { "umask", (__SCMP_NR_BASE + 60) }, - { "umount", __PNR_umount }, - { "umount2", (__SCMP_NR_BASE + 52) }, - { "uname", (__SCMP_NR_BASE + 122) }, - { "unlink", (__SCMP_NR_BASE + 10) }, - { "unlinkat", (__SCMP_NR_BASE + 328) }, - { "unshare", (__SCMP_NR_BASE + 337) }, - { "uselib", (__SCMP_NR_BASE + 86) }, - { "userfaultfd", (__SCMP_NR_BASE + 388) }, - { "usr26", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 3)) }, - { "usr32", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 4)) }, - { "ustat", (__SCMP_NR_BASE + 62) }, - { "utime", __PNR_utime }, - { "utimensat", (__SCMP_NR_BASE + 348) }, - { "utimensat_time64", (__SCMP_NR_BASE + 412) }, - { "utimes", (__SCMP_NR_BASE + 269) }, - { "vfork", (__SCMP_NR_BASE + 190) }, - { "vhangup", (__SCMP_NR_BASE + 111) }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", (__SCMP_NR_BASE + 343) }, - { "vserver", (__SCMP_NR_BASE + 313) }, - { "wait4", (__SCMP_NR_BASE + 114) }, - { "waitid", (__SCMP_NR_BASE + 280) }, - { "waitpid", __PNR_waitpid }, - { "write", (__SCMP_NR_BASE + 4) }, - { "writev", (__SCMP_NR_BASE + 146) }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int arm_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = arm_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *arm_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = arm_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *arm_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &arm_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-arm.c libseccomp-2.5.1/src/arch-arm.c --- libseccomp-2.4.3/src/arch-arm.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-arm.c 2020-11-17 08:34:38.779027356 +1030 @@ -26,13 +26,62 @@ #include "arch.h" #include "arch-arm.h" +#define __SCMP_NR_OABI_SYSCALL_BASE 0x900000 +#define __SCMP_ARM_NR_BASE 0x0f0000 + +/* NOTE: we currently only support the ARM EABI, more info at the URL below: + * -> http://wiki.embeddedarm.com/wiki/EABI_vs_OABI */ +#if 1 +#define __SCMP_NR_BASE 0 +#else +#define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE +#endif + +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int arm_syscall_resolve_name_munge(const char *name) +{ + int sys; + + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + sys = arm_syscall_resolve_name(name); + if (sys == __NR_SCMP_ERROR || sys < 0) + return sys; + + return (sys | __SCMP_NR_BASE); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *arm_syscall_resolve_num_munge(int num) +{ + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + if (num >= 0) + num &= ~__SCMP_NR_BASE; + return arm_syscall_resolve_num(num); +} + const struct arch_def arch_def_arm = { .token = SCMP_ARCH_ARM, .token_bpf = AUDIT_ARCH_ARM, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = arm_syscall_resolve_name, - .syscall_resolve_num = arm_syscall_resolve_num, + .syscall_resolve_name = arm_syscall_resolve_name_munge, + .syscall_resolve_num = arm_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-arm.h libseccomp-2.5.1/src/arch-arm.h --- libseccomp-2.4.3/src/arch-arm.h 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-arm.h 2020-11-17 08:34:38.779027356 +1030 @@ -22,16 +22,8 @@ #ifndef _ARCH_ARM_H #define _ARCH_ARM_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_arm; - -int arm_syscall_resolve_name(const char *name); -const char *arm_syscall_resolve_num(int num); -const struct arch_syscall_def *arm_syscall_iterate(unsigned int spot); +ARCH_DECL(arm) #endif diff -Nru libseccomp-2.4.3/src/arch-gperf-generate libseccomp-2.5.1/src/arch-gperf-generate --- libseccomp-2.4.3/src/arch-gperf-generate 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/arch-gperf-generate 2020-11-17 08:34:38.779027356 +1030 @@ -0,0 +1,40 @@ +#!/bin/bash + +# NOTE: changes to the arch_syscall_table struct in syscalls.h will affect +# this script/gperf - BEWARE! + +### +# helper functions + +function exit_usage() { + echo "usage: $0 " + exit 1 +} + +### +# main + +# sanity check +[[ ! -r "$1" || ! -r "$2" ]] && exit_usage +sys_csv=$1 +gperf_tmpl=$2 + +sys_csv_tmp=$(mktemp -t generate_syscalls_XXXXXX) + +# filter and prepare the syscall csv file +cat $sys_csv | grep -v '^#' | nl -ba -s, -v0 | \ + sed -e 's/^[[:space:]]\+\([0-9]\+\),\([^,]\+\),\(.*\)/\2,\1,\3/' \ + -e ':repeat; {s|\([^,]\+\)\(.*\)[^_]PNR|\1\2,__PNR_\1|g;}; t repeat' \ + > $sys_csv_tmp +[[ $? -ne 0 ]] && exit 1 + +# create the gperf file +sed -e "/@@SYSCALLS_TABLE@@/r $sys_csv_tmp" \ + -e '/@@SYSCALLS_TABLE@@/d' \ + $gperf_tmpl > syscalls.perf +[[ $? -ne 0 ]] && exit 1 + +# cleanup +rm -f $sys_csv_tmp + +exit 0 diff -Nru libseccomp-2.4.3/src/arch-mips-syscalls.c libseccomp-2.5.1/src/arch-mips-syscalls.c --- libseccomp-2.4.3/src/arch-mips-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,562 +0,0 @@ -/** - * Enhanced Seccomp MIPS Specific Code - * - * Copyright (c) 2014 Imagination Technologies Ltd. - * Author: Markos Chandras - * - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-mips.h" - -/* O32 ABI */ -#define __SCMP_NR_BASE 4000 - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def mips_syscall_table[] = { \ - { "_llseek", (__SCMP_NR_BASE + 140) }, - { "_newselect", (__SCMP_NR_BASE + 142) }, - { "_sysctl", (__SCMP_NR_BASE + 153) }, - { "accept", (__SCMP_NR_BASE + 168) }, - { "accept4", (__SCMP_NR_BASE + 334) }, - { "access", (__SCMP_NR_BASE + 33) }, - { "acct", (__SCMP_NR_BASE + 51) }, - { "add_key", (__SCMP_NR_BASE + 280) }, - { "adjtimex", (__SCMP_NR_BASE + 124) }, - { "afs_syscall", __SCMP_NR_BASE + 137 }, - { "alarm", (__SCMP_NR_BASE + 27) }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", (__SCMP_NR_BASE + 134) }, - { "bind", (__SCMP_NR_BASE + 169) }, - { "bpf", (__SCMP_NR_BASE + 355) }, - { "break", __SCMP_NR_BASE + 17 }, - { "breakpoint", __PNR_breakpoint }, - { "brk", (__SCMP_NR_BASE + 45) }, - { "cachectl", (__SCMP_NR_BASE + 148) }, - { "cacheflush", (__SCMP_NR_BASE + 147) }, - { "capget", (__SCMP_NR_BASE + 204) }, - { "capset", (__SCMP_NR_BASE + 205) }, - { "chdir", (__SCMP_NR_BASE + 12) }, - { "chmod", (__SCMP_NR_BASE + 15) }, - { "chown", (__SCMP_NR_BASE + 202) }, - { "chown32", (__PNR_chown32) }, - { "chroot", (__SCMP_NR_BASE + 61) }, - { "clock_adjtime", (__SCMP_NR_BASE + 341) }, - { "clock_adjtime64", (__SCMP_NR_BASE + 405) }, - { "clock_getres", (__SCMP_NR_BASE + 264) }, - { "clock_getres_time64", (__SCMP_NR_BASE + 406) }, - { "clock_gettime", (__SCMP_NR_BASE + 263) }, - { "clock_gettime64", (__SCMP_NR_BASE + 403) }, - { "clock_nanosleep", (__SCMP_NR_BASE + 265) }, - { "clock_nanosleep_time64", (__SCMP_NR_BASE + 407) }, - { "clock_settime", (__SCMP_NR_BASE + 262) }, - { "clock_settime64", (__SCMP_NR_BASE + 404) }, - { "clone", (__SCMP_NR_BASE + 120) }, - { "clone3", (__SCMP_NR_BASE + 435) }, - { "close", (__SCMP_NR_BASE + 6) }, - { "connect", (__SCMP_NR_BASE + 170) }, - { "copy_file_range", (__SCMP_NR_BASE + 360) }, - { "creat", (__SCMP_NR_BASE + 8) }, - { "create_module", __SCMP_NR_BASE + 127 }, - { "delete_module", (__SCMP_NR_BASE + 129) }, - { "dup", (__SCMP_NR_BASE + 41) }, - { "dup2", (__SCMP_NR_BASE + 63) }, - { "dup3", (__SCMP_NR_BASE + 327) }, - { "epoll_create", (__SCMP_NR_BASE + 248) }, - { "epoll_create1", (__SCMP_NR_BASE + 326) }, - { "epoll_ctl", (__SCMP_NR_BASE + 249) }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", (__SCMP_NR_BASE + 313) }, - { "epoll_wait", (__SCMP_NR_BASE + 250) }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", (__SCMP_NR_BASE + 319) }, - { "eventfd2", (__SCMP_NR_BASE + 325) }, - { "execve", (__SCMP_NR_BASE + 11) }, - { "execveat", (__SCMP_NR_BASE + 356) }, - { "exit", (__SCMP_NR_BASE + 1) }, - { "exit_group", (__SCMP_NR_BASE + 246) }, - { "faccessat", (__SCMP_NR_BASE + 300) }, - { "fadvise64", __SCMP_NR_BASE + 254 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", (__SCMP_NR_BASE + 320) }, - { "fanotify_init", (__SCMP_NR_BASE + 336) }, - { "fanotify_mark", (__SCMP_NR_BASE + 337) }, - { "fchdir", (__SCMP_NR_BASE + 133) }, - { "fchmod", (__SCMP_NR_BASE + 94) }, - { "fchmodat", (__SCMP_NR_BASE + 299) }, - { "fchown", (__SCMP_NR_BASE + 95) }, - { "fchown32", (__PNR_fchown32) }, - { "fchownat", (__SCMP_NR_BASE + 291) }, - { "fcntl", (__SCMP_NR_BASE + 55) }, - { "fcntl64", (__SCMP_NR_BASE + 220) }, - { "fdatasync", (__SCMP_NR_BASE + 152) }, - { "fgetxattr", (__SCMP_NR_BASE + 229) }, - { "finit_module", (__SCMP_NR_BASE + 348) }, - { "flistxattr", (__SCMP_NR_BASE + 232) }, - { "flock", (__SCMP_NR_BASE + 143) }, - { "fork", (__SCMP_NR_BASE + 2) }, - { "fremovexattr", (__SCMP_NR_BASE + 235) }, - { "fsconfig", (__SCMP_NR_BASE + 431) }, - { "fsetxattr", (__SCMP_NR_BASE + 226) }, - { "fsmount", (__SCMP_NR_BASE + 432) }, - { "fsopen", (__SCMP_NR_BASE + 430) }, - { "fspick", (__SCMP_NR_BASE + 433) }, - { "fstat", (__SCMP_NR_BASE + 108) }, - { "fstat64", (__SCMP_NR_BASE + 215) }, - { "fstatat64", (__SCMP_NR_BASE + 293) }, - { "fstatfs", (__SCMP_NR_BASE + 100) }, - { "fstatfs64", (__SCMP_NR_BASE + 256) }, - { "fsync", (__SCMP_NR_BASE + 118) }, - { "ftime", (__SCMP_NR_BASE + 35) }, - { "ftruncate", (__SCMP_NR_BASE + 93) }, - { "ftruncate64", (__SCMP_NR_BASE + 212) }, - { "futex", (__SCMP_NR_BASE + 238) }, - { "futex_time64", (__SCMP_NR_BASE + 422) }, - { "futimesat", (__SCMP_NR_BASE + 292) }, - { "get_kernel_syms", (__SCMP_NR_BASE + 130) }, - { "get_mempolicy", (__SCMP_NR_BASE + 269) }, - { "get_robust_list", (__SCMP_NR_BASE + 310) }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", (__SCMP_NR_BASE + 312) }, - { "getcwd", (__SCMP_NR_BASE + 203) }, - { "getdents", (__SCMP_NR_BASE + 141) }, - { "getdents64", (__SCMP_NR_BASE + 219) }, - { "getegid", (__SCMP_NR_BASE + 50) }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", (__SCMP_NR_BASE + 49) }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", (__SCMP_NR_BASE + 47) }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", (__SCMP_NR_BASE + 80) }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", (__SCMP_NR_BASE + 105) }, - { "getpeername", (__SCMP_NR_BASE + 171) }, - { "getpgid", (__SCMP_NR_BASE + 132) }, - { "getpgrp", (__SCMP_NR_BASE + 65) }, - { "getpid", (__SCMP_NR_BASE + 20) }, - { "getpmsg", (__SCMP_NR_BASE + 208) }, - { "getppid", (__SCMP_NR_BASE + 64) }, - { "getpriority", (__SCMP_NR_BASE + 96) }, - { "getrandom", (__SCMP_NR_BASE + 353) }, - { "getresgid", (__SCMP_NR_BASE + 191) }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", (__SCMP_NR_BASE + 186) }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", (__SCMP_NR_BASE + 76) }, - { "getrusage", (__SCMP_NR_BASE + 77) }, - { "getsid", (__SCMP_NR_BASE + 151) }, - { "getsockname", (__SCMP_NR_BASE + 172) }, - { "getsockopt", (__SCMP_NR_BASE + 173) }, - { "gettid", (__SCMP_NR_BASE + 222) }, - { "gettimeofday", (__SCMP_NR_BASE + 78) }, - { "getuid", (__SCMP_NR_BASE + 24) }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", (__SCMP_NR_BASE + 227) }, - { "gtty", (__SCMP_NR_BASE + 32) }, - { "idle", (__SCMP_NR_BASE + 112) }, - { "init_module", (__SCMP_NR_BASE + 128) }, - { "inotify_add_watch", (__SCMP_NR_BASE + 285) }, - { "inotify_init", (__SCMP_NR_BASE + 284) }, - { "inotify_init1", (__SCMP_NR_BASE + 329) }, - { "inotify_rm_watch", (__SCMP_NR_BASE + 286) }, - { "io_cancel", (__SCMP_NR_BASE + 245) }, - { "io_destroy", (__SCMP_NR_BASE + 242) }, - { "io_getevents", (__SCMP_NR_BASE + 243) }, - { "io_pgetevents", (__SCMP_NR_BASE + 368) }, - { "io_pgetevents_time64", (__SCMP_NR_BASE + 416) }, - { "io_setup", (__SCMP_NR_BASE + 241) }, - { "io_submit", (__SCMP_NR_BASE + 244) }, - { "io_uring_setup", (__SCMP_NR_BASE + 425) }, - { "io_uring_enter", (__SCMP_NR_BASE + 426) }, - { "io_uring_register", (__SCMP_NR_BASE + 427) }, - { "ioctl", (__SCMP_NR_BASE + 54) }, - { "ioperm", (__SCMP_NR_BASE + 101) }, - { "iopl", (__SCMP_NR_BASE + 110) }, - { "ioprio_get", (__SCMP_NR_BASE + 315) }, - { "ioprio_set", (__SCMP_NR_BASE + 314) }, - { "ipc", (__SCMP_NR_BASE + 117) }, - { "kcmp", (__SCMP_NR_BASE + 347) }, - { "kexec_file_load", __PNR_kexec_file_load }, - { "kexec_load", (__SCMP_NR_BASE + 311) }, - { "keyctl", (__SCMP_NR_BASE + 282) }, - { "kill", (__SCMP_NR_BASE + 37) }, - { "lchown", (__SCMP_NR_BASE + 16) }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", (__SCMP_NR_BASE + 228) }, - { "link", (__SCMP_NR_BASE + 9) }, - { "linkat", (__SCMP_NR_BASE + 296) }, - { "listen", (__SCMP_NR_BASE + 174) }, - { "listxattr", (__SCMP_NR_BASE + 230) }, - { "llistxattr", (__SCMP_NR_BASE + 231) }, - { "lock", (__SCMP_NR_BASE + 53) }, - { "lookup_dcookie", (__SCMP_NR_BASE + 247) }, - { "lremovexattr", (__SCMP_NR_BASE + 234) }, - { "lseek", (__SCMP_NR_BASE + 19) }, - { "lsetxattr", (__SCMP_NR_BASE + 225) }, - { "lstat", (__SCMP_NR_BASE + 107) }, - { "lstat64", (__SCMP_NR_BASE + 214) }, - { "madvise", (__SCMP_NR_BASE + 218) }, - { "mbind", (__SCMP_NR_BASE + 268) }, - { "membarrier", (__SCMP_NR_BASE + 358) }, - { "memfd_create", (__SCMP_NR_BASE + 354) }, - { "migrate_pages", (__SCMP_NR_BASE + 287) }, - { "mincore", (__SCMP_NR_BASE + 217) }, - { "mkdir", (__SCMP_NR_BASE + 39) }, - { "mkdirat", (__SCMP_NR_BASE + 289) }, - { "mknod", (__SCMP_NR_BASE + 14) }, - { "mknodat", (__SCMP_NR_BASE + 290) }, - { "mlock", (__SCMP_NR_BASE + 154) }, - { "mlock2", (__SCMP_NR_BASE + 359) }, - { "mlockall", (__SCMP_NR_BASE + 156) }, - { "mmap", (__SCMP_NR_BASE + 90) }, - { "mmap2", (__SCMP_NR_BASE + 210) }, - { "modify_ldt", (__SCMP_NR_BASE + 123) }, - { "mount", (__SCMP_NR_BASE + 21) }, - { "move_mount", (__SCMP_NR_BASE + 429) }, - { "move_pages", (__SCMP_NR_BASE + 308) }, - { "mprotect", (__SCMP_NR_BASE + 125) }, - { "mpx", (__SCMP_NR_BASE + 56) }, - { "mq_getsetattr", (__SCMP_NR_BASE + 276) }, - { "mq_notify", (__SCMP_NR_BASE + 275) }, - { "mq_open", (__SCMP_NR_BASE + 271) }, - { "mq_timedreceive", (__SCMP_NR_BASE + 274) }, - { "mq_timedreceive_time64", (__SCMP_NR_BASE + 419) }, - { "mq_timedsend", (__SCMP_NR_BASE + 273) }, - { "mq_timedsend_time64", (__SCMP_NR_BASE + 418) }, - { "mq_unlink", (__SCMP_NR_BASE + 272) }, - { "mremap", (__SCMP_NR_BASE + 167) }, - { "msgctl", (__SCMP_NR_BASE + 402) }, - { "msgget", (__SCMP_NR_BASE + 399) }, - { "msgrcv", (__SCMP_NR_BASE + 401) }, - { "msgsnd", (__SCMP_NR_BASE + 400) }, - { "msync", (__SCMP_NR_BASE + 144) }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", (__SCMP_NR_BASE + 155) }, - { "munlockall", (__SCMP_NR_BASE + 157) }, - { "munmap", (__SCMP_NR_BASE + 91) }, - { "name_to_handle_at", (__SCMP_NR_BASE + 339) }, - { "nanosleep", (__SCMP_NR_BASE + 166) }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", (__SCMP_NR_BASE + 189) }, - { "nice", (__SCMP_NR_BASE + 34) }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", (__SCMP_NR_BASE + 5) }, - { "open_by_handle_at", (__SCMP_NR_BASE + 340) }, - { "open_tree", (__SCMP_NR_BASE + 428) }, - { "openat", (__SCMP_NR_BASE + 288) }, - { "pause", (__SCMP_NR_BASE + 29) }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", (__SCMP_NR_BASE + 333) }, - { "personality", (__SCMP_NR_BASE + 136) }, - { "pidfd_open", (__SCMP_NR_BASE + 434) }, - { "pidfd_send_signal", (__SCMP_NR_BASE + 424) }, - { "pipe", (__SCMP_NR_BASE + 42) }, - { "pipe2", (__SCMP_NR_BASE + 328) }, - { "pivot_root", (__SCMP_NR_BASE + 216) }, - { "pkey_alloc", (__SCMP_NR_BASE + 364) }, - { "pkey_free", (__SCMP_NR_BASE + 365) }, - { "pkey_mprotect", (__SCMP_NR_BASE + 363) }, - { "poll", (__SCMP_NR_BASE + 188) }, - { "ppoll", (__SCMP_NR_BASE + 302) }, - { "ppoll_time64", (__SCMP_NR_BASE + 414) }, - { "prctl", (__SCMP_NR_BASE + 192) }, - { "pread64", (__SCMP_NR_BASE + 200) }, - { "preadv", (__SCMP_NR_BASE + 330) }, - { "preadv2", (__SCMP_NR_BASE + 361) }, - { "prlimit64", (__SCMP_NR_BASE + 338) }, - { "process_vm_readv", (__SCMP_NR_BASE + 345) }, - { "process_vm_writev", (__SCMP_NR_BASE + 346) }, - { "prof", (__SCMP_NR_BASE + 44) }, - { "profil", (__SCMP_NR_BASE + 98) }, - { "pselect6", (__SCMP_NR_BASE + 301) }, - { "pselect6_time64", (__SCMP_NR_BASE + 413) }, - { "ptrace", (__SCMP_NR_BASE + 26) }, - { "putpmsg", (__SCMP_NR_BASE + 209) }, - { "pwrite64", (__SCMP_NR_BASE + 201) }, - { "pwritev", (__SCMP_NR_BASE + 331) }, - { "pwritev2", (__SCMP_NR_BASE + 362) }, - { "query_module", (__SCMP_NR_BASE + 187) }, - { "quotactl", (__SCMP_NR_BASE + 131) }, - { "read", (__SCMP_NR_BASE + 3) }, - { "readahead", (__SCMP_NR_BASE + 223) }, - { "readdir", (__SCMP_NR_BASE + 89) }, - { "readlink", (__SCMP_NR_BASE + 85) }, - { "readlinkat", (__SCMP_NR_BASE + 298) }, - { "readv", (__SCMP_NR_BASE + 145) }, - { "reboot", (__SCMP_NR_BASE + 88) }, - { "recv", (__SCMP_NR_BASE + 175) }, - { "recvfrom", (__SCMP_NR_BASE + 176) }, - { "recvmmsg", (__SCMP_NR_BASE + 335) }, - { "recvmmsg_time64", (__SCMP_NR_BASE + 417) }, - { "recvmsg", (__SCMP_NR_BASE + 177) }, - { "remap_file_pages", (__SCMP_NR_BASE + 251) }, - { "removexattr", (__SCMP_NR_BASE + 233) }, - { "rename", (__SCMP_NR_BASE + 38) }, - { "renameat", (__SCMP_NR_BASE + 295) }, - { "renameat2", (__SCMP_NR_BASE + 351) }, - { "request_key", (__SCMP_NR_BASE + 281) }, - { "restart_syscall", (__SCMP_NR_BASE + 253) }, - { "rmdir", (__SCMP_NR_BASE + 40) }, - { "rseq", (__SCMP_NR_BASE + 367) }, - { "rt_sigaction", (__SCMP_NR_BASE + 194) }, - { "rt_sigpending", (__SCMP_NR_BASE + 196) }, - { "rt_sigprocmask", (__SCMP_NR_BASE + 195) }, - { "rt_sigqueueinfo", (__SCMP_NR_BASE + 198) }, - { "rt_sigreturn", (__SCMP_NR_BASE + 193) }, - { "rt_sigsuspend", (__SCMP_NR_BASE + 199) }, - { "rt_sigtimedwait", (__SCMP_NR_BASE + 197) }, - { "rt_sigtimedwait_time64", (__SCMP_NR_BASE + 421) }, - { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 332) }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", (__SCMP_NR_BASE + 163) }, - { "sched_get_priority_min", (__SCMP_NR_BASE + 164) }, - { "sched_getaffinity", (__SCMP_NR_BASE + 240) }, - { "sched_getattr", (__SCMP_NR_BASE + 350) }, - { "sched_getparam", (__SCMP_NR_BASE + 159) }, - { "sched_getscheduler", (__SCMP_NR_BASE + 161) }, - { "sched_rr_get_interval", (__SCMP_NR_BASE + 165) }, - { "sched_rr_get_interval_time64", (__SCMP_NR_BASE + 423) }, - { "sched_setaffinity", (__SCMP_NR_BASE + 239) }, - { "sched_setattr", (__SCMP_NR_BASE + 349) }, - { "sched_setparam", (__SCMP_NR_BASE + 158) }, - { "sched_setscheduler", (__SCMP_NR_BASE + 160) }, - { "sched_yield", (__SCMP_NR_BASE + 162) }, - { "seccomp", (__SCMP_NR_BASE + 352) }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", (__SCMP_NR_BASE + 394) }, - { "semget", (__SCMP_NR_BASE + 393) }, - { "semop", __PNR_semop }, - { "semtimedop", __PNR_semtimedop }, - { "semtimedop_time64", (__SCMP_NR_BASE + 420) }, - { "send", (__SCMP_NR_BASE + 178) }, - { "sendfile", (__SCMP_NR_BASE + 207) }, - { "sendfile64", (__SCMP_NR_BASE + 237) }, - { "sendmmsg", (__SCMP_NR_BASE + 343) }, - { "sendmsg", (__SCMP_NR_BASE + 179) }, - { "sendto", (__SCMP_NR_BASE + 180) }, - { "set_mempolicy", (__SCMP_NR_BASE + 270) }, - { "set_robust_list", (__SCMP_NR_BASE + 309) }, - { "set_thread_area", (__SCMP_NR_BASE + 283) }, - { "set_tid_address", (__SCMP_NR_BASE + 252) }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", (__SCMP_NR_BASE + 121) }, - { "setfsgid", (__SCMP_NR_BASE + 139) }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", (__SCMP_NR_BASE + 138) }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", (__SCMP_NR_BASE + 46) }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", (__SCMP_NR_BASE + 81) }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", (__SCMP_NR_BASE + 74) }, - { "setitimer", (__SCMP_NR_BASE + 104) }, - { "setns", (__SCMP_NR_BASE + 344) }, - { "setpgid", (__SCMP_NR_BASE + 57) }, - { "setpriority", (__SCMP_NR_BASE + 97) }, - { "setregid", (__SCMP_NR_BASE + 71) }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", (__SCMP_NR_BASE + 190) }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", (__SCMP_NR_BASE + 185) }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", (__SCMP_NR_BASE + 70) }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", (__SCMP_NR_BASE + 75) }, - { "setsid", (__SCMP_NR_BASE + 66) }, - { "setsockopt", (__SCMP_NR_BASE + 181) }, - { "settimeofday", (__SCMP_NR_BASE + 79) }, - { "setuid", (__SCMP_NR_BASE + 23) }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", (__SCMP_NR_BASE + 224) }, - { "sgetmask", (__SCMP_NR_BASE + 68) }, - { "shmat", (__SCMP_NR_BASE + 397) }, - { "shmctl", (__SCMP_NR_BASE + 396) }, - { "shmdt", (__SCMP_NR_BASE + 398) }, - { "shmget", (__SCMP_NR_BASE + 395) }, - { "shutdown", (__SCMP_NR_BASE + 182) }, - { "sigaction", (__SCMP_NR_BASE + 67) }, - { "sigaltstack", (__SCMP_NR_BASE + 206) }, - { "signal", (__SCMP_NR_BASE + 48) }, - { "signalfd", (__SCMP_NR_BASE + 317) }, - { "signalfd4", (__SCMP_NR_BASE + 324) }, - { "sigpending", (__SCMP_NR_BASE + 73) }, - { "sigprocmask", (__SCMP_NR_BASE + 126) }, - { "sigreturn", (__SCMP_NR_BASE + 119) }, - { "sigsuspend", (__SCMP_NR_BASE + 72) }, - { "socket", (__SCMP_NR_BASE + 183) }, - { "socketcall", (__SCMP_NR_BASE + 102) }, - { "socketpair", (__SCMP_NR_BASE + 184) }, - { "splice", (__SCMP_NR_BASE + 304) }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", (__SCMP_NR_BASE + 69) }, - { "stat", (__SCMP_NR_BASE + 106) }, - { "stat64", (__SCMP_NR_BASE + 213) }, - { "statfs", (__SCMP_NR_BASE + 99) }, - { "statfs64", (__SCMP_NR_BASE + 255) }, - { "statx", (__SCMP_NR_BASE + 366) }, - { "stime", (__SCMP_NR_BASE + 25) }, - { "stty", (__SCMP_NR_BASE + 31) }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", (__SCMP_NR_BASE + 115) }, - { "swapon", (__SCMP_NR_BASE + 87) }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", (__SCMP_NR_BASE + 83) }, - { "symlinkat", (__SCMP_NR_BASE + 297) }, - { "sync", (__SCMP_NR_BASE + 36) }, - { "sync_file_range", (__SCMP_NR_BASE + 305) }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", (__SCMP_NR_BASE + 342) }, - { "syscall", (__SCMP_NR_BASE + 0) }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", (__SCMP_NR_BASE + 135) }, - { "sysinfo", (__SCMP_NR_BASE + 116) }, - { "syslog", (__SCMP_NR_BASE + 103) }, - { "sysmips", (__SCMP_NR_BASE + 149) }, - { "tee", (__SCMP_NR_BASE + 306) }, - { "tgkill", (__SCMP_NR_BASE + 266) }, - { "time", (__SCMP_NR_BASE + 13) }, - { "timer_create", (__SCMP_NR_BASE + 257) }, - { "timer_delete", (__SCMP_NR_BASE + 261) }, - { "timer_getoverrun", (__SCMP_NR_BASE + 260) }, - { "timer_gettime", (__SCMP_NR_BASE + 259) }, - { "timer_gettime64", (__SCMP_NR_BASE + 408) }, - { "timer_settime", (__SCMP_NR_BASE + 258) }, - { "timer_settime64", (__SCMP_NR_BASE + 409) }, - { "timerfd", (__SCMP_NR_BASE + 318) }, - { "timerfd_create", (__SCMP_NR_BASE + 321) }, - { "timerfd_gettime", (__SCMP_NR_BASE + 322) }, - { "timerfd_gettime64", (__SCMP_NR_BASE + 410) }, - { "timerfd_settime", (__SCMP_NR_BASE + 323) }, - { "timerfd_settime64", (__SCMP_NR_BASE + 411) }, - { "times", (__SCMP_NR_BASE + 43) }, - { "tkill", (__SCMP_NR_BASE + 236) }, - { "truncate", (__SCMP_NR_BASE + 92) }, - { "truncate64", (__SCMP_NR_BASE + 211) }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", (__SCMP_NR_BASE + 58) }, - { "umask", (__SCMP_NR_BASE + 60) }, - { "umount", (__SCMP_NR_BASE + 22) }, - { "umount2", (__SCMP_NR_BASE + 52) }, - { "uname", (__SCMP_NR_BASE + 122) }, - { "unlink", (__SCMP_NR_BASE + 10) }, - { "unlinkat", (__SCMP_NR_BASE + 294) }, - { "unshare", (__SCMP_NR_BASE + 303) }, - { "uselib", (__SCMP_NR_BASE + 86) }, - { "userfaultfd", (__SCMP_NR_BASE + 357) }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", (__SCMP_NR_BASE + 62) }, - { "utime", (__SCMP_NR_BASE + 30) }, - { "utimensat", (__SCMP_NR_BASE + 316) }, - { "utimensat_time64", (__SCMP_NR_BASE + 412) }, - { "utimes", (__SCMP_NR_BASE + 267) }, - { "vfork", __PNR_vfork }, - { "vhangup", (__SCMP_NR_BASE + 111) }, - { "vm86", (__SCMP_NR_BASE + 113) }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", (__SCMP_NR_BASE + 307) }, - { "vserver", (__SCMP_NR_BASE + 277) }, - { "wait4", (__SCMP_NR_BASE + 114) }, - { "waitid", (__SCMP_NR_BASE + 278) }, - { "waitpid", (__SCMP_NR_BASE + 7) }, - { "write", (__SCMP_NR_BASE + 4) }, - { "writev", (__SCMP_NR_BASE + 146) }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int mips_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *mips_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *mips_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &mips_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-mips.c libseccomp-2.5.1/src/arch-mips.c --- libseccomp-2.4.3/src/arch-mips.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips.c 2020-11-17 08:34:38.779027356 +1030 @@ -27,13 +27,54 @@ #include "arch.h" #include "arch-mips.h" +/* O32 ABI */ +#define __SCMP_NR_BASE 4000 + +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int mips_syscall_resolve_name_munge(const char *name) +{ + int sys; + + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + sys = mips_syscall_resolve_name(name); + if (sys == __NR_SCMP_ERROR || sys < 0) + return sys; + + return sys + __SCMP_NR_BASE; +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *mips_syscall_resolve_num_munge(int num) +{ + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + if (num >= __SCMP_NR_BASE) + num -= __SCMP_NR_BASE; + return mips_syscall_resolve_num(num); +} + const struct arch_def arch_def_mips = { .token = SCMP_ARCH_MIPS, .token_bpf = AUDIT_ARCH_MIPS, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = mips_syscall_resolve_name, - .syscall_resolve_num = mips_syscall_resolve_num, + .syscall_resolve_name = mips_syscall_resolve_name_munge, + .syscall_resolve_num = mips_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; @@ -43,8 +84,8 @@ .token_bpf = AUDIT_ARCH_MIPSEL, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = mips_syscall_resolve_name, - .syscall_resolve_num = mips_syscall_resolve_num, + .syscall_resolve_name = mips_syscall_resolve_name_munge, + .syscall_resolve_num = mips_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-mips.h libseccomp-2.5.1/src/arch-mips.h --- libseccomp-2.4.3/src/arch-mips.h 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips.h 2020-11-17 08:34:38.779027356 +1030 @@ -23,17 +23,9 @@ #ifndef _ARCH_MIPS_H #define _ARCH_MIPS_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_mips; -extern const struct arch_def arch_def_mipsel; - -int mips_syscall_resolve_name(const char *name); -const char *mips_syscall_resolve_num(int num); -const struct arch_syscall_def *mips_syscall_iterate(unsigned int spot); +ARCH_DECL(mips) +ARCH_DECL(mipsel) #endif diff -Nru libseccomp-2.4.3/src/arch-mips64-syscalls.c libseccomp-2.5.1/src/arch-mips64-syscalls.c --- libseccomp-2.4.3/src/arch-mips64-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,562 +0,0 @@ -/** - * Enhanced Seccomp MIPS64 Specific Code - * - * Copyright (c) 2014 Red Hat - * Author: Paul Moore - * - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-mips64.h" - -/* 64 ABI */ -#define __SCMP_NR_BASE 5000 - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def mips64_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", (__SCMP_NR_BASE + 22) }, - { "_sysctl", (__SCMP_NR_BASE + 152) }, - { "accept", (__SCMP_NR_BASE + 42) }, - { "accept4", (__SCMP_NR_BASE + 293) }, - { "access", (__SCMP_NR_BASE + 20) }, - { "acct", (__SCMP_NR_BASE + 158) }, - { "add_key", (__SCMP_NR_BASE + 239) }, - { "adjtimex", (__SCMP_NR_BASE + 154) }, - { "afs_syscall", (__SCMP_NR_BASE + 176) }, - { "alarm", (__SCMP_NR_BASE + 37) }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", __PNR_bdflush }, - { "bind", (__SCMP_NR_BASE + 48) }, - { "bpf", (__SCMP_NR_BASE + 315) }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", (__SCMP_NR_BASE + 12) }, - { "cachectl", (__SCMP_NR_BASE + 198) }, - { "cacheflush", (__SCMP_NR_BASE + 197) }, - { "capget", (__SCMP_NR_BASE + 123) }, - { "capset", (__SCMP_NR_BASE + 124) }, - { "chdir", (__SCMP_NR_BASE + 78) }, - { "chmod", (__SCMP_NR_BASE + 88) }, - { "chown", (__SCMP_NR_BASE + 90) }, - { "chown32", __PNR_chown32 }, - { "chroot", (__SCMP_NR_BASE + 156) }, - { "clock_adjtime", (__SCMP_NR_BASE + 300) }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", (__SCMP_NR_BASE + 223) }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", (__SCMP_NR_BASE + 222) }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", (__SCMP_NR_BASE + 224) }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", (__SCMP_NR_BASE + 221) }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", (__SCMP_NR_BASE + 55) }, - { "clone3", (__SCMP_NR_BASE + 435) }, - { "close", (__SCMP_NR_BASE + 3) }, - { "connect", (__SCMP_NR_BASE + 41) }, - { "copy_file_range", (__SCMP_NR_BASE + 320) }, - { "creat", (__SCMP_NR_BASE + 83) }, - { "create_module", (__SCMP_NR_BASE + 167) }, - { "delete_module", (__SCMP_NR_BASE + 169) }, - { "dup", (__SCMP_NR_BASE + 31) }, - { "dup2", (__SCMP_NR_BASE + 32) }, - { "dup3", (__SCMP_NR_BASE + 286) }, - { "epoll_create", (__SCMP_NR_BASE + 207) }, - { "epoll_create1", (__SCMP_NR_BASE + 285) }, - { "epoll_ctl", (__SCMP_NR_BASE + 208) }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", (__SCMP_NR_BASE + 272) }, - { "epoll_wait", (__SCMP_NR_BASE + 209) }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", (__SCMP_NR_BASE + 278) }, - { "eventfd2", (__SCMP_NR_BASE + 284) }, - { "execve", (__SCMP_NR_BASE + 57) }, - { "execveat", (__SCMP_NR_BASE + 316) }, - { "exit", (__SCMP_NR_BASE + 58) }, - { "exit_group", (__SCMP_NR_BASE + 205) }, - { "faccessat", (__SCMP_NR_BASE + 259) }, - { "fadvise64", (__SCMP_NR_BASE + 215) }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", (__SCMP_NR_BASE + 279) }, - { "fanotify_init", (__SCMP_NR_BASE + 295) }, - { "fanotify_mark", (__SCMP_NR_BASE + 296) }, - { "fchdir", (__SCMP_NR_BASE + 79) }, - { "fchmod", (__SCMP_NR_BASE + 89) }, - { "fchmodat", (__SCMP_NR_BASE + 258) }, - { "fchown", (__SCMP_NR_BASE + 91) }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", (__SCMP_NR_BASE + 250) }, - { "fcntl", (__SCMP_NR_BASE + 70) }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", (__SCMP_NR_BASE + 73) }, - { "fgetxattr", (__SCMP_NR_BASE + 185) }, - { "finit_module", (__SCMP_NR_BASE + 307) }, - { "flistxattr", (__SCMP_NR_BASE + 188) }, - { "flock", (__SCMP_NR_BASE + 71) }, - { "fork", (__SCMP_NR_BASE + 56) }, - { "fremovexattr", (__SCMP_NR_BASE + 191) }, - { "fsconfig", (__SCMP_NR_BASE + 431) }, - { "fsetxattr", (__SCMP_NR_BASE + 182) }, - { "fsmount", (__SCMP_NR_BASE + 432) }, - { "fsopen", (__SCMP_NR_BASE + 430) }, - { "fspick", (__SCMP_NR_BASE + 433) }, - { "fstat", (__SCMP_NR_BASE + 5) }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstat64 }, - { "fstatfs", (__SCMP_NR_BASE + 135) }, - { "fstatfs64", __PNR_fstatfs64 }, - { "fsync", (__SCMP_NR_BASE + 72) }, - { "ftime", __PNR_ftime }, - { "ftruncate", (__SCMP_NR_BASE + 75) }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", (__SCMP_NR_BASE + 194) }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", (__SCMP_NR_BASE + 251) }, - { "get_kernel_syms", (__SCMP_NR_BASE + 170) }, - { "get_mempolicy", (__SCMP_NR_BASE + 228) }, - { "get_robust_list", (__SCMP_NR_BASE + 269) }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", (__SCMP_NR_BASE + 271) }, - { "getcwd", (__SCMP_NR_BASE + 77) }, - { "getdents", (__SCMP_NR_BASE + 76) }, - { "getdents64", (__SCMP_NR_BASE + 308) }, - { "getegid", (__SCMP_NR_BASE + 106) }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", (__SCMP_NR_BASE + 105) }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", (__SCMP_NR_BASE + 102) }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", (__SCMP_NR_BASE + 113) }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", (__SCMP_NR_BASE + 35) }, - { "getpeername", (__SCMP_NR_BASE + 51) }, - { "getpgid", (__SCMP_NR_BASE + 119) }, - { "getpgrp", (__SCMP_NR_BASE + 109) }, - { "getpid", (__SCMP_NR_BASE + 38) }, - { "getpmsg", (__SCMP_NR_BASE + 174) }, - { "getppid", (__SCMP_NR_BASE + 108) }, - { "getpriority", (__SCMP_NR_BASE + 137) }, - { "getrandom", (__SCMP_NR_BASE + 313) }, - { "getresgid", (__SCMP_NR_BASE + 118) }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", (__SCMP_NR_BASE + 116) }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", (__SCMP_NR_BASE + 95) }, - { "getrusage", (__SCMP_NR_BASE + 96) }, - { "getsid", (__SCMP_NR_BASE + 122) }, - { "getsockname", (__SCMP_NR_BASE + 50) }, - { "getsockopt", (__SCMP_NR_BASE + 54) }, - { "gettid", (__SCMP_NR_BASE + 178) }, - { "gettimeofday", (__SCMP_NR_BASE + 94) }, - { "getuid", (__SCMP_NR_BASE + 100) }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", (__SCMP_NR_BASE + 183) }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", (__SCMP_NR_BASE + 168) }, - { "inotify_add_watch", (__SCMP_NR_BASE + 244) }, - { "inotify_init", (__SCMP_NR_BASE + 243) }, - { "inotify_init1", (__SCMP_NR_BASE + 288) }, - { "inotify_rm_watch", (__SCMP_NR_BASE + 245) }, - { "io_cancel", (__SCMP_NR_BASE + 204) }, - { "io_destroy", (__SCMP_NR_BASE + 201) }, - { "io_getevents", (__SCMP_NR_BASE + 202) }, - { "io_pgetevents", (__SCMP_NR_BASE + 328) }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", (__SCMP_NR_BASE + 200) }, - { "io_submit", (__SCMP_NR_BASE + 203) }, - { "io_uring_setup", (__SCMP_NR_BASE + 425) }, - { "io_uring_enter", (__SCMP_NR_BASE + 426) }, - { "io_uring_register", (__SCMP_NR_BASE + 427) }, - { "ioctl", (__SCMP_NR_BASE + 15) }, - { "ioperm", __PNR_ioperm }, - { "iopl", __PNR_iopl }, - { "ioprio_get", (__SCMP_NR_BASE + 274) }, - { "ioprio_set", (__SCMP_NR_BASE + 273) }, - { "ipc", __PNR_ipc }, - { "kcmp", (__SCMP_NR_BASE + 306) }, - { "kexec_file_load", __PNR_kexec_file_load }, - { "kexec_load", (__SCMP_NR_BASE + 270) }, - { "keyctl", (__SCMP_NR_BASE + 241) }, - { "kill", (__SCMP_NR_BASE + 60) }, - { "lchown", (__SCMP_NR_BASE + 92) }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", (__SCMP_NR_BASE + 184) }, - { "link", (__SCMP_NR_BASE + 84) }, - { "linkat", (__SCMP_NR_BASE + 255) }, - { "listen", (__SCMP_NR_BASE + 49) }, - { "listxattr", (__SCMP_NR_BASE + 186) }, - { "llistxattr", (__SCMP_NR_BASE + 187) }, - { "lock", __PNR_lock }, - { "lookup_dcookie", (__SCMP_NR_BASE + 206) }, - { "lremovexattr", (__SCMP_NR_BASE + 190) }, - { "lseek", (__SCMP_NR_BASE + 8) }, - { "lsetxattr", (__SCMP_NR_BASE + 181) }, - { "lstat", (__SCMP_NR_BASE + 6) }, - { "lstat64", __PNR_lstat64 }, - { "madvise", (__SCMP_NR_BASE + 27) }, - { "mbind", (__SCMP_NR_BASE + 227) }, - { "membarrier", (__SCMP_NR_BASE + 318) }, - { "memfd_create", (__SCMP_NR_BASE + 314) }, - { "migrate_pages", (__SCMP_NR_BASE + 246) }, - { "mincore", (__SCMP_NR_BASE + 26) }, - { "mkdir", (__SCMP_NR_BASE + 81) }, - { "mkdirat", (__SCMP_NR_BASE + 248) }, - { "mknod", (__SCMP_NR_BASE + 131) }, - { "mknodat", (__SCMP_NR_BASE + 249) }, - { "mlock", (__SCMP_NR_BASE + 146) }, - { "mlock2", (__SCMP_NR_BASE + 319) }, - { "mlockall", (__SCMP_NR_BASE + 148) }, - { "mmap", (__SCMP_NR_BASE + 9) }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", (__SCMP_NR_BASE + 160) }, - { "move_mount", (__SCMP_NR_BASE + 429) }, - { "move_pages", (__SCMP_NR_BASE + 267) }, - { "mprotect", (__SCMP_NR_BASE + 10) }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", (__SCMP_NR_BASE + 235) }, - { "mq_notify", (__SCMP_NR_BASE + 234) }, - { "mq_open", (__SCMP_NR_BASE + 230) }, - { "mq_timedreceive", (__SCMP_NR_BASE + 233) }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", (__SCMP_NR_BASE + 232) }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", (__SCMP_NR_BASE + 231) }, - { "mremap", (__SCMP_NR_BASE + 24) }, - { "msgctl", (__SCMP_NR_BASE + 69) }, - { "msgget", (__SCMP_NR_BASE + 66) }, - { "msgrcv", (__SCMP_NR_BASE + 68) }, - { "msgsnd", (__SCMP_NR_BASE + 67) }, - { "msync", (__SCMP_NR_BASE + 25) }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", (__SCMP_NR_BASE + 147) }, - { "munlockall", (__SCMP_NR_BASE + 149) }, - { "munmap", (__SCMP_NR_BASE + 11) }, - { "name_to_handle_at", (__SCMP_NR_BASE + 298) }, - { "nanosleep", (__SCMP_NR_BASE + 34) }, - { "newfstatat", (__SCMP_NR_BASE + 252) }, - { "nfsservctl", (__SCMP_NR_BASE + 173) }, - { "nice", __PNR_nice }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", (__SCMP_NR_BASE + 2) }, - { "open_by_handle_at", (__SCMP_NR_BASE + 299) }, - { "open_tree", (__SCMP_NR_BASE + 428) }, - { "openat", (__SCMP_NR_BASE + 247) }, - { "pause", (__SCMP_NR_BASE + 33) }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", (__SCMP_NR_BASE + 292) }, - { "personality", (__SCMP_NR_BASE + 132) }, - { "pidfd_open", (__SCMP_NR_BASE + 434) }, - { "pidfd_send_signal", (__SCMP_NR_BASE + 424) }, - { "pipe", (__SCMP_NR_BASE + 21) }, - { "pipe2", (__SCMP_NR_BASE + 287) }, - { "pivot_root", (__SCMP_NR_BASE + 151) }, - { "pkey_alloc", (__SCMP_NR_BASE + 324) }, - { "pkey_free", (__SCMP_NR_BASE + 325) }, - { "pkey_mprotect", (__SCMP_NR_BASE + 323) }, - { "poll", (__SCMP_NR_BASE + 7) }, - { "ppoll", (__SCMP_NR_BASE + 261) }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", (__SCMP_NR_BASE + 153) }, - { "pread64", (__SCMP_NR_BASE + 16) }, - { "preadv", (__SCMP_NR_BASE + 289) }, - { "preadv2", (__SCMP_NR_BASE + 321) }, - { "prlimit64", (__SCMP_NR_BASE + 297) }, - { "process_vm_readv", (__SCMP_NR_BASE + 304) }, - { "process_vm_writev", (__SCMP_NR_BASE + 305) }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", (__SCMP_NR_BASE + 260) }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", (__SCMP_NR_BASE + 99) }, - { "putpmsg", (__SCMP_NR_BASE + 175) }, - { "pwrite64", (__SCMP_NR_BASE + 17) }, - { "pwritev", (__SCMP_NR_BASE + 290) }, - { "pwritev2", (__SCMP_NR_BASE + 322) }, - { "query_module", (__SCMP_NR_BASE + 171) }, - { "quotactl", (__SCMP_NR_BASE + 172) }, - { "read", (__SCMP_NR_BASE + 0) }, - { "readahead", (__SCMP_NR_BASE + 179) }, - { "readdir", __PNR_readdir }, - { "readlink", (__SCMP_NR_BASE + 87) }, - { "readlinkat", (__SCMP_NR_BASE + 257) }, - { "readv", (__SCMP_NR_BASE + 18) }, - { "reboot", (__SCMP_NR_BASE + 164) }, - { "recv", __PNR_recv }, - { "recvfrom", (__SCMP_NR_BASE + 44) }, - { "recvmmsg", (__SCMP_NR_BASE + 294) }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", (__SCMP_NR_BASE + 46) }, - { "remap_file_pages", (__SCMP_NR_BASE + 210) }, - { "removexattr", (__SCMP_NR_BASE + 189) }, - { "rename", (__SCMP_NR_BASE + 80) }, - { "renameat", (__SCMP_NR_BASE + 254) }, - { "renameat2", (__SCMP_NR_BASE + 311) }, - { "request_key", (__SCMP_NR_BASE + 240) }, - { "restart_syscall", (__SCMP_NR_BASE + 213) }, - { "rmdir", (__SCMP_NR_BASE + 82) }, - { "rseq", (__SCMP_NR_BASE + 327) }, - { "rt_sigaction", (__SCMP_NR_BASE + 13) }, - { "rt_sigpending", (__SCMP_NR_BASE + 125) }, - { "rt_sigprocmask", (__SCMP_NR_BASE + 14) }, - { "rt_sigqueueinfo", (__SCMP_NR_BASE + 127) }, - { "rt_sigreturn", (__SCMP_NR_BASE + 211) }, - { "rt_sigsuspend", (__SCMP_NR_BASE + 128) }, - { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 291) }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", (__SCMP_NR_BASE + 143) }, - { "sched_get_priority_min", (__SCMP_NR_BASE + 144) }, - { "sched_getaffinity", (__SCMP_NR_BASE + 196) }, - { "sched_getattr", (__SCMP_NR_BASE + 310) }, - { "sched_getparam", (__SCMP_NR_BASE + 140) }, - { "sched_getscheduler", (__SCMP_NR_BASE + 142) }, - { "sched_rr_get_interval", (__SCMP_NR_BASE + 145) }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", (__SCMP_NR_BASE + 195) }, - { "sched_setattr", (__SCMP_NR_BASE + 309) }, - { "sched_setparam", (__SCMP_NR_BASE + 139) }, - { "sched_setscheduler", (__SCMP_NR_BASE + 141) }, - { "sched_yield", (__SCMP_NR_BASE + 23) }, - { "seccomp", (__SCMP_NR_BASE + 312) }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", (__SCMP_NR_BASE + 64) }, - { "semget", (__SCMP_NR_BASE + 62) }, - { "semop", (__SCMP_NR_BASE + 63) }, - { "semtimedop", (__SCMP_NR_BASE + 214) }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", __PNR_send }, - { "sendfile", (__SCMP_NR_BASE + 39) }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", (__SCMP_NR_BASE + 302) }, - { "sendmsg", (__SCMP_NR_BASE + 45) }, - { "sendto", (__SCMP_NR_BASE + 43) }, - { "set_mempolicy", (__SCMP_NR_BASE + 229) }, - { "set_robust_list", (__SCMP_NR_BASE + 268) }, - { "set_thread_area", (__SCMP_NR_BASE + 242) }, - { "set_tid_address", (__SCMP_NR_BASE + 212) }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", (__SCMP_NR_BASE + 166) }, - { "setfsgid", (__SCMP_NR_BASE + 121) }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", (__SCMP_NR_BASE + 120) }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", (__SCMP_NR_BASE + 104) }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", (__SCMP_NR_BASE + 114) }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", (__SCMP_NR_BASE + 165) }, - { "setitimer", (__SCMP_NR_BASE + 36) }, - { "setns", (__SCMP_NR_BASE + 303) }, - { "setpgid", (__SCMP_NR_BASE + 107) }, - { "setpriority", (__SCMP_NR_BASE + 138) }, - { "setregid", (__SCMP_NR_BASE + 112) }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", (__SCMP_NR_BASE + 117) }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", (__SCMP_NR_BASE + 115) }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", (__SCMP_NR_BASE + 111) }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", (__SCMP_NR_BASE + 155) }, - { "setsid", (__SCMP_NR_BASE + 110) }, - { "setsockopt", (__SCMP_NR_BASE + 53) }, - { "settimeofday", (__SCMP_NR_BASE + 159) }, - { "setuid", (__SCMP_NR_BASE + 103) }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", (__SCMP_NR_BASE + 180) }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", (__SCMP_NR_BASE + 29) }, - { "shmctl", (__SCMP_NR_BASE + 30) }, - { "shmdt", (__SCMP_NR_BASE + 65) }, - { "shmget", (__SCMP_NR_BASE + 28) }, - { "shutdown", (__SCMP_NR_BASE + 47) }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", (__SCMP_NR_BASE + 129) }, - { "signal", __PNR_signal }, - { "signalfd", (__SCMP_NR_BASE + 276) }, - { "signalfd4", (__SCMP_NR_BASE + 283) }, - { "sigpending", __PNR_sigpending }, - { "sigprocmask", __PNR_sigprocmask }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", (__SCMP_NR_BASE + 40) }, - { "socketcall", __PNR_socketcall }, - { "socketpair", (__SCMP_NR_BASE + 52) }, - { "splice", (__SCMP_NR_BASE + 263) }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", (__SCMP_NR_BASE + 4) }, - { "stat64", __PNR_stat64 }, - { "statfs", (__SCMP_NR_BASE + 134) }, - { "statfs64", __PNR_statfs64 }, - { "statx", (__SCMP_NR_BASE + 326) }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", (__SCMP_NR_BASE + 163) }, - { "swapon", (__SCMP_NR_BASE + 162) }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", (__SCMP_NR_BASE + 86) }, - { "symlinkat", (__SCMP_NR_BASE + 256) }, - { "sync", (__SCMP_NR_BASE + 157) }, - { "sync_file_range", (__SCMP_NR_BASE + 264) }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", (__SCMP_NR_BASE + 301) }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", (__SCMP_NR_BASE + 136) }, - { "sysinfo", (__SCMP_NR_BASE + 97) }, - { "syslog", (__SCMP_NR_BASE + 101) }, - { "sysmips", (__SCMP_NR_BASE + 199) }, - { "tee", (__SCMP_NR_BASE + 265) }, - { "tgkill", (__SCMP_NR_BASE + 225) }, - { "time", __PNR_time }, - { "timer_create", (__SCMP_NR_BASE + 216) }, - { "timer_delete", (__SCMP_NR_BASE + 220) }, - { "timer_getoverrun", (__SCMP_NR_BASE + 219) }, - { "timer_gettime", (__SCMP_NR_BASE + 218) }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", (__SCMP_NR_BASE + 217) }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", (__SCMP_NR_BASE + 277) }, - { "timerfd_create", (__SCMP_NR_BASE + 280) }, - { "timerfd_gettime", (__SCMP_NR_BASE + 281) }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", (__SCMP_NR_BASE + 282) }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", (__SCMP_NR_BASE + 98) }, - { "tkill", (__SCMP_NR_BASE + 192) }, - { "truncate", (__SCMP_NR_BASE + 74) }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", (__SCMP_NR_BASE + 93) }, - { "umount", __PNR_umount }, - { "umount2", (__SCMP_NR_BASE + 161) }, - { "uname", (__SCMP_NR_BASE + 61) }, - { "unlink", (__SCMP_NR_BASE + 85) }, - { "unlinkat", (__SCMP_NR_BASE + 253) }, - { "unshare", (__SCMP_NR_BASE + 262) }, - { "uselib", __PNR_uselib }, - { "userfaultfd", (__SCMP_NR_BASE + 317) }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", (__SCMP_NR_BASE + 133) }, - { "utime", (__SCMP_NR_BASE + 130) }, - { "utimensat", (__SCMP_NR_BASE + 275) }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", (__SCMP_NR_BASE + 226) }, - { "vfork", __PNR_vfork }, - { "vhangup", (__SCMP_NR_BASE + 150) }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", (__SCMP_NR_BASE + 266) }, - { "vserver", (__SCMP_NR_BASE + 236) }, - { "wait4", (__SCMP_NR_BASE + 59) }, - { "waitid", (__SCMP_NR_BASE + 237) }, - { "waitpid", __PNR_waitpid }, - { "write", (__SCMP_NR_BASE + 1) }, - { "writev", (__SCMP_NR_BASE + 19) }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int mips64_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *mips64_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *mips64_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &mips64_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-mips64.c libseccomp-2.5.1/src/arch-mips64.c --- libseccomp-2.4.3/src/arch-mips64.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64.c 2020-11-17 08:34:38.779027356 +1030 @@ -25,13 +25,54 @@ #include "arch.h" #include "arch-mips64.h" +/* 64 ABI */ +#define __SCMP_NR_BASE 5000 + +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int mips64_syscall_resolve_name_munge(const char *name) +{ + int sys; + + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + sys = mips64_syscall_resolve_name(name); + if (sys == __NR_SCMP_ERROR || sys < 0) + return sys; + + return sys + __SCMP_NR_BASE; +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *mips64_syscall_resolve_num_munge(int num) +{ + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + if (num >= __SCMP_NR_BASE) + num -= __SCMP_NR_BASE; + return mips64_syscall_resolve_num(num); +} + const struct arch_def arch_def_mips64 = { .token = SCMP_ARCH_MIPS64, .token_bpf = AUDIT_ARCH_MIPS64, .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = mips64_syscall_resolve_name, - .syscall_resolve_num = mips64_syscall_resolve_num, + .syscall_resolve_name = mips64_syscall_resolve_name_munge, + .syscall_resolve_num = mips64_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; @@ -41,8 +82,8 @@ .token_bpf = AUDIT_ARCH_MIPSEL64, .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = mips64_syscall_resolve_name, - .syscall_resolve_num = mips64_syscall_resolve_num, + .syscall_resolve_name = mips64_syscall_resolve_name_munge, + .syscall_resolve_num = mips64_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-mips64.h libseccomp-2.5.1/src/arch-mips64.h --- libseccomp-2.4.3/src/arch-mips64.h 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64.h 2020-11-17 08:34:38.779027356 +1030 @@ -23,17 +23,9 @@ #ifndef _ARCH_MIPS64_H #define _ARCH_MIPS64_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_mips64; -extern const struct arch_def arch_def_mipsel64; - -int mips64_syscall_resolve_name(const char *name); -const char *mips64_syscall_resolve_num(int num); -const struct arch_syscall_def *mips64_syscall_iterate(unsigned int spot); +ARCH_DECL(mips64) +ARCH_DECL(mipsel64) -#endif \ No newline at end of file +#endif diff -Nru libseccomp-2.4.3/src/arch-mips64n32-syscalls.c libseccomp-2.5.1/src/arch-mips64n32-syscalls.c --- libseccomp-2.4.3/src/arch-mips64n32-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64n32-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,562 +0,0 @@ -/** - * Enhanced Seccomp MIPS Specific Code - * - * Copyright (c) 2014 Red Hat - * Author: Paul Moore - * - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-mips64n32.h" - -/* N32 ABI */ -#define __SCMP_NR_BASE 6000 - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def mips64n32_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", (__SCMP_NR_BASE + 22) }, - { "_sysctl", (__SCMP_NR_BASE + 152) }, - { "accept", (__SCMP_NR_BASE + 42) }, - { "accept4", (__SCMP_NR_BASE + 297) }, - { "access", (__SCMP_NR_BASE + 20) }, - { "acct", (__SCMP_NR_BASE + 158) }, - { "add_key", (__SCMP_NR_BASE + 243) }, - { "adjtimex", (__SCMP_NR_BASE + 154) }, - { "afs_syscall", (__SCMP_NR_BASE + 176) }, - { "alarm", (__SCMP_NR_BASE + 37) }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", __PNR_bdflush }, - { "bind", (__SCMP_NR_BASE + 48) }, - { "bpf", (__SCMP_NR_BASE + 319) }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", (__SCMP_NR_BASE + 12) }, - { "cachectl", (__SCMP_NR_BASE + 198) }, - { "cacheflush", (__SCMP_NR_BASE + 197) }, - { "capget", (__SCMP_NR_BASE + 123) }, - { "capset", (__SCMP_NR_BASE + 124) }, - { "chdir", (__SCMP_NR_BASE + 78) }, - { "chmod", (__SCMP_NR_BASE + 88) }, - { "chown", (__SCMP_NR_BASE + 90) }, - { "chown32", __PNR_chown32 }, - { "chroot", (__SCMP_NR_BASE + 156) }, - { "clock_adjtime", (__SCMP_NR_BASE + 305) }, - { "clock_adjtime64", (__SCMP_NR_BASE + 405) }, - { "clock_getres", (__SCMP_NR_BASE + 227) }, - { "clock_getres_time64", (__SCMP_NR_BASE + 406) }, - { "clock_gettime", (__SCMP_NR_BASE + 226) }, - { "clock_gettime64", (__SCMP_NR_BASE + 403) }, - { "clock_nanosleep", (__SCMP_NR_BASE + 228) }, - { "clock_nanosleep_time64", (__SCMP_NR_BASE + 407) }, - { "clock_settime", (__SCMP_NR_BASE + 225) }, - { "clock_settime64", (__SCMP_NR_BASE + 404) }, - { "clone", (__SCMP_NR_BASE + 55) }, - { "clone3", (__SCMP_NR_BASE + 435) }, - { "close", (__SCMP_NR_BASE + 3) }, - { "connect", (__SCMP_NR_BASE + 41) }, - { "copy_file_range", (__SCMP_NR_BASE + 324) }, - { "creat", (__SCMP_NR_BASE + 83) }, - { "create_module", (__SCMP_NR_BASE + 167) }, - { "delete_module", (__SCMP_NR_BASE + 169) }, - { "dup", (__SCMP_NR_BASE + 31) }, - { "dup2", (__SCMP_NR_BASE + 32) }, - { "dup3", (__SCMP_NR_BASE + 290) }, - { "epoll_create", (__SCMP_NR_BASE + 207) }, - { "epoll_create1", (__SCMP_NR_BASE + 289) }, - { "epoll_ctl", (__SCMP_NR_BASE + 208) }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", (__SCMP_NR_BASE + 276) }, - { "epoll_wait", (__SCMP_NR_BASE + 209) }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", (__SCMP_NR_BASE + 282) }, - { "eventfd2", (__SCMP_NR_BASE + 288) }, - { "execve", (__SCMP_NR_BASE + 57) }, - { "execveat", (__SCMP_NR_BASE + 320) }, - { "exit", (__SCMP_NR_BASE + 58) }, - { "exit_group", (__SCMP_NR_BASE + 205) }, - { "faccessat", (__SCMP_NR_BASE + 263) }, - { "fadvise64", (__SCMP_NR_BASE + 216) }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", (__SCMP_NR_BASE + 283) }, - { "fanotify_init", (__SCMP_NR_BASE + 300) }, - { "fanotify_mark", (__SCMP_NR_BASE + 301) }, - { "fchdir", (__SCMP_NR_BASE + 79) }, - { "fchmod", (__SCMP_NR_BASE + 89) }, - { "fchmodat", (__SCMP_NR_BASE + 262) }, - { "fchown", (__SCMP_NR_BASE + 91) }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", (__SCMP_NR_BASE + 254) }, - { "fcntl", (__SCMP_NR_BASE + 70) }, - { "fcntl64", (__SCMP_NR_BASE + 212) }, - { "fdatasync", (__SCMP_NR_BASE + 73) }, - { "fgetxattr", (__SCMP_NR_BASE + 185) }, - { "finit_module", (__SCMP_NR_BASE + 312) }, - { "flistxattr", (__SCMP_NR_BASE + 188) }, - { "flock", (__SCMP_NR_BASE + 71) }, - { "fork", (__SCMP_NR_BASE + 56) }, - { "fremovexattr", (__SCMP_NR_BASE + 191) }, - { "fsconfig", (__SCMP_NR_BASE + 431) }, - { "fsetxattr", (__SCMP_NR_BASE + 182) }, - { "fsmount", (__SCMP_NR_BASE + 432) }, - { "fsopen", (__SCMP_NR_BASE + 430) }, - { "fspick", (__SCMP_NR_BASE + 433) }, - { "fstat", (__SCMP_NR_BASE + 5) }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstat64 }, - { "fstatfs", (__SCMP_NR_BASE + 135) }, - { "fstatfs64", (__SCMP_NR_BASE + 218) }, - { "fsync", (__SCMP_NR_BASE + 72) }, - { "ftime", __PNR_ftime }, - { "ftruncate", (__SCMP_NR_BASE + 75) }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", (__SCMP_NR_BASE + 194) }, - { "futex_time64", (__SCMP_NR_BASE + 422) }, - { "futimesat", (__SCMP_NR_BASE + 255) }, - { "get_kernel_syms", (__SCMP_NR_BASE + 170) }, - { "get_mempolicy", (__SCMP_NR_BASE + 232) }, - { "get_robust_list", (__SCMP_NR_BASE + 273) }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", (__SCMP_NR_BASE + 275) }, - { "getcwd", (__SCMP_NR_BASE + 77) }, - { "getdents", (__SCMP_NR_BASE + 76) }, - { "getdents64", (__SCMP_NR_BASE + 299) }, - { "getegid", (__SCMP_NR_BASE + 106) }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", (__SCMP_NR_BASE + 105) }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", (__SCMP_NR_BASE + 102) }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", (__SCMP_NR_BASE + 113) }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", (__SCMP_NR_BASE + 35) }, - { "getpeername", (__SCMP_NR_BASE + 51) }, - { "getpgid", (__SCMP_NR_BASE + 119) }, - { "getpgrp", (__SCMP_NR_BASE + 109) }, - { "getpid", (__SCMP_NR_BASE + 38) }, - { "getpmsg", (__SCMP_NR_BASE + 174) }, - { "getppid", (__SCMP_NR_BASE + 108) }, - { "getpriority", (__SCMP_NR_BASE + 137) }, - { "getrandom", (__SCMP_NR_BASE + 317) }, - { "getresgid", (__SCMP_NR_BASE + 118) }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", (__SCMP_NR_BASE + 116) }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", (__SCMP_NR_BASE + 95) }, - { "getrusage", (__SCMP_NR_BASE + 96) }, - { "getsid", (__SCMP_NR_BASE + 122) }, - { "getsockname", (__SCMP_NR_BASE + 50) }, - { "getsockopt", (__SCMP_NR_BASE + 54) }, - { "gettid", (__SCMP_NR_BASE + 178) }, - { "gettimeofday", (__SCMP_NR_BASE + 94) }, - { "getuid", (__SCMP_NR_BASE + 100) }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", (__SCMP_NR_BASE + 183) }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", (__SCMP_NR_BASE + 168) }, - { "inotify_add_watch", (__SCMP_NR_BASE + 248) }, - { "inotify_init", (__SCMP_NR_BASE + 247) }, - { "inotify_init1", (__SCMP_NR_BASE + 292) }, - { "inotify_rm_watch", (__SCMP_NR_BASE + 249) }, - { "io_cancel", (__SCMP_NR_BASE + 204) }, - { "io_destroy", (__SCMP_NR_BASE + 201) }, - { "io_getevents", (__SCMP_NR_BASE + 202) }, - { "io_pgetevents", (__SCMP_NR_BASE + 332) }, - { "io_pgetevents_time64", (__SCMP_NR_BASE + 416) }, - { "io_setup", (__SCMP_NR_BASE + 200) }, - { "io_submit", (__SCMP_NR_BASE + 203) }, - { "io_uring_setup", (__SCMP_NR_BASE + 425) }, - { "io_uring_enter", (__SCMP_NR_BASE + 426) }, - { "io_uring_register", (__SCMP_NR_BASE + 427) }, - { "ioctl", (__SCMP_NR_BASE + 15) }, - { "ioperm", __PNR_ioperm }, - { "iopl", __PNR_iopl }, - { "ioprio_get", (__SCMP_NR_BASE + 278) }, - { "ioprio_set", (__SCMP_NR_BASE + 277) }, - { "ipc", __PNR_ipc }, - { "kcmp", (__SCMP_NR_BASE + 311) }, - { "kexec_file_load", __PNR_kexec_file_load }, - { "kexec_load", (__SCMP_NR_BASE + 274) }, - { "keyctl", (__SCMP_NR_BASE + 245) }, - { "kill", (__SCMP_NR_BASE + 60) }, - { "lchown", (__SCMP_NR_BASE + 92) }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", (__SCMP_NR_BASE + 184) }, - { "link", (__SCMP_NR_BASE + 84) }, - { "linkat", (__SCMP_NR_BASE + 259) }, - { "listen", (__SCMP_NR_BASE + 49) }, - { "listxattr", (__SCMP_NR_BASE + 186) }, - { "llistxattr", (__SCMP_NR_BASE + 187) }, - { "lock", __PNR_lock }, - { "lookup_dcookie", (__SCMP_NR_BASE + 206) }, - { "lremovexattr", (__SCMP_NR_BASE + 190) }, - { "lseek", (__SCMP_NR_BASE + 8) }, - { "lsetxattr", (__SCMP_NR_BASE + 181) }, - { "lstat", (__SCMP_NR_BASE + 6) }, - { "lstat64", __PNR_lstat64 }, - { "madvise", (__SCMP_NR_BASE + 27) }, - { "mbind", (__SCMP_NR_BASE + 231) }, - { "membarrier", (__SCMP_NR_BASE + 322) }, - { "memfd_create", (__SCMP_NR_BASE + 318) }, - { "migrate_pages", (__SCMP_NR_BASE + 250) }, - { "mincore", (__SCMP_NR_BASE + 26) }, - { "mkdir", (__SCMP_NR_BASE + 81) }, - { "mkdirat", (__SCMP_NR_BASE + 252) }, - { "mknod", (__SCMP_NR_BASE + 131) }, - { "mknodat", (__SCMP_NR_BASE + 253) }, - { "mlock", (__SCMP_NR_BASE + 146) }, - { "mlock2", (__SCMP_NR_BASE + 323) }, - { "mlockall", (__SCMP_NR_BASE + 148) }, - { "mmap", (__SCMP_NR_BASE + 9) }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", (__SCMP_NR_BASE + 160) }, - { "move_mount", (__SCMP_NR_BASE + 429) }, - { "move_pages", (__SCMP_NR_BASE + 271) }, - { "mprotect", (__SCMP_NR_BASE + 10) }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", (__SCMP_NR_BASE + 239) }, - { "mq_notify", (__SCMP_NR_BASE + 238) }, - { "mq_open", (__SCMP_NR_BASE + 234) }, - { "mq_timedreceive", (__SCMP_NR_BASE + 237) }, - { "mq_timedreceive_time64", (__SCMP_NR_BASE + 419) }, - { "mq_timedsend", (__SCMP_NR_BASE + 236) }, - { "mq_timedsend_time64", (__SCMP_NR_BASE + 418) }, - { "mq_unlink", (__SCMP_NR_BASE + 235) }, - { "mremap", (__SCMP_NR_BASE + 24) }, - { "msgctl", (__SCMP_NR_BASE + 69) }, - { "msgget", (__SCMP_NR_BASE + 66) }, - { "msgrcv", (__SCMP_NR_BASE + 68) }, - { "msgsnd", (__SCMP_NR_BASE + 67) }, - { "msync", (__SCMP_NR_BASE + 25) }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", (__SCMP_NR_BASE + 147) }, - { "munlockall", (__SCMP_NR_BASE + 149) }, - { "munmap", (__SCMP_NR_BASE + 11) }, - { "name_to_handle_at", (__SCMP_NR_BASE + 303) }, - { "nanosleep", (__SCMP_NR_BASE + 34) }, - { "newfstatat", (__SCMP_NR_BASE + 256) }, - { "nfsservctl", (__SCMP_NR_BASE + 173) }, - { "nice", __PNR_nice }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", (__SCMP_NR_BASE + 2) }, - { "open_by_handle_at", (__SCMP_NR_BASE + 304) }, - { "open_tree", (__SCMP_NR_BASE + 428) }, - { "openat", (__SCMP_NR_BASE + 251) }, - { "pause", (__SCMP_NR_BASE + 33) }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", (__SCMP_NR_BASE + 296) }, - { "personality", (__SCMP_NR_BASE + 132) }, - { "pidfd_open", (__SCMP_NR_BASE + 434) }, - { "pidfd_send_signal", (__SCMP_NR_BASE + 424) }, - { "pipe", (__SCMP_NR_BASE + 21) }, - { "pipe2", (__SCMP_NR_BASE + 291) }, - { "pivot_root", (__SCMP_NR_BASE + 151) }, - { "pkey_alloc", (__SCMP_NR_BASE + 328) }, - { "pkey_free", (__SCMP_NR_BASE + 329) }, - { "pkey_mprotect", (__SCMP_NR_BASE + 327) }, - { "poll", (__SCMP_NR_BASE + 7) }, - { "ppoll", (__SCMP_NR_BASE + 265) }, - { "ppoll_time64", (__SCMP_NR_BASE + 414) }, - { "prctl", (__SCMP_NR_BASE + 153) }, - { "pread64", (__SCMP_NR_BASE + 16) }, - { "preadv", (__SCMP_NR_BASE + 293) }, - { "preadv2", (__SCMP_NR_BASE + 325) }, - { "prlimit64", (__SCMP_NR_BASE + 302) }, - { "process_vm_readv", (__SCMP_NR_BASE + 309) }, - { "process_vm_writev", (__SCMP_NR_BASE + 310) }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", (__SCMP_NR_BASE + 264) }, - { "pselect6_time64", (__SCMP_NR_BASE + 413) }, - { "ptrace", (__SCMP_NR_BASE + 99) }, - { "putpmsg", (__SCMP_NR_BASE + 175) }, - { "pwrite64", (__SCMP_NR_BASE + 17) }, - { "pwritev", (__SCMP_NR_BASE + 294) }, - { "pwritev2", (__SCMP_NR_BASE + 326) }, - { "query_module", (__SCMP_NR_BASE + 171) }, - { "quotactl", (__SCMP_NR_BASE + 172) }, - { "read", (__SCMP_NR_BASE + 0) }, - { "readahead", (__SCMP_NR_BASE + 179) }, - { "readdir", __PNR_readdir }, - { "readlink", (__SCMP_NR_BASE + 87) }, - { "readlinkat", (__SCMP_NR_BASE + 261) }, - { "readv", (__SCMP_NR_BASE + 18) }, - { "reboot", (__SCMP_NR_BASE + 164) }, - { "recv", __PNR_recv }, - { "recvfrom", (__SCMP_NR_BASE + 44) }, - { "recvmmsg", (__SCMP_NR_BASE + 298) }, - { "recvmmsg_time64", (__SCMP_NR_BASE + 417) }, - { "recvmsg", (__SCMP_NR_BASE + 46) }, - { "remap_file_pages", (__SCMP_NR_BASE + 210) }, - { "removexattr", (__SCMP_NR_BASE + 189) }, - { "rename", (__SCMP_NR_BASE + 80) }, - { "renameat", (__SCMP_NR_BASE + 258) }, - { "renameat2", (__SCMP_NR_BASE + 315) }, - { "request_key", (__SCMP_NR_BASE + 244) }, - { "restart_syscall", (__SCMP_NR_BASE + 214) }, - { "rmdir", (__SCMP_NR_BASE + 82) }, - { "rseq", (__SCMP_NR_BASE + 331) }, - { "rt_sigaction", (__SCMP_NR_BASE + 13) }, - { "rt_sigpending", (__SCMP_NR_BASE + 125) }, - { "rt_sigprocmask", (__SCMP_NR_BASE + 14) }, - { "rt_sigqueueinfo", (__SCMP_NR_BASE + 127) }, - { "rt_sigreturn", (__SCMP_NR_BASE + 211) }, - { "rt_sigsuspend", (__SCMP_NR_BASE + 128) }, - { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) }, - { "rt_sigtimedwait_time64", (__SCMP_NR_BASE + 421) }, - { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 295) }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", (__SCMP_NR_BASE + 143) }, - { "sched_get_priority_min", (__SCMP_NR_BASE + 144) }, - { "sched_getaffinity", (__SCMP_NR_BASE + 196) }, - { "sched_getattr", (__SCMP_NR_BASE + 314) }, - { "sched_getparam", (__SCMP_NR_BASE + 140) }, - { "sched_getscheduler", (__SCMP_NR_BASE + 142) }, - { "sched_rr_get_interval", (__SCMP_NR_BASE + 145) }, - { "sched_rr_get_interval_time64", (__SCMP_NR_BASE + 423) }, - { "sched_setaffinity", (__SCMP_NR_BASE + 195) }, - { "sched_setattr", (__SCMP_NR_BASE + 313) }, - { "sched_setparam", (__SCMP_NR_BASE + 139) }, - { "sched_setscheduler", (__SCMP_NR_BASE + 141) }, - { "sched_yield", (__SCMP_NR_BASE + 23) }, - { "seccomp", (__SCMP_NR_BASE + 316) }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", (__SCMP_NR_BASE + 64) }, - { "semget", (__SCMP_NR_BASE + 62) }, - { "semop", (__SCMP_NR_BASE + 63) }, - { "semtimedop", (__SCMP_NR_BASE + 215) }, - { "semtimedop_time64", (__SCMP_NR_BASE + 420) }, - { "send", __PNR_send }, - { "sendfile", (__SCMP_NR_BASE + 39) }, - { "sendfile64", (__SCMP_NR_BASE + 219) }, - { "sendmmsg", (__SCMP_NR_BASE + 307) }, - { "sendmsg", (__SCMP_NR_BASE + 45) }, - { "sendto", (__SCMP_NR_BASE + 43) }, - { "set_mempolicy", (__SCMP_NR_BASE + 233) }, - { "set_robust_list", (__SCMP_NR_BASE + 272) }, - { "set_thread_area", (__SCMP_NR_BASE + 246) }, - { "set_tid_address", (__SCMP_NR_BASE + 213) }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", (__SCMP_NR_BASE + 166) }, - { "setfsgid", (__SCMP_NR_BASE + 121) }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", (__SCMP_NR_BASE + 120) }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", (__SCMP_NR_BASE + 104) }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", (__SCMP_NR_BASE + 114) }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", (__SCMP_NR_BASE + 165) }, - { "setitimer", (__SCMP_NR_BASE + 36) }, - { "setns", (__SCMP_NR_BASE + 308) }, - { "setpgid", (__SCMP_NR_BASE + 107) }, - { "setpriority", (__SCMP_NR_BASE + 138) }, - { "setregid", (__SCMP_NR_BASE + 112) }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", (__SCMP_NR_BASE + 117) }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", (__SCMP_NR_BASE + 115) }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", (__SCMP_NR_BASE + 111) }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", (__SCMP_NR_BASE + 155) }, - { "setsid", (__SCMP_NR_BASE + 110) }, - { "setsockopt", (__SCMP_NR_BASE + 53) }, - { "settimeofday", (__SCMP_NR_BASE + 159) }, - { "setuid", (__SCMP_NR_BASE + 103) }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", (__SCMP_NR_BASE + 180) }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", (__SCMP_NR_BASE + 29) }, - { "shmctl", (__SCMP_NR_BASE + 30) }, - { "shmdt", (__SCMP_NR_BASE + 65) }, - { "shmget", (__SCMP_NR_BASE + 28) }, - { "shutdown", (__SCMP_NR_BASE + 47) }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", (__SCMP_NR_BASE + 129) }, - { "signal", __PNR_signal }, - { "signalfd", (__SCMP_NR_BASE + 280) }, - { "signalfd4", (__SCMP_NR_BASE + 287) }, - { "sigpending", __PNR_sigpending }, - { "sigprocmask", __PNR_sigprocmask }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", (__SCMP_NR_BASE + 40) }, - { "socketcall", __PNR_socketcall }, - { "socketpair", (__SCMP_NR_BASE + 52) }, - { "splice", (__SCMP_NR_BASE + 267) }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", (__SCMP_NR_BASE + 4) }, - { "stat64", __PNR_stat64 }, - { "statfs", (__SCMP_NR_BASE + 134) }, - { "statfs64", (__SCMP_NR_BASE + 217) }, - { "statx", (__SCMP_NR_BASE + 330) }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", (__SCMP_NR_BASE + 163) }, - { "swapon", (__SCMP_NR_BASE + 162) }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", (__SCMP_NR_BASE + 86) }, - { "symlinkat", (__SCMP_NR_BASE + 260) }, - { "sync", (__SCMP_NR_BASE + 157) }, - { "sync_file_range", (__SCMP_NR_BASE + 268) }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", (__SCMP_NR_BASE + 306) }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", (__SCMP_NR_BASE + 136) }, - { "sysinfo", (__SCMP_NR_BASE + 97) }, - { "syslog", (__SCMP_NR_BASE + 101) }, - { "sysmips", (__SCMP_NR_BASE + 199) }, - { "tee", (__SCMP_NR_BASE + 269) }, - { "tgkill", (__SCMP_NR_BASE + 229) }, - { "time", __PNR_time }, - { "timer_create", (__SCMP_NR_BASE + 220) }, - { "timer_delete", (__SCMP_NR_BASE + 224) }, - { "timer_getoverrun", (__SCMP_NR_BASE + 223) }, - { "timer_gettime", (__SCMP_NR_BASE + 222) }, - { "timer_gettime64", (__SCMP_NR_BASE + 408) }, - { "timer_settime", (__SCMP_NR_BASE + 221) }, - { "timer_settime64", (__SCMP_NR_BASE + 409) }, - { "timerfd", (__SCMP_NR_BASE + 281) }, - { "timerfd_create", (__SCMP_NR_BASE + 284) }, - { "timerfd_gettime", (__SCMP_NR_BASE + 285) }, - { "timerfd_gettime64", (__SCMP_NR_BASE + 410) }, - { "timerfd_settime", (__SCMP_NR_BASE + 286) }, - { "timerfd_settime64", (__SCMP_NR_BASE + 411) }, - { "times", (__SCMP_NR_BASE + 98) }, - { "tkill", (__SCMP_NR_BASE + 192) }, - { "truncate", (__SCMP_NR_BASE + 74) }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", (__SCMP_NR_BASE + 93) }, - { "umount", __PNR_umount }, - { "umount2", (__SCMP_NR_BASE + 161) }, - { "uname", (__SCMP_NR_BASE + 61) }, - { "unlink", (__SCMP_NR_BASE + 85) }, - { "unlinkat", (__SCMP_NR_BASE + 257) }, - { "unshare", (__SCMP_NR_BASE + 266) }, - { "uselib", __PNR_uselib }, - { "userfaultfd", (__SCMP_NR_BASE + 321) }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", (__SCMP_NR_BASE + 133) }, - { "utime", (__SCMP_NR_BASE + 130) }, - { "utimensat", (__SCMP_NR_BASE + 279) }, - { "utimensat_time64", (__SCMP_NR_BASE + 412) }, - { "utimes", (__SCMP_NR_BASE + 230) }, - { "vfork", __PNR_vfork }, - { "vhangup", (__SCMP_NR_BASE + 150) }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", (__SCMP_NR_BASE + 270) }, - { "vserver", (__SCMP_NR_BASE + 240) }, - { "wait4", (__SCMP_NR_BASE + 59) }, - { "waitid", (__SCMP_NR_BASE + 241) }, - { "waitpid", __PNR_waitpid }, - { "write", (__SCMP_NR_BASE + 1) }, - { "writev", (__SCMP_NR_BASE + 19) }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int mips64n32_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips64n32_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *mips64n32_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = mips64n32_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *mips64n32_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &mips64n32_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-mips64n32.c libseccomp-2.5.1/src/arch-mips64n32.c --- libseccomp-2.4.3/src/arch-mips64n32.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64n32.c 2020-11-17 08:34:38.779027356 +1030 @@ -27,13 +27,54 @@ #include "arch.h" #include "arch-mips64n32.h" +/* N32 ABI */ +#define __SCMP_NR_BASE 6000 + +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int mips64n32_syscall_resolve_name_munge(const char *name) +{ + int sys; + + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + sys = mips64n32_syscall_resolve_name(name); + if (sys == __NR_SCMP_ERROR || sys < 0) + return sys; + + return sys + __SCMP_NR_BASE; +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *mips64n32_syscall_resolve_num_munge(int num) +{ + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + if (num >= __SCMP_NR_BASE) + num -= __SCMP_NR_BASE; + return mips64n32_syscall_resolve_num(num); +} + const struct arch_def arch_def_mips64n32 = { .token = SCMP_ARCH_MIPS64N32, .token_bpf = AUDIT_ARCH_MIPS64N32, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = mips64n32_syscall_resolve_name, - .syscall_resolve_num = mips64n32_syscall_resolve_num, + .syscall_resolve_name = mips64n32_syscall_resolve_name_munge, + .syscall_resolve_num = mips64n32_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; @@ -43,8 +84,8 @@ .token_bpf = AUDIT_ARCH_MIPSEL64N32, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = mips64n32_syscall_resolve_name, - .syscall_resolve_num = mips64n32_syscall_resolve_num, + .syscall_resolve_name = mips64n32_syscall_resolve_name_munge, + .syscall_resolve_num = mips64n32_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-mips64n32.h libseccomp-2.5.1/src/arch-mips64n32.h --- libseccomp-2.4.3/src/arch-mips64n32.h 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-mips64n32.h 2020-11-17 08:34:38.779027356 +1030 @@ -23,17 +23,9 @@ #ifndef _ARCH_MIPS64N32_H #define _ARCH_MIPS64N32_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_mips64n32; -extern const struct arch_def arch_def_mipsel64n32; - -int mips64n32_syscall_resolve_name(const char *name); -const char *mips64n32_syscall_resolve_num(int num); -const struct arch_syscall_def *mips64n32_syscall_iterate(unsigned int spot); +ARCH_DECL(mips64n32) +ARCH_DECL(mipsel64n32) #endif diff -Nru libseccomp-2.4.3/src/arch-parisc-syscalls.c libseccomp-2.5.1/src/arch-parisc-syscalls.c --- libseccomp-2.4.3/src/arch-parisc-syscalls.c 2020-03-03 02:13:34.188033122 +1030 +++ libseccomp-2.5.1/src/arch-parisc-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,542 +0,0 @@ -/* - * Copyright (c) 2016 Helge Deller - * Author: Helge Deller - */ - -#include - -#include - -#include "arch.h" -#include "arch-parisc.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def parisc_syscall_table[] = { \ - { "_llseek", 140 }, - { "_newselect", 142 }, - { "_sysctl", 149 }, - { "accept", 35 }, - { "accept4", 320 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 264 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", 134 }, - { "bind", 22 }, - { "bpf", 341 }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 106 }, - { "capset", 107 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 180 }, - { "chown32", __PNR_chown32 }, - { "chroot", 61 }, - { "clock_adjtime", 324 }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", 257 }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", 256 }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", 258 }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", 255 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 120 }, - { "clone3", __PNR_clone3 }, - { "close", 6 }, - { "connect", 31 }, - { "copy_file_range", 346 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 312 }, - { "epoll_create", 224 }, - { "epoll_create1", 311 }, - { "epoll_ctl", 225 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 297 }, - { "epoll_wait", 226 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 304 }, - { "eventfd2", 310 }, - { "execve", 11 }, - { "execveat", 342 }, - { "exit", 1 }, - { "exit_group", 222 }, - { "faccessat", 287 }, - { "fadvise64", __PNR_fadvise64 }, - { "fadvise64_64", 236 }, - { "fallocate", 305 }, - { "fanotify_init", 322 }, - { "fanotify_mark", 323 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 286 }, - { "fchown", 95 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 278 }, - { "fcntl", 55 }, - { "fcntl64", 202 }, - { "fdatasync", 148 }, - { "fgetxattr", 243 }, - { "finit_module", 333 }, - { "flistxattr", 246 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 249 }, - { "fsconfig", __PNR_fsconfig }, - { "fsetxattr", 240 }, - { "fsmount", __PNR_fsmount }, - { "fsopen", __PNR_fsopen }, - { "fspick", __PNR_fspick }, - { "fstat", 28 }, - { "fstat64", 112 }, - { "fstatat64", 280 }, - { "fstatfs", 100 }, - { "fstatfs64", 299 }, - { "fsync", 118 }, - { "ftime", __PNR_ftime }, - { "ftruncate", 93 }, - { "ftruncate64", 200 }, - { "futex", 210 }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", 279 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 261 }, - { "get_robust_list", 290 }, - { "get_thread_area", 214 }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 296 }, - { "getcwd", 110 }, - { "getdents", 141 }, - { "getdents64", 201 }, - { "getegid", 50 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 49 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 47 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 80 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 105 }, - { "getpeername", 53 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 196 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 339 }, - { "getresgid", 171 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 165 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", 76 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 44 }, - { "getsockopt", 182 }, - { "gettid", 206 }, - { "gettimeofday", 78 }, - { "getuid", 24 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 241 }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", 128 }, - { "inotify_add_watch", 270 }, - { "inotify_init", 269 }, - { "inotify_init1", 314 }, - { "inotify_rm_watch", 271 }, - { "io_cancel", 219 }, - { "io_destroy", 216 }, - { "io_getevents", 217 }, - { "io_pgetevents", __PNR_io_pgetevents }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", 215 }, - { "io_submit", 218 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", __PNR_ioperm }, - { "iopl", __PNR_iopl }, - { "ioprio_get", 268 }, - { "ioprio_set", 267 }, - { "ipc", __PNR_ipc }, - { "kcmp", 332 }, - { "kexec_file_load", __PNR_kexec_file_load }, - { "kexec_load", 300 }, - { "keyctl", 266 }, - { "kill", 37 }, - { "lchown", 16 }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 242 }, - { "link", 9 }, - { "linkat", 283 }, - { "listen", 32 }, - { "listxattr", 244 }, - { "llistxattr", 245 }, - { "lock", __PNR_lock }, - { "lookup_dcookie", 223 }, - { "lremovexattr", 248 }, - { "lseek", 19 }, - { "lsetxattr", 239 }, - { "lstat", 84 }, - { "lstat64", 198 }, - { "madvise", 119 }, - { "mbind", 260 }, - { "membarrier", 343 }, - { "memfd_create", 340 }, - { "migrate_pages", 272 }, - { "mincore", 72 }, - { "mkdir", 39 }, - { "mkdirat", 276 }, - { "mknod", 14 }, - { "mknodat", 277 }, - { "mlock", 150 }, - { "mlock2", 345 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", 89 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", 21 }, - { "move_mount", __PNR_move_mount }, - { "move_pages", 295 }, - { "mprotect", 125 }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", 234 }, - { "mq_notify", 233 }, - { "mq_open", 229 }, - { "mq_timedreceive", 232 }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", 231 }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", 230 }, - { "mremap", 163 }, - { "msgctl", 191 }, - { "msgget", 190 }, - { "msgrcv", 189 }, - { "msgsnd", 188 }, - { "msync", 144 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 325 }, - { "nanosleep", 162 }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", 169 }, - { "nice", 34 }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 326 }, - { "open_tree", __PNR_open_tree }, - { "openat", 275 }, - { "pause", 29 }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 318 }, - { "personality", 136 }, - { "pidfd_open", __PNR_pidfd_open }, - { "pidfd_send_signal", __PNR_pidfd_send_signal }, - { "pipe", 42 }, - { "pipe2", 313 }, - { "pivot_root", 67 }, - { "pkey_alloc", __PNR_pkey_alloc }, - { "pkey_free", __PNR_pkey_free }, - { "pkey_mprotect", __PNR_pkey_mprotect }, - { "poll", 168 }, - { "ppoll", 274 }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", 172 }, - { "pread64", 108 }, - { "preadv", 315 }, - { "preadv2", 347 }, - { "prlimit64", 321 }, - { "process_vm_readv", 330 }, - { "process_vm_writev", 331 }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", 273 }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", 26 }, - { "putpmsg", 197 }, - { "pwrite64", 109 }, - { "pwritev", 316 }, - { "pwritev2", 348 }, - { "query_module", 167 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 207 }, - { "readdir", __PNR_readdir }, - { "readlink", 85 }, - { "readlinkat", 285 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", 98 }, - { "recvfrom", 123 }, - { "recvmmsg", 319 }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", 184 }, - { "remap_file_pages", 227 }, - { "removexattr", 247 }, - { "rename", 38 }, - { "renameat", 282 }, - { "renameat2", 337 }, - { "request_key", 265 }, - { "restart_syscall", 0 }, - { "rmdir", 40 }, - { "rseq", __PNR_rseq }, - { "rt_sigaction", 174 }, - { "rt_sigpending", 176 }, - { "rt_sigprocmask", 175 }, - { "rt_sigqueueinfo", 178 }, - { "rt_sigreturn", 173 }, - { "rt_sigsuspend", 179 }, - { "rt_sigtimedwait", 177 }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", 317 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 212 }, - { "sched_getattr", 335 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", 211 }, - { "sched_setattr", 334 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 338 }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", 187 }, - { "semget", 186 }, - { "semop", 185 }, - { "semtimedop", 228 }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", 58 }, - { "sendfile", 122 }, - { "sendfile64", 209 }, - { "sendmmsg", 329 }, - { "sendmsg", 183 }, - { "sendto", 82 }, - { "set_mempolicy", 262 }, - { "set_robust_list", 289 }, - { "set_thread_area", 213 }, - { "set_tid_address", 237 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 139 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 138 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 46 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 81 }, - { "setgroups32", __PNR_setgroups32}, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 328 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 71 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 170 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 164 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 70 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 181 }, - { "settimeofday", 79 }, - { "setuid", 23 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 238 }, - { "sgetmask", 68 }, - { "shmat", 192 }, - { "shmctl", 195 }, - { "shmdt", 193 }, - { "shmget", 194 }, - { "shutdown", 117 }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", 166 }, - { "signal", 48 }, - { "signalfd", 302 }, - { "signalfd4", 309 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", 17 }, - { "socketcall", __PNR_socketcall }, - { "socketpair", 56 }, - { "splice", 291 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", 69 }, - { "stat", 18 }, - { "stat64", 101 }, - { "statfs", 99 }, - { "statfs64", 298 }, - { "statx", 349 }, - { "stime", 25 }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", 83 }, - { "symlinkat", 284 }, - { "sync", 36 }, - { "sync_file_range", 292 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 327 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 293 }, - { "tgkill", 259 }, - { "time", 13 }, - { "timer_create", 250 }, - { "timer_delete", 254 }, - { "timer_getoverrun", 253 }, - { "timer_gettime", 252 }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", 251 }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", 303 }, - { "timerfd_create", 306 }, - { "timerfd_gettime", 308 }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", 307 }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", 43 }, - { "tkill", 208 }, - { "truncate", 92 }, - { "truncate64", 199 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", 60 }, - { "umount", __PNR_umount }, - { "umount2", 52 }, - { "uname", 59 }, - { "unlink", 10 }, - { "unlinkat", 281 }, - { "unshare", 288 }, - { "uselib", 86 }, - { "userfaultfd", 344 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 301 }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", 336 }, - { "vfork", 113 }, - { "vhangup", 111 }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 294 }, - { "vserver", 263 }, - { "wait4", 114 }, - { "waitid", 235 }, - { "waitpid", 7 }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int parisc_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = parisc_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *parisc_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = parisc_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *parisc_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &parisc_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-parisc.h libseccomp-2.5.1/src/arch-parisc.h --- libseccomp-2.4.3/src/arch-parisc.h 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-parisc.h 2020-11-17 08:34:38.780027364 +1030 @@ -22,17 +22,8 @@ #ifndef _ARCH_PARISC_H #define _ARCH_PARISC_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_parisc; -extern const struct arch_def arch_def_parisc64; - -int parisc_syscall_resolve_name(const char *name); -const char *parisc_syscall_resolve_num(int num); -const struct arch_syscall_def *parisc_syscall_iterate(unsigned int spot); +ARCH_DECL(parisc) #endif diff -Nru libseccomp-2.4.3/src/arch-parisc64.c libseccomp-2.5.1/src/arch-parisc64.c --- libseccomp-2.4.3/src/arch-parisc64.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-parisc64.c 2020-11-17 08:34:38.780027364 +1030 @@ -8,15 +8,15 @@ #include #include "arch.h" -#include "arch-parisc.h" +#include "arch-parisc64.h" const struct arch_def arch_def_parisc64 = { .token = SCMP_ARCH_PARISC64, .token_bpf = AUDIT_ARCH_PARISC64, .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = parisc_syscall_resolve_name, - .syscall_resolve_num = parisc_syscall_resolve_num, + .syscall_resolve_name = parisc64_syscall_resolve_name, + .syscall_resolve_num = parisc64_syscall_resolve_num, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-parisc64.h libseccomp-2.5.1/src/arch-parisc64.h --- libseccomp-2.4.3/src/arch-parisc64.h 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/arch-parisc64.h 2020-11-17 08:34:38.780027364 +1030 @@ -0,0 +1,29 @@ +/** + * Enhanced Seccomp PARISC Specific Code + * + * Copyright (c) 2016 Helge Deller + * + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef _ARCH_PARISC64_H +#define _ARCH_PARISC64_H + +#include "arch.h" + +ARCH_DECL(parisc64) + +#endif diff -Nru libseccomp-2.4.3/src/arch-ppc-syscalls.c libseccomp-2.5.1/src/arch-ppc-syscalls.c --- libseccomp-2.4.3/src/arch-ppc-syscalls.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-ppc-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,559 +0,0 @@ -/** - * Enhanced Seccomp PPC Specific Code - * - * Copyright (c) 2015 Freescale - * Author: Bogdan Purcareata - * - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-ppc.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def ppc_syscall_table[] = { \ - { "_llseek", 140 }, - { "_newselect", 142 }, - { "_sysctl", 149 }, - { "accept", 330 }, - { "accept4", 344 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 269 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", 134 }, - { "bind", 327 }, - { "bpf", 361 }, - { "break", 17 }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 183 }, - { "capset", 184 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 181 }, - { "chown32", __PNR_chown32 }, - { "chroot", 61 }, - { "clock_adjtime", 347 }, - { "clock_adjtime64", 405 }, - { "clock_getres", 247 }, - { "clock_getres_time64", 406 }, - { "clock_gettime", 246 }, - { "clock_gettime64", 403 }, - { "clock_nanosleep", 248 }, - { "clock_nanosleep_time64", 407 }, - { "clock_settime", 245 }, - { "clock_settime64", 404 }, - { "clone", 120 }, - { "clone3", 435 }, - { "close", 6 }, - { "connect", 328 }, - { "copy_file_range", 379 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 316 }, - { "epoll_create", 236 }, - { "epoll_create1", 315 }, - { "epoll_ctl", 237 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 303 }, - { "epoll_wait", 238 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 307 }, - { "eventfd2", 314 }, - { "execve", 11 }, - { "execveat", 362 }, - { "exit", 1 }, - { "exit_group", 234 }, - { "faccessat", 298 }, - { "fadvise64", 233 }, - { "fadvise64_64", 254 }, - { "fallocate", 309 }, - { "fanotify_init", 323 }, - { "fanotify_mark", 324 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 297 }, - { "fchown", 95 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 289 }, - { "fcntl", 55 }, - { "fcntl64", 204 }, - { "fdatasync", 148 }, - { "fgetxattr", 214 }, - { "finit_module", 353 }, - { "flistxattr", 217 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 220 }, - { "fsconfig", 431 }, - { "fsetxattr", 211 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 108 }, - { "fstat64", 197 }, - { "fstatat64", 291 }, - { "fstatfs", 100 }, - { "fstatfs64", 253 }, - { "fsync", 118 }, - { "ftime", 35 }, - { "ftruncate", 93 }, - { "ftruncate64", 194 }, - { "futex", 221 }, - { "futex_time64", 422 }, - { "futimesat", 290 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 260 }, - { "get_robust_list", 299 }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 302 }, - { "getcwd", 182 }, - { "getdents", 141 }, - { "getdents64", 202 }, - { "getegid", 50 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 49 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 47 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 80 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 105 }, - { "getpeername", 332 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 187 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 359 }, - { "getresgid", 170 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 165 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", 76 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 331 }, - { "getsockopt", 340 }, - { "gettid", 207 }, - { "gettimeofday", 78 }, - { "getuid", 24 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 212 }, - { "gtty", 32 }, - { "idle", 112 }, - { "init_module", 128 }, - { "inotify_add_watch", 276 }, - { "inotify_init", 275 }, - { "inotify_init1", 318 }, - { "inotify_rm_watch", 277 }, - { "io_cancel", 231 }, - { "io_destroy", 228 }, - { "io_getevents", 229 }, - { "io_pgetevents", 388 }, - { "io_pgetevents_time64", 416 }, - { "io_setup", 227 }, - { "io_submit", 230 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", 101 }, - { "iopl", 110 }, - { "ioprio_get", 274 }, - { "ioprio_set", 273 }, - { "ipc", 117 }, - { "kcmp", 354 }, - { "kexec_file_load", 382 }, - { "kexec_load", 268 }, - { "keyctl", 271 }, - { "kill", 37 }, - { "lchown", 16 }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 213 }, - { "link", 9 }, - { "linkat", 294 }, - { "listen", 329 }, - { "listxattr", 215 }, - { "llistxattr", 216 }, - { "lock", 53 }, - { "lookup_dcookie", 235 }, - { "lremovexattr", 219 }, - { "lseek", 19 }, - { "lsetxattr", 210 }, - { "lstat", 107 }, - { "lstat64", 196 }, - { "madvise", 205 }, - { "mbind", 259 }, - { "membarrier", 365 }, - { "memfd_create", 360 }, - { "migrate_pages", 258 }, - { "mincore", 206 }, - { "mkdir", 39 }, - { "mkdirat", 287 }, - { "mknod", 14 }, - { "mknodat", 288 }, - { "mlock", 150 }, - { "mlock2", 378 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", 192 }, - { "modify_ldt", 123 }, - { "mount", 21 }, - { "move_mount", 429 }, - { "move_pages", 301 }, - { "mprotect", 125 }, - { "mpx", 56 }, - { "mq_getsetattr", 267 }, - { "mq_notify", 266 }, - { "mq_open", 262 }, - { "mq_timedreceive", 265 }, - { "mq_timedreceive_time64", 419 }, - { "mq_timedsend", 264 }, - { "mq_timedsend_time64", 418 }, - { "mq_unlink", 263 }, - { "mremap", 163 }, - { "msgctl", 402 }, - { "msgget", 399 }, - { "msgrcv", 401 }, - { "msgsnd", 400 }, - { "msync", 144 }, - { "multiplexer", 201 }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 345 }, - { "nanosleep", 162 }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", 168 }, - { "nice", 34 }, - { "oldfstat", 28 }, - { "oldlstat", 84 }, - { "oldolduname", 59 }, - { "oldstat", 18 }, - { "olduname", 109 }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 346 }, - { "open_tree", 428 }, - { "openat", 286 }, - { "pause", 29 }, - { "pciconfig_iobase", 200 }, - { "pciconfig_read", 198 }, - { "pciconfig_write", 199 }, - { "perf_event_open", 319 }, - { "personality", 136 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 42 }, - { "pipe2", 317 }, - { "pivot_root", 203 }, - { "pkey_alloc", 384 }, - { "pkey_free", 385 }, - { "pkey_mprotect", 386 }, - { "poll", 167 }, - { "ppoll", 281 }, - { "ppoll_time64", 414 }, - { "prctl", 171 }, - { "pread64", 179 }, - { "preadv", 320 }, - { "preadv2", 380 }, - { "prlimit64", 325 }, - { "process_vm_readv", 351 }, - { "process_vm_writev", 352 }, - { "prof", 44 }, - { "profil", 98 }, - { "pselect6", 280 }, - { "pselect6_time64", 413 }, - { "ptrace", 26 }, - { "putpmsg", 188 }, - { "pwrite64", 180 }, - { "pwritev", 321 }, - { "pwritev2", 381 }, - { "query_module", 166 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 191 }, - { "readdir", 89 }, - { "readlink", 85 }, - { "readlinkat", 296 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", 336 }, - { "recvfrom", 337 }, - { "recvmmsg", 343 }, - { "recvmmsg_time64", 417 }, - { "recvmsg", 342 }, - { "remap_file_pages", 239 }, - { "removexattr", 218 }, - { "rename", 38 }, - { "renameat", 293 }, - { "renameat2", 357 }, - { "request_key", 270 }, - { "restart_syscall", 0 }, - { "rmdir", 40 }, - { "rseq", 387 }, - { "rt_sigaction", 173 }, - { "rt_sigpending", 175 }, - { "rt_sigprocmask", 174 }, - { "rt_sigqueueinfo", 177 }, - { "rt_sigreturn", 172 }, - { "rt_sigsuspend", 178 }, - { "rt_sigtimedwait", 176 }, - { "rt_sigtimedwait_time64", 421 }, - { "rt_tgsigqueueinfo", 322 }, - { "rtas", 255 }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 223 }, - { "sched_getattr", 356 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", 423 }, - { "sched_setaffinity", 222 }, - { "sched_setattr", 355 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 358 }, - { "security", __PNR_security }, - { "select", 82 }, - { "semctl", 394 }, - { "semget", 393 }, - { "semop", __PNR_semop }, - { "semtimedop", __PNR_semtimedop }, - { "semtimedop_time64", 420 }, - { "send", 334 }, - { "sendfile", 186 }, - { "sendfile64", 226 }, - { "sendmmsg", 349 }, - { "sendmsg", 341 }, - { "sendto", 335 }, - { "set_mempolicy", 261 }, - { "set_robust_list", 300 }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", 232 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 139 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 138 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 46 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 81 }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 350 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 71 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 169 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 164 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 70 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 339 }, - { "settimeofday", 79 }, - { "setuid", 23 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 209 }, - { "sgetmask", 68 }, - { "shmat", 397 }, - { "shmctl", 396 }, - { "shmdt", 398 }, - { "shmget", 395 }, - { "shutdown", 338 }, - { "sigaction", 67 }, - { "sigaltstack", 185 }, - { "signal", 48 }, - { "signalfd", 305 }, - { "signalfd4", 313 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", 119 }, - { "sigsuspend", 72 }, - { "socket", 326 }, - { "socketcall", 102 }, - { "socketpair", 333 }, - { "splice", 283 }, - { "spu_create", 279 }, - { "spu_run", 278 }, - { "ssetmask", 69 }, - { "stat", 106 }, - { "stat64", 195 }, - { "statfs", 99 }, - { "statfs64", 252 }, - { "statx", 383}, - { "stime", 25 }, - { "stty", 31 }, - { "subpage_prot", 310 }, - { "swapcontext", 249 }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", 363 }, - { "symlink", 83 }, - { "symlinkat", 295 }, - { "sync", 36 }, - { "sync_file_range", __PNR_sync_file_range }, - { "sync_file_range2", 308 }, - { "syncfs", 348 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", 256 }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 284 }, - { "tgkill", 250 }, - { "time", 13 }, - { "timer_create", 240 }, - { "timer_delete", 244 }, - { "timer_getoverrun", 243 }, - { "timer_gettime", 242 }, - { "timer_gettime64", 408 }, - { "timer_settime", 241 }, - { "timer_settime64", 409 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", 306 }, - { "timerfd_gettime", 312 }, - { "timerfd_gettime64", 410 }, - { "timerfd_settime", 311 }, - { "timerfd_settime64", 411 }, - { "times", 43 }, - { "tkill", 208 }, - { "truncate", 92 }, - { "truncate64", 193 }, - { "tuxcall", 225 }, - { "ugetrlimit", 190 }, - { "ulimit", 58 }, - { "umask", 60 }, - { "umount", 22 }, - { "umount2", 52 }, - { "uname", 122 }, - { "unlink", 10 }, - { "unlinkat", 292 }, - { "unshare", 282 }, - { "uselib", 86 }, - { "userfaultfd", 364 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 304 }, - { "utimensat_time64", 412 }, - { "utimes", 251 }, - { "vfork", 189 }, - { "vhangup", 111 }, - { "vm86", 113 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 285 }, - { "vserver", __PNR_vserver }, - { "wait4", 114 }, - { "waitid", 272 }, - { "waitpid", 7 }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int ppc_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = ppc_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *ppc_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = ppc_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *ppc_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &ppc_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-ppc.h libseccomp-2.5.1/src/arch-ppc.h --- libseccomp-2.4.3/src/arch-ppc.h 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-ppc.h 2020-11-17 08:34:38.780027364 +1030 @@ -23,16 +23,8 @@ #ifndef _ARCH_PPC_H #define _ARCH_PPC_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_ppc; - -int ppc_syscall_resolve_name(const char *name); -const char *ppc_syscall_resolve_num(int num); -const struct arch_syscall_def *ppc_syscall_iterate(unsigned int spot); +ARCH_DECL(ppc) #endif diff -Nru libseccomp-2.4.3/src/arch-ppc64-syscalls.c libseccomp-2.5.1/src/arch-ppc64-syscalls.c --- libseccomp-2.4.3/src/arch-ppc64-syscalls.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-ppc64-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,559 +0,0 @@ -/** - * Enhanced Seccomp PPC64 Specific Code - * - * Copyright (c) 2014 Red Hat - * Author: Paul Moore - * - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-ppc64.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def ppc64_syscall_table[] = { \ - { "_llseek", 140 }, - { "_newselect", 142 }, - { "_sysctl", 149 }, - { "accept", 330 }, - { "accept4", 344 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 269 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", 134 }, - { "bind", 327 }, - { "bpf", 361 }, - { "break", 17 }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 183 }, - { "capset", 184 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 181 }, - { "chown32", __PNR_chown32 }, - { "chroot", 61 }, - { "clock_adjtime", 347 }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", 247 }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", 246 }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", 248 }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", 245 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 120 }, - { "clone3", 435 }, - { "close", 6 }, - { "connect", 328 }, - { "copy_file_range", 379 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 316 }, - { "epoll_create", 236 }, - { "epoll_create1", 315 }, - { "epoll_ctl", 237 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 303 }, - { "epoll_wait", 238 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 307 }, - { "eventfd2", 314 }, - { "execve", 11 }, - { "execveat", 362 }, - { "exit", 1 }, - { "exit_group", 234 }, - { "faccessat", 298 }, - { "fadvise64", 233 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", 309 }, - { "fanotify_init", 323 }, - { "fanotify_mark", 324 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 297 }, - { "fchown", 95 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 289 }, - { "fcntl", 55 }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", 148 }, - { "fgetxattr", 214 }, - { "finit_module", 353 }, - { "flistxattr", 217 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 220 }, - { "fsconfig", 431 }, - { "fsetxattr", 211 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 108 }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstatat64 }, - { "fstatfs", 100 }, - { "fstatfs64", 253 }, - { "fsync", 118 }, - { "ftime", 35 }, - { "ftruncate", 93 }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", 221 }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", 290 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 260 }, - { "get_robust_list", 299 }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 302 }, - { "getcwd", 182 }, - { "getdents", 141 }, - { "getdents64", 202 }, - { "getegid", 50 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 49 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 47 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 80 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 105 }, - { "getpeername", 332 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 187 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 359 }, - { "getresgid", 170 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 165 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", 76 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 331 }, - { "getsockopt", 340 }, - { "gettid", 207 }, - { "gettimeofday", 78 }, - { "getuid", 24 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 212 }, - { "gtty", 32 }, - { "idle", 112 }, - { "init_module", 128 }, - { "inotify_add_watch", 276 }, - { "inotify_init", 275 }, - { "inotify_init1", 318 }, - { "inotify_rm_watch", 277 }, - { "io_cancel", 231 }, - { "io_destroy", 228 }, - { "io_getevents", 229 }, - { "io_pgetevents", 388 }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", 227 }, - { "io_submit", 230 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", 101 }, - { "iopl", 110 }, - { "ioprio_get", 274 }, - { "ioprio_set", 273 }, - { "ipc", 117 }, - { "kcmp", 354 }, - { "kexec_file_load", 382 }, - { "kexec_load", 268 }, - { "keyctl", 271 }, - { "kill", 37 }, - { "lchown", 16 }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 213 }, - { "link", 9 }, - { "linkat", 294 }, - { "listen", 329 }, - { "listxattr", 215 }, - { "llistxattr", 216 }, - { "lock", 53 }, - { "lookup_dcookie", 235 }, - { "lremovexattr", 219 }, - { "lseek", 19 }, - { "lsetxattr", 210 }, - { "lstat", 107 }, - { "lstat64", __PNR_lstat64 }, - { "madvise", 205 }, - { "mbind", 259 }, - { "membarrier", 365 }, - { "memfd_create", 360 }, - { "migrate_pages", 258 }, - { "mincore", 206 }, - { "mkdir", 39 }, - { "mkdirat", 287 }, - { "mknod", 14 }, - { "mknodat", 288 }, - { "mlock", 150 }, - { "mlock2", 378 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", 123 }, - { "mount", 21 }, - { "move_mount", 429 }, - { "move_pages", 301 }, - { "mprotect", 125 }, - { "mpx", 56 }, - { "mq_getsetattr", 267 }, - { "mq_notify", 266 }, - { "mq_open", 262 }, - { "mq_timedreceive", 265 }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", 264 }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", 263 }, - { "mremap", 163 }, - { "msgctl", 402 }, - { "msgget", 399 }, - { "msgrcv", 401 }, - { "msgsnd", 400 }, - { "msync", 144 }, - { "multiplexer", 201 }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 345 }, - { "nanosleep", 162 }, - { "newfstatat", 291 }, - { "nfsservctl", 168 }, - { "nice", 34 }, - { "oldfstat", 28 }, - { "oldlstat", 84 }, - { "oldolduname", 59 }, - { "oldstat", 18 }, - { "olduname", 109 }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 346 }, - { "open_tree", 428 }, - { "openat", 286 }, - { "pause", 29 }, - { "pciconfig_iobase", 200 }, - { "pciconfig_read", 198 }, - { "pciconfig_write", 199 }, - { "perf_event_open", 319 }, - { "personality", 136 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 42 }, - { "pipe2", 317 }, - { "pivot_root", 203 }, - { "pkey_alloc", 384 }, - { "pkey_free", 385 }, - { "pkey_mprotect", 386 }, - { "poll", 167 }, - { "ppoll", 281 }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", 171 }, - { "pread64", 179 }, - { "preadv", 320 }, - { "preadv2", 380 }, - { "prlimit64", 325 }, - { "process_vm_readv", 351 }, - { "process_vm_writev", 352 }, - { "prof", 44 }, - { "profil", 98 }, - { "pselect6", 280 }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", 26 }, - { "putpmsg", 188 }, - { "pwrite64", 180 }, - { "pwritev", 321 }, - { "pwritev2", 381 }, - { "query_module", 166 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 191 }, - { "readdir", 89 }, - { "readlink", 85 }, - { "readlinkat", 296 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", 336 }, - { "recvfrom", 337 }, - { "recvmmsg", 343 }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", 342 }, - { "remap_file_pages", 239 }, - { "removexattr", 218 }, - { "rename", 38 }, - { "renameat", 293 }, - { "renameat2", 357 }, - { "request_key", 270 }, - { "restart_syscall", 0 }, - { "rmdir", 40 }, - { "rseq", 387 }, - { "rt_sigaction", 173 }, - { "rt_sigpending", 175 }, - { "rt_sigprocmask", 174 }, - { "rt_sigqueueinfo", 177 }, - { "rt_sigreturn", 172 }, - { "rt_sigsuspend", 178 }, - { "rt_sigtimedwait", 176 }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", 322 }, - { "rtas", 255 }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 223 }, - { "sched_getattr", 356 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", 222 }, - { "sched_setattr", 355 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 358 }, - { "security", __PNR_security }, - { "select", 82 }, - { "semctl", 394 }, - { "semget", 393 }, - { "semop", __PNR_semop }, - { "semtimedop", 392 }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", 334 }, - { "sendfile", 186 }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", 349 }, - { "sendmsg", 341 }, - { "sendto", 335 }, - { "set_mempolicy", 261 }, - { "set_robust_list", 300 }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", 232 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 139 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 138 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 46 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 81 }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 350 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 71 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 169 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 164 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 70 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 339 }, - { "settimeofday", 79 }, - { "setuid", 23 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 209 }, - { "sgetmask", 68 }, - { "shmat", 397 }, - { "shmctl", 396 }, - { "shmdt", 398 }, - { "shmget", 395 }, - { "shutdown", 338 }, - { "sigaction", 67 }, - { "sigaltstack", 185 }, - { "signal", 48 }, - { "signalfd", 305 }, - { "signalfd4", 313 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", 119 }, - { "sigsuspend", 72 }, - { "socket", 326 }, - { "socketcall", 102 }, - { "socketpair", 333 }, - { "splice", 283 }, - { "spu_create", 279 }, - { "spu_run", 278 }, - { "ssetmask", 69 }, - { "stat", 106 }, - { "stat64", __PNR_stat64 }, - { "statfs", 99 }, - { "statfs64", 252 }, - { "statx", 383}, - { "stime", 25 }, - { "stty", 31 }, - { "subpage_prot", 310 }, - { "swapcontext", 249 }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", 363 }, - { "symlink", 83 }, - { "symlinkat", 295 }, - { "sync", 36 }, - { "sync_file_range", __PNR_sync_file_range }, - { "sync_file_range2", 308 }, - { "syncfs", 348 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", 256 }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 284 }, - { "tgkill", 250 }, - { "time", 13 }, - { "timer_create", 240 }, - { "timer_delete", 244 }, - { "timer_getoverrun", 243 }, - { "timer_gettime", 242 }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", 241 }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", 306 }, - { "timerfd_gettime", 312 }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", 311 }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", 43 }, - { "tkill", 208 }, - { "truncate", 92 }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", 225 }, - { "ugetrlimit", 190 }, - { "ulimit", 58 }, - { "umask", 60 }, - { "umount", 22 }, - { "umount2", 52 }, - { "uname", 122 }, - { "unlink", 10 }, - { "unlinkat", 292 }, - { "unshare", 282 }, - { "uselib", 86 }, - { "userfaultfd", 364 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 304 }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", 251 }, - { "vfork", 189 }, - { "vhangup", 111 }, - { "vm86", 113 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 285 }, - { "vserver", __PNR_vserver }, - { "wait4", 114 }, - { "waitid", 272 }, - { "waitpid", 7 }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int ppc64_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = ppc64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *ppc64_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = ppc64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *ppc64_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &ppc64_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-ppc64.c libseccomp-2.5.1/src/arch-ppc64.c --- libseccomp-2.4.3/src/arch-ppc64.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-ppc64.c 2020-11-17 08:34:38.780027364 +1030 @@ -20,20 +20,618 @@ * along with this library; if not, see . */ +#include +#include +#include #include +#include "db.h" #include "arch.h" #include "arch-ppc64.h" +/* ppc64 syscall numbers */ +#define __ppc64_NR_socketcall 102 +#define __ppc64_NR_ipc 117 + +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int ppc64_syscall_resolve_name_munge(const char *name) +{ + if (strcmp(name, "accept") == 0) + return __PNR_accept; + if (strcmp(name, "accept4") == 0) + return __PNR_accept4; + else if (strcmp(name, "bind") == 0) + return __PNR_bind; + else if (strcmp(name, "connect") == 0) + return __PNR_connect; + else if (strcmp(name, "getpeername") == 0) + return __PNR_getpeername; + else if (strcmp(name, "getsockname") == 0) + return __PNR_getsockname; + else if (strcmp(name, "getsockopt") == 0) + return __PNR_getsockopt; + else if (strcmp(name, "listen") == 0) + return __PNR_listen; + else if (strcmp(name, "msgctl") == 0) + return __PNR_msgctl; + else if (strcmp(name, "msgget") == 0) + return __PNR_msgget; + else if (strcmp(name, "msgrcv") == 0) + return __PNR_msgrcv; + else if (strcmp(name, "msgsnd") == 0) + return __PNR_msgsnd; + else if (strcmp(name, "recv") == 0) + return __PNR_recv; + else if (strcmp(name, "recvfrom") == 0) + return __PNR_recvfrom; + else if (strcmp(name, "recvmsg") == 0) + return __PNR_recvmsg; + else if (strcmp(name, "recvmmsg") == 0) + return __PNR_recvmmsg; + else if (strcmp(name, "semctl") == 0) + return __PNR_semctl; + else if (strcmp(name, "semget") == 0) + return __PNR_semget; + else if (strcmp(name, "semtimedop") == 0) + return __PNR_semtimedop; + else if (strcmp(name, "send") == 0) + return __PNR_send; + else if (strcmp(name, "sendmsg") == 0) + return __PNR_sendmsg; + else if (strcmp(name, "sendmmsg") == 0) + return __PNR_sendmmsg; + else if (strcmp(name, "sendto") == 0) + return __PNR_sendto; + else if (strcmp(name, "setsockopt") == 0) + return __PNR_setsockopt; + else if (strcmp(name, "shmat") == 0) + return __PNR_shmat; + else if (strcmp(name, "shmdt") == 0) + return __PNR_shmdt; + else if (strcmp(name, "shmget") == 0) + return __PNR_shmget; + else if (strcmp(name, "shmctl") == 0) + return __PNR_shmctl; + else if (strcmp(name, "shutdown") == 0) + return __PNR_shutdown; + else if (strcmp(name, "socket") == 0) + return __PNR_socket; + else if (strcmp(name, "socketpair") == 0) + return __PNR_socketpair; + + return ppc64_syscall_resolve_name(name); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *ppc64_syscall_resolve_num_munge(int num) +{ + if (num == __PNR_accept) + return "accept"; + else if (num == __PNR_accept4) + return "accept4"; + else if (num == __PNR_bind) + return "bind"; + else if (num == __PNR_connect) + return "connect"; + else if (num == __PNR_getpeername) + return "getpeername"; + else if (num == __PNR_getsockname) + return "getsockname"; + else if (num == __PNR_getsockopt) + return "getsockopt"; + else if (num == __PNR_listen) + return "listen"; + else if (num == __PNR_msgctl) + return "msgctl"; + else if (num == __PNR_msgget) + return "msgget"; + else if (num == __PNR_msgrcv) + return "msgrcv"; + else if (num == __PNR_msgsnd) + return "msgsnd"; + else if (num == __PNR_recv) + return "recv"; + else if (num == __PNR_recvfrom) + return "recvfrom"; + else if (num == __PNR_recvmsg) + return "recvmsg"; + else if (num == __PNR_recvmmsg) + return "recvmmsg"; + else if (num == __PNR_semctl) + return "semctl"; + else if (num == __PNR_semget) + return "semget"; + else if (num == __PNR_semtimedop) + return "semtimedop"; + else if (num == __PNR_send) + return "send"; + else if (num == __PNR_sendmsg) + return "sendmsg"; + else if (num == __PNR_sendmmsg) + return "sendmmsg"; + else if (num == __PNR_sendto) + return "sendto"; + else if (num == __PNR_setsockopt) + return "setsockopt"; + else if (num == __PNR_shmat) + return "shmat"; + else if (num == __PNR_shmdt) + return "shmdt"; + else if (num == __PNR_shmget) + return "shmget"; + else if (num == __PNR_shmctl) + return "shmctl"; + else if (num == __PNR_shutdown) + return "shutdown"; + else if (num == __PNR_socket) + return "socket"; + else if (num == __PNR_socketpair) + return "socketpair"; + + return ppc64_syscall_resolve_num(num); +} + +/** + * Convert a multiplexed pseudo socket syscall into a direct syscall + * @param syscall the multiplexed pseudo syscall number + * + * Return the related direct syscall number, __NR_SCMP_UNDEF is there is + * no related syscall, or __NR_SCMP_ERROR otherwise. + * + */ +static int _ppc64_syscall_demux(int syscall) +{ + switch (syscall) { + case -101: + /* socket */ + return 326; + case -102: + /* bind */ + return 327; + case -103: + /* connect */ + return 328; + case -104: + /* listen */ + return 329; + case -105: + /* accept */ + return 330; + case -106: + /* getsockname */ + return 331; + case -107: + /* getpeername */ + return 332; + case -108: + /* socketpair */ + return 333; + case -109: + /* send */ + return 334; + case -110: + /* recv */ + return 336; + case -111: + /* sendto */ + return 335; + case -112: + /* recvfrom */ + return 337; + case -113: + /* shutdown */ + return 338; + case -114: + /* setsockopt */ + return 339; + case -115: + /* getsockopt */ + return 340; + case -116: + /* sendmsg */ + return 341; + case -117: + /* recvmsg */ + return 342; + case -118: + /* accept4 */ + return 344; + case -119: + /* recvmmsg */ + return 343; + case -120: + /* sendmmsg */ + return 349; + case -201: + /* semop - not defined */ + return __NR_SCMP_UNDEF; + case -202: + /* semget */ + return 393; + case -203: + /* semctl */ + return 394; + case -204: + /* semtimedop */ + return 392; + case -211: + /* msgsnd */ + return 400; + case -212: + /* msgrcv */ + return 401; + case -213: + /* msgget */ + return 399; + case -214: + /* msgctl */ + return 402; + case -221: + /* shmat */ + return 397; + case -222: + /* shmdt */ + return 398; + case -223: + /* shmget */ + return 395; + case -224: + /* shmctl */ + return 396; + } + + return __NR_SCMP_ERROR; +} + +/** + * Convert a direct socket syscall into multiplexed pseudo socket syscall + * @param syscall the direct syscall + * + * Return the related multiplexed pseduo syscall number, __NR_SCMP_UNDEF is + * there is no related pseudo syscall, or __NR_SCMP_ERROR otherwise. + * + */ +static int _ppc64_syscall_mux(int syscall) +{ + switch (syscall) { + case 326: + /* socket */ + return -101; + case 327: + /* bind */ + return -102; + case 328: + /* connect */ + return -103; + case 329: + /* listen */ + return -104; + case 330: + /* accept */ + return -105; + case 331: + /* getsockname */ + return -106; + case 332: + /* getpeername */ + return -107; + case 333: + /* socketpair */ + return -108; + case 334: + /* send */ + return -109; + case 335: + /* sendto */ + return -111; + case 336: + /* recv */ + return -110; + case 337: + /* recvfrom */ + return -112; + case 338: + /* shutdown */ + return -113; + case 339: + /* setsockopt */ + return -114; + case 340: + /* getsockopt */ + return -115; + case 341: + /* sendmsg */ + return -116; + case 342: + /* recvmsg */ + return -117; + case 343: + /* recvmmsg */ + return -119; + case 344: + /* accept4 */ + return -118; + case 349: + /* sendmmsg */ + return -120; + case 392: + /* semtimedop */ + return -204; + case 393: + /* semget */ + return -202; + case 394: + /* semctl */ + return -203; + case 395: + /* shmget */ + return -223; + case 396: + /* shmctl */ + return -224; + case 397: + /* shmat */ + return -221; + case 398: + /* shmdt */ + return -222; + case 399: + /* msgget */ + return -213; + case 400: + /* msgsnd */ + return -211; + case 401: + /* msgrcv */ + return -212; + case 402: + /* msgctl */ + return -214; + } + + return __NR_SCMP_ERROR; +} + +/** + * Rewrite a syscall value to match the architecture + * @param syscall the syscall number + * + * Syscalls can vary across different architectures so this function rewrites + * the syscall into the correct value for the specified architecture. Returns + * zero on success, negative values on failure. + * + */ +int ppc64_syscall_rewrite(int *syscall) +{ + int sys = *syscall; + + if (sys <= -100 && sys >= -120) + *syscall = __ppc64_NR_socketcall; + else if (sys <= -200 && sys >= -224) + *syscall = __ppc64_NR_ipc; + else if (sys < 0) + return -EDOM; + + return 0; +} + +/** + * add a new rule to the ppc64 seccomp filter + * @param db the seccomp filter db + * @param rule the filter rule + * + * This function adds a new syscall filter to the seccomp filter db, making any + * necessary adjustments for the ppc64 ABI. Returns zero on success, negative + * values on failure. + * + * It is important to note that in the case of failure the db may be corrupted, + * the caller must use the transaction mechanism if the db integrity is + * important. + * + */ +int ppc64_rule_add(struct db_filter *db, struct db_api_rule_list *rule) +{ + int rc = 0; + unsigned int iter; + int sys = rule->syscall; + int sys_a, sys_b; + struct db_api_rule_list *rule_a, *rule_b, *rule_dup = NULL; + + if ((sys <= -100 && sys >= -120) || (sys >= 326 && sys <= 344) || + (sys == 349)) { + /* (-100 to -120) : multiplexed socket syscalls + (326 to 344) : direct socket syscalls, Linux 4.3+ + (349) : sendmmsg */ + + /* strict check for the multiplexed socket syscalls */ + for (iter = 0; iter < ARG_COUNT_MAX; iter++) { + if ((rule->args[iter].valid != 0) && (rule->strict)) { + rc = -EINVAL; + goto add_return; + } + } + + /* determine both the muxed and direct syscall numbers */ + if (sys > 0) { + sys_a = _ppc64_syscall_mux(sys); + if (sys_a == __NR_SCMP_ERROR) { + rc = __NR_SCMP_ERROR; + goto add_return; + } + sys_b = sys; + } else { + sys_a = sys; + sys_b = _ppc64_syscall_demux(sys); + if (sys_b == __NR_SCMP_ERROR) { + rc = __NR_SCMP_ERROR; + goto add_return; + } + } + + /* use rule_a for the multiplexed syscall and use rule_b for + * the direct wired syscall */ + + if (sys_a == __NR_SCMP_UNDEF) { + rule_a = NULL; + rule_b = rule; + } else if (sys_b == __NR_SCMP_UNDEF) { + rule_a = rule; + rule_b = NULL; + } else { + /* need two rules, dup the first and link together */ + rule_a = rule; + rule_dup = db_rule_dup(rule_a); + rule_b = rule_dup; + if (rule_b == NULL) { + rc = -ENOMEM; + goto add_return; + } + rule_b->prev = rule_a; + rule_b->next = NULL; + rule_a->next = rule_b; + } + + /* multiplexed socket syscalls */ + if (rule_a != NULL) { + rule_a->syscall = __ppc64_NR_socketcall; + rule_a->args[0].arg = 0; + rule_a->args[0].op = SCMP_CMP_EQ; + rule_a->args[0].mask = DATUM_MAX; + rule_a->args[0].datum = (-sys_a) % 100; + rule_a->args[0].valid = 1; + } + + /* direct wired socket syscalls */ + if (rule_b != NULL) + rule_b->syscall = sys_b; + + /* we should be protected by a transaction checkpoint */ + if (rule_a != NULL) { + rc = db_rule_add(db, rule_a); + if (rc < 0) + goto add_return; + } + if (rule_b != NULL) { + rc = db_rule_add(db, rule_b); + if (rc < 0) + goto add_return; + } + } else if ((sys <= -200 && sys >= -224) || (sys >= 392 && sys <= 402)) { + /* (-200 to -224) : multiplexed ipc syscalls + (392 to 402) : direct ipc syscalls */ + + /* strict check for the multiplexed socket syscalls */ + for (iter = 0; iter < ARG_COUNT_MAX; iter++) { + if ((rule->args[iter].valid != 0) && (rule->strict)) { + rc = -EINVAL; + goto add_return; + } + } + + /* determine both the muxed and direct syscall numbers */ + if (sys > 0) { + sys_a = _ppc64_syscall_mux(sys); + if (sys_a == __NR_SCMP_ERROR) { + rc = __NR_SCMP_ERROR; + goto add_return; + } + sys_b = sys; + } else { + sys_a = sys; + sys_b = _ppc64_syscall_demux(sys); + if (sys_b == __NR_SCMP_ERROR) { + rc = __NR_SCMP_ERROR; + goto add_return; + } + } + + /* use rule_a for the multiplexed syscall and use rule_b for + * the direct wired syscall */ + + if (sys_a == __NR_SCMP_UNDEF) { + rule_a = NULL; + rule_b = rule; + } else if (sys_b == __NR_SCMP_UNDEF) { + rule_a = rule; + rule_b = NULL; + } else { + /* need two rules, dup the first and link together */ + rule_a = rule; + rule_dup = db_rule_dup(rule_a); + rule_b = rule_dup; + if (rule_b == NULL) + goto add_return; + rule_b->prev = rule_a; + rule_b->next = NULL; + rule_a->next = rule_b; + } + + /* multiplexed socket syscalls */ + if (rule_a != NULL) { + rule_a->syscall = __ppc64_NR_ipc; + rule_a->args[0].arg = 0; + rule_a->args[0].op = SCMP_CMP_EQ; + rule_a->args[0].mask = DATUM_MAX; + rule_a->args[0].datum = (-sys_a) % 200; + rule_a->args[0].valid = 1; + } + + /* direct wired socket syscalls */ + if (rule_b != NULL) + rule_b->syscall = sys_b; + + /* we should be protected by a transaction checkpoint */ + if (rule_a != NULL) { + rc = db_rule_add(db, rule_a); + if (rc < 0) + goto add_return; + } + if (rule_b != NULL) { + rc = db_rule_add(db, rule_b); + if (rc < 0) + goto add_return; + } + } else if (sys >= 0) { + /* normal syscall processing */ + rc = db_rule_add(db, rule); + if (rc < 0) + goto add_return; + } else if (rule->strict) { + rc = -EDOM; + goto add_return; + } + +add_return: + if (rule_dup != NULL) + free(rule_dup); + return rc; +} + const struct arch_def arch_def_ppc64 = { .token = SCMP_ARCH_PPC64, .token_bpf = AUDIT_ARCH_PPC64, .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = ppc64_syscall_resolve_name, - .syscall_resolve_num = ppc64_syscall_resolve_num, - .syscall_rewrite = NULL, - .rule_add = NULL, + .syscall_resolve_name = ppc64_syscall_resolve_name_munge, + .syscall_resolve_num = ppc64_syscall_resolve_num_munge, + .syscall_rewrite = ppc64_syscall_rewrite, + .rule_add = ppc64_rule_add, }; const struct arch_def arch_def_ppc64le = { @@ -41,8 +639,8 @@ .token_bpf = AUDIT_ARCH_PPC64LE, .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = ppc64_syscall_resolve_name, - .syscall_resolve_num = ppc64_syscall_resolve_num, - .syscall_rewrite = NULL, - .rule_add = NULL, + .syscall_resolve_name = ppc64_syscall_resolve_name_munge, + .syscall_resolve_num = ppc64_syscall_resolve_num_munge, + .syscall_rewrite = ppc64_syscall_rewrite, + .rule_add = ppc64_rule_add, }; diff -Nru libseccomp-2.4.3/src/arch-ppc64.h libseccomp-2.5.1/src/arch-ppc64.h --- libseccomp-2.4.3/src/arch-ppc64.h 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-ppc64.h 2020-11-17 08:34:38.780027364 +1030 @@ -23,17 +23,9 @@ #ifndef _ARCH_PPC64_H #define _ARCH_PPC64_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_ppc64; -extern const struct arch_def arch_def_ppc64le; - -int ppc64_syscall_resolve_name(const char *name); -const char *ppc64_syscall_resolve_num(int num); -const struct arch_syscall_def *ppc64_syscall_iterate(unsigned int spot); +ARCH_DECL(ppc64) +ARCH_DECL(ppc64le) #endif diff -Nru libseccomp-2.4.3/src/arch-riscv64.c libseccomp-2.5.1/src/arch-riscv64.c --- libseccomp-2.4.3/src/arch-riscv64.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/arch-riscv64.c 2020-11-17 08:34:38.780027364 +1030 @@ -0,0 +1,31 @@ +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include + +#include "arch.h" +#include "arch-riscv64.h" + +const struct arch_def arch_def_riscv64 = { + .token = SCMP_ARCH_RISCV64, + .token_bpf = AUDIT_ARCH_RISCV64, + .size = ARCH_SIZE_64, + .endian = ARCH_ENDIAN_LITTLE, + .syscall_resolve_name = riscv64_syscall_resolve_name, + .syscall_resolve_num = riscv64_syscall_resolve_num, + .syscall_rewrite = NULL, + .rule_add = NULL, +}; diff -Nru libseccomp-2.4.3/src/arch-riscv64.h libseccomp-2.5.1/src/arch-riscv64.h --- libseccomp-2.4.3/src/arch-riscv64.h 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/arch-riscv64.h 2020-11-17 08:34:38.780027364 +1030 @@ -0,0 +1,22 @@ +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#ifndef _ARCH_RISCV64_H +#define _ARCH_RISCV64_H + +#include "arch.h" + +ARCH_DECL(riscv64) + +#endif diff -Nru libseccomp-2.4.3/src/arch-s390-syscalls.c libseccomp-2.5.1/src/arch-s390-syscalls.c --- libseccomp-2.4.3/src/arch-s390-syscalls.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,642 +0,0 @@ -/* - * Copyright 2015 IBM - * Author: Jan Willeke - */ - -#include - -#include - -#include "arch.h" -#include "arch-s390.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def s390_syscall_table[] = { \ - { "_llseek", 140 }, - { "_newselect", 142 }, - { "_sysctl", 149 }, - { "accept", __PNR_accept }, - { "accept4", 364 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 278 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", 134 }, - { "bind", 361 }, - { "bpf", 351 }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 184 }, - { "capset", 185 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 182 }, - { "chown32", 212 }, - { "chroot", 61 }, - { "clock_adjtime", 337 }, - { "clock_adjtime64", 405 }, - { "clock_getres", 261 }, - { "clock_getres_time64", 406 }, - { "clock_gettime", 260 }, - { "clock_gettime64", 403 }, - { "clock_nanosleep", 262 }, - { "clock_nanosleep_time64", 407 }, - { "clock_settime", 259 }, - { "clock_settime64", 404 }, - { "clone", 120 }, - { "clone3", 435 }, - { "close", 6 }, - { "connect", 362 }, - { "copy_file_range", 375 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 326 }, - { "epoll_create", 249 }, - { "epoll_create1", 327 }, - { "epoll_ctl", 250 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 312 }, - { "epoll_wait", 251 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 318 }, - { "eventfd2", 323 }, - { "execve", 11 }, - { "execveat", 354 }, - { "exit", 1 }, - { "exit_group", 248 }, - { "faccessat", 300 }, - { "fadvise64", 253 }, - { "fadvise64_64", 264 }, - { "fallocate", 314 }, - { "fanotify_init", 332 }, - { "fanotify_mark", 333 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 299 }, - { "fchown", 95 }, - { "fchown32", 207 }, - { "fchownat", 291 }, - { "fcntl", 55 }, - { "fcntl64", 221 }, - { "fdatasync", 148 }, - { "fgetxattr", 229 }, - { "finit_module", 344 }, - { "flistxattr", 232 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 235 }, - { "fsconfig", 431 }, - { "fsetxattr", 226 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 108 }, - { "fstat64", 197 }, - { "fstatat64", 293 }, - { "fstatfs", 100 }, - { "fstatfs64", 266 }, - { "fsync", 118 }, - { "ftime", __PNR_ftime }, - { "ftruncate", 93 }, - { "ftruncate64", 194 }, - { "futex", 238 }, - { "futex_time64", 422 }, - { "futimesat", 292 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 269 }, - { "get_robust_list", 305 }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 311 }, - { "getcwd", 183 }, - { "getdents", 141 }, - { "getdents64", 220 }, - { "getegid", 50 }, - { "getegid32", 202 }, - { "geteuid", 49 }, - { "geteuid32", 201 }, - { "getgid", 47 }, - { "getgid32", 200 }, - { "getgroups", 80 }, - { "getgroups32", 205 }, - { "getitimer", 105 }, - { "getpeername", 368 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 188 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 349 }, - { "getresgid", 171 }, - { "getresgid32", 211 }, - { "getresuid", 165 }, - { "getresuid32", 209 }, - { "getrlimit", 76 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 367 }, - { "getsockopt", 365 }, - { "gettid", 236 }, - { "gettimeofday", 78 }, - { "getuid", 24 }, - { "getuid32", 199 }, - { "getxattr", 227 }, - { "gtty", __PNR_gtty }, - { "idle", 112 }, - { "init_module", 128 }, - { "inotify_add_watch", 285 }, - { "inotify_init", 284 }, - { "inotify_init1", 324 }, - { "inotify_rm_watch", 286 }, - { "io_cancel", 247 }, - { "io_destroy", 244 }, - { "io_getevents", 245 }, - { "io_pgetevents", 382 }, - { "io_pgetevents_time64", 416 }, - { "io_setup", 243 }, - { "io_submit", 246 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", 101 }, - { "iopl", __PNR_iopl }, - { "ioprio_get", 283 }, - { "ioprio_set", 282 }, - { "ipc", 117 }, - { "kcmp", 343 }, - { "kexec_file_load", 381 }, - { "kexec_load", 277 }, - { "keyctl", 280 }, - { "kill", 37 }, - { "lchown", 16 }, - { "lchown32", 198 }, - { "lgetxattr", 228 }, - { "link", 9 }, - { "linkat", 296 }, - { "listen", 363 }, - { "listxattr", 230 }, - { "llistxattr", 231 }, - { "lock", __PNR_lock }, - { "lookup_dcookie", 110 }, - { "lremovexattr", 234 }, - { "lseek", 19 }, - { "lsetxattr", 225 }, - { "lstat", 107 }, - { "lstat64", 196 }, - { "madvise", 219 }, - { "mbind", 268 }, - { "membarrier", 356 }, - { "memfd_create", 350 }, - { "migrate_pages", 287 }, - { "mincore", 218 }, - { "mkdir", 39 }, - { "mkdirat", 289 }, - { "mknod", 14 }, - { "mknodat", 290 }, - { "mlock", 150 }, - { "mlock2", 374 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", 192 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", 21 }, - { "move_mount", 429 }, - { "move_pages", 310 }, - { "mprotect", 125 }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", 276 }, - { "mq_notify", 275 }, - { "mq_open", 271 }, - { "mq_timedreceive", 274 }, - { "mq_timedreceive_time64", 419 }, - { "mq_timedsend", 273 }, - { "mq_timedsend_time64", 418 }, - { "mq_unlink", 272 }, - { "mremap", 163 }, - { "msgctl", 402 }, - { "msgget", 399 }, - { "msgrcv", 401 }, - { "msgsnd", 400 }, - { "msync", 144 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 335 }, - { "nanosleep", 162 }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", 169 }, - { "nice", 34 }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 336 }, - { "open_tree", 428 }, - { "openat", 288 }, - { "pause", 29 }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 331 }, - { "personality", 136 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 42 }, - { "pipe2", 325 }, - { "pivot_root", 217 }, - { "pkey_alloc", 385 }, - { "pkey_free", 386 }, - { "pkey_mprotect", 384 }, - { "poll", 168 }, - { "ppoll", 302 }, - { "ppoll_time64", 414 }, - { "prctl", 172 }, - { "pread64", 180 }, - { "preadv", 328 }, - { "preadv2", 376 }, - { "prlimit64", 334 }, - { "process_vm_readv", 340 }, - { "process_vm_writev", 341 }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", 301 }, - { "pselect6_time64", 413 }, - { "ptrace", 26 }, - { "putpmsg", 189 }, - { "pwrite64", 181 }, - { "pwritev", 329 }, - { "pwritev2", 377 }, - { "query_module", 167 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 222 }, - { "readdir", 89 }, - { "readlink", 85 }, - { "readlinkat", 298 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", __PNR_recv }, - { "recvfrom", 371 }, - { "recvmmsg", 357 }, - { "recvmmsg_time64", 417 }, - { "recvmsg", 372 }, - { "remap_file_pages", 267 }, - { "removexattr", 233 }, - { "rename", 38 }, - { "renameat", 295 }, - { "renameat2", 347 }, - { "request_key", 279 }, - { "restart_syscall", 7 }, - { "rmdir", 40 }, - { "rseq", 383 }, - { "rt_sigaction", 174 }, - { "rt_sigpending", 176 }, - { "rt_sigprocmask", 175 }, - { "rt_sigqueueinfo", 178 }, - { "rt_sigreturn", 173 }, - { "rt_sigsuspend", 179 }, - { "rt_sigtimedwait", 177 }, - { "rt_sigtimedwait_time64", 421 }, - { "rt_tgsigqueueinfo", 330 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", 378 }, - { "s390_pci_mmio_read", 353 }, - { "s390_pci_mmio_write", 352 }, - { "s390_runtime_instr", 342 }, - { "s390_sthyi", 380 }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 240 }, - { "sched_getattr", 346 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", 423 }, - { "sched_setaffinity", 239 }, - { "sched_setattr", 345 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 348 }, - { "security", __PNR_security }, - { "select", __PNR_select }, - { "semctl", 394 }, - { "semget", 393 }, - { "semop", __PNR_semop }, - { "semtimedop", __PNR_semtimedop }, - { "semtimedop_time64", 420 }, - { "send", __PNR_send }, - { "sendfile", 187 }, - { "sendfile64", 223 }, - { "sendmmsg", 358 }, - { "sendmsg", 370 }, - { "sendto", 369 }, - { "set_mempolicy", 270 }, - { "set_robust_list", 304 }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", 252 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 139 }, - { "setfsgid32", 216 }, - { "setfsuid", 138 }, - { "setfsuid32", 215 }, - { "setgid", 46 }, - { "setgid32", 214 }, - { "setgroups", 81 }, - { "setgroups32", 206 }, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 339 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 71 }, - { "setregid32", 204 }, - { "setresgid", 170 }, - { "setresgid32", 210 }, - { "setresuid", 164 }, - { "setresuid32", 208 }, - { "setreuid", 70 }, - { "setreuid32", 203 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 366 }, - { "settimeofday", 79 }, - { "setuid", 23 }, - { "setuid32", 213 }, - { "setxattr", 224 }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", 397 }, - { "shmctl", 396 }, - { "shmdt", 398 }, - { "shmget", 395 }, - { "shutdown", 373 }, - { "sigaction", 67 }, - { "sigaltstack", 186 }, - { "signal", 48 }, - { "signalfd", 316 }, - { "signalfd4", 322 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", 119 }, - { "sigsuspend", 72 }, - { "socket", 359 }, - { "socketcall", 102 }, - { "socketpair", 360 }, - { "splice", 306 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", 106 }, - { "stat64", 195 }, - { "statfs", 99 }, - { "statfs64", 265 }, - { "statx", 379 }, - { "stime", 25 }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", 83 }, - { "symlinkat", 297 }, - { "sync", 36 }, - { "sync_file_range", 307 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 338 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 308 }, - { "tgkill", 241 }, - { "time", 13 }, - { "timer_create", 254 }, - { "timer_delete", 258 }, - { "timer_getoverrun", 257 }, - { "timer_gettime", 256 }, - { "timer_gettime64", 408 }, - { "timer_settime", 255 }, - { "timer_settime64", 409 }, - { "timerfd", 317 }, - { "timerfd_create", 319 }, - { "timerfd_gettime", 321 }, - { "timerfd_gettime64", 410 }, - { "timerfd_settime", 320 }, - { "timerfd_settime64", 411 }, - { "times", 43 }, - { "tkill", 237 }, - { "truncate", 92 }, - { "truncate64", 193 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", 191 }, - { "ulimit", __PNR_ulimit }, - { "umask", 60 }, - { "umount", 22 }, - { "umount2", 52 }, - { "uname", 122 }, - { "unlink", 10 }, - { "unlinkat", 294 }, - { "unshare", 303 }, - { "uselib", 86 }, - { "userfaultfd", 355 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 315 }, - { "utimensat_time64", 412 }, - { "utimes", 313 }, - { "vfork", 190 }, - { "vhangup", 111 }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 309 }, - { "vserver", __PNR_vserver }, - { "wait4", 114 }, - { "waitid", 281 }, - { "waitpid", __PNR_waitpid }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int s390_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = s390_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (strcmp(name, "accept") == 0) - return __PNR_accept; - if (strcmp(name, "accept4") == 0) - return __PNR_accept4; - else if (strcmp(name, "bind") == 0) - return __PNR_bind; - else if (strcmp(name, "connect") == 0) - return __PNR_connect; - else if (strcmp(name, "getpeername") == 0) - return __PNR_getpeername; - else if (strcmp(name, "getsockname") == 0) - return __PNR_getsockname; - else if (strcmp(name, "getsockopt") == 0) - return __PNR_getsockopt; - else if (strcmp(name, "listen") == 0) - return __PNR_listen; - else if (strcmp(name, "recv") == 0) - return __PNR_recv; - else if (strcmp(name, "recvfrom") == 0) - return __PNR_recvfrom; - else if (strcmp(name, "recvmsg") == 0) - return __PNR_recvmsg; - else if (strcmp(name, "recvmmsg") == 0) - return __PNR_recvmmsg; - else if (strcmp(name, "send") == 0) - return __PNR_send; - else if (strcmp(name, "sendmsg") == 0) - return __PNR_sendmsg; - else if (strcmp(name, "sendmmsg") == 0) - return __PNR_sendmmsg; - else if (strcmp(name, "sendto") == 0) - return __PNR_sendto; - else if (strcmp(name, "setsockopt") == 0) - return __PNR_setsockopt; - else if (strcmp(name, "shmat") == 0) - return __PNR_shmat; - else if (strcmp(name, "shmdt") == 0) - return __PNR_shmdt; - else if (strcmp(name, "shmget") == 0) - return __PNR_shmget; - else if (strcmp(name, "shmctl") == 0) - return __PNR_shmctl; - else if (strcmp(name, "shutdown") == 0) - return __PNR_shutdown; - else if (strcmp(name, "socket") == 0) - return __PNR_socket; - else if (strcmp(name, "socketpair") == 0) - return __PNR_socketpair; - - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *s390_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = s390_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (num == __PNR_accept) - return "accept"; - else if (num == __PNR_accept4) - return "accept4"; - else if (num == __PNR_bind) - return "bind"; - else if (num == __PNR_connect) - return "connect"; - else if (num == __PNR_getpeername) - return "getpeername"; - else if (num == __PNR_getsockname) - return "getsockname"; - else if (num == __PNR_getsockopt) - return "getsockopt"; - else if (num == __PNR_listen) - return "listen"; - else if (num == __PNR_recv) - return "recv"; - else if (num == __PNR_recvfrom) - return "recvfrom"; - else if (num == __PNR_recvmsg) - return "recvmsg"; - else if (num == __PNR_recvmmsg) - return "recvmmsg"; - else if (num == __PNR_send) - return "send"; - else if (num == __PNR_sendmsg) - return "sendmsg"; - else if (num == __PNR_sendmmsg) - return "sendmmsg"; - else if (num == __PNR_sendto) - return "sendto"; - else if (num == __PNR_setsockopt) - return "setsockopt"; - else if (num == __PNR_shmat) - return "shmat"; - else if (num == __PNR_shmdt) - return "shmdt"; - else if (num == __PNR_shmget) - return "shmget"; - else if (num == __PNR_shmctl) - return "shmctl"; - else if (num == __PNR_shutdown) - return "shutdown"; - else if (num == __PNR_socket) - return "socket"; - else if (num == __PNR_socketpair) - return "socketpair"; - - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *s390_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &s390_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-s390.c libseccomp-2.5.1/src/arch-s390.c --- libseccomp-2.4.3/src/arch-s390.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390.c 2020-11-17 08:34:38.780027364 +1030 @@ -8,6 +8,8 @@ #include #include +#include "db.h" +#include "syscalls.h" #include "arch.h" #include "arch-s390.h" @@ -15,16 +17,159 @@ #define __s390_NR_socketcall 102 #define __s390_NR_ipc 117 -const struct arch_def arch_def_s390 = { - .token = SCMP_ARCH_S390, - .token_bpf = AUDIT_ARCH_S390, - .size = ARCH_SIZE_32, - .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = s390_syscall_resolve_name, - .syscall_resolve_num = s390_syscall_resolve_num, - .syscall_rewrite = s390_syscall_rewrite, - .rule_add = s390_rule_add, -}; +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int s390_syscall_resolve_name_munge(const char *name) +{ + if (strcmp(name, "accept") == 0) + return __PNR_accept; + if (strcmp(name, "accept4") == 0) + return __PNR_accept4; + else if (strcmp(name, "bind") == 0) + return __PNR_bind; + else if (strcmp(name, "connect") == 0) + return __PNR_connect; + else if (strcmp(name, "getpeername") == 0) + return __PNR_getpeername; + else if (strcmp(name, "getsockname") == 0) + return __PNR_getsockname; + else if (strcmp(name, "getsockopt") == 0) + return __PNR_getsockopt; + else if (strcmp(name, "listen") == 0) + return __PNR_listen; + else if (strcmp(name, "msgctl") == 0) + return __PNR_msgctl; + else if (strcmp(name, "msgget") == 0) + return __PNR_msgget; + else if (strcmp(name, "msgrcv") == 0) + return __PNR_msgrcv; + else if (strcmp(name, "msgsnd") == 0) + return __PNR_msgsnd; + else if (strcmp(name, "recv") == 0) + return __PNR_recv; + else if (strcmp(name, "recvfrom") == 0) + return __PNR_recvfrom; + else if (strcmp(name, "recvmsg") == 0) + return __PNR_recvmsg; + else if (strcmp(name, "semctl") == 0) + return __PNR_semctl; + else if (strcmp(name, "semget") == 0) + return __PNR_semget; + else if (strcmp(name, "semtimedop") == 0) + return __PNR_semtimedop; + else if (strcmp(name, "recvmmsg") == 0) + return __PNR_recvmmsg; + else if (strcmp(name, "send") == 0) + return __PNR_send; + else if (strcmp(name, "sendmsg") == 0) + return __PNR_sendmsg; + else if (strcmp(name, "sendmmsg") == 0) + return __PNR_sendmmsg; + else if (strcmp(name, "sendto") == 0) + return __PNR_sendto; + else if (strcmp(name, "setsockopt") == 0) + return __PNR_setsockopt; + else if (strcmp(name, "shmat") == 0) + return __PNR_shmat; + else if (strcmp(name, "shmdt") == 0) + return __PNR_shmdt; + else if (strcmp(name, "shmget") == 0) + return __PNR_shmget; + else if (strcmp(name, "shmctl") == 0) + return __PNR_shmctl; + else if (strcmp(name, "shutdown") == 0) + return __PNR_shutdown; + else if (strcmp(name, "socket") == 0) + return __PNR_socket; + else if (strcmp(name, "socketpair") == 0) + return __PNR_socketpair; + + return s390_syscall_resolve_name(name); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *s390_syscall_resolve_num_munge(int num) +{ + if (num == __PNR_accept) + return "accept"; + else if (num == __PNR_accept4) + return "accept4"; + else if (num == __PNR_bind) + return "bind"; + else if (num == __PNR_connect) + return "connect"; + else if (num == __PNR_getpeername) + return "getpeername"; + else if (num == __PNR_getsockname) + return "getsockname"; + else if (num == __PNR_getsockopt) + return "getsockopt"; + else if (num == __PNR_listen) + return "listen"; + else if (num == __PNR_msgctl) + return "msgctl"; + else if (num == __PNR_msgget) + return "msgget"; + else if (num == __PNR_msgrcv) + return "msgrcv"; + else if (num == __PNR_msgsnd) + return "msgsnd"; + else if (num == __PNR_recv) + return "recv"; + else if (num == __PNR_recvfrom) + return "recvfrom"; + else if (num == __PNR_recvmsg) + return "recvmsg"; + else if (num == __PNR_recvmmsg) + return "recvmmsg"; + else if (num == __PNR_semctl) + return "semctl"; + else if (num == __PNR_semget) + return "semget"; + else if (num == __PNR_semtimedop) + return "semtimedop"; + else if (num == __PNR_send) + return "send"; + else if (num == __PNR_sendmsg) + return "sendmsg"; + else if (num == __PNR_sendmmsg) + return "sendmmsg"; + else if (num == __PNR_sendto) + return "sendto"; + else if (num == __PNR_setsockopt) + return "setsockopt"; + else if (num == __PNR_shmat) + return "shmat"; + else if (num == __PNR_shmdt) + return "shmdt"; + else if (num == __PNR_shmget) + return "shmget"; + else if (num == __PNR_shmctl) + return "shmctl"; + else if (num == __PNR_shutdown) + return "shutdown"; + else if (num == __PNR_socket) + return "socket"; + else if (num == __PNR_socketpair) + return "socketpair"; + + return s390_syscall_resolve_num(num); +} /** * Convert a multiplexed pseudo syscall into a direct syscall @@ -107,8 +252,8 @@ /* semctl */ return 394; case -204: - /* semtimedop - not defined */ - return __NR_SCMP_UNDEF; + /* semtimedop */ + return 392; case -211: /* msgsnd */ return 400; @@ -231,6 +376,9 @@ case 396: /* shmctl */ return -224; + case 392: + /* semtimedop */ + return -204; } return __NR_SCMP_ERROR; @@ -448,3 +596,14 @@ free(rule_dup); return rc; } + +const struct arch_def arch_def_s390 = { + .token = SCMP_ARCH_S390, + .token_bpf = AUDIT_ARCH_S390, + .size = ARCH_SIZE_32, + .endian = ARCH_ENDIAN_BIG, + .syscall_resolve_name = s390_syscall_resolve_name_munge, + .syscall_resolve_num = s390_syscall_resolve_num_munge, + .syscall_rewrite = s390_syscall_rewrite, + .rule_add = s390_rule_add, +}; diff -Nru libseccomp-2.4.3/src/arch-s390.h libseccomp-2.5.1/src/arch-s390.h --- libseccomp-2.4.3/src/arch-s390.h 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390.h 2020-11-17 08:34:38.780027364 +1030 @@ -6,24 +6,8 @@ #ifndef _ARCH_S390_H #define _ARCH_S390_H -#include - #include "arch.h" -#include "db.h" -#include "system.h" - -#define s390_arg_count_max 6 - -extern const struct arch_def arch_def_s390; -#define s390_arg_offset(x) (offsetof(struct seccomp_data, args[x])) - -int s390_syscall_resolve_name(const char *name); -const char *s390_syscall_resolve_num(int num); - -const struct arch_syscall_def *s390_syscall_iterate(unsigned int spot); - -int s390_syscall_rewrite(int *syscall); -int s390_rule_add(struct db_filter *db, struct db_api_rule_list *rule); +ARCH_DECL(s390) #endif diff -Nru libseccomp-2.4.3/src/arch-s390x-syscalls.c libseccomp-2.5.1/src/arch-s390x-syscalls.c --- libseccomp-2.4.3/src/arch-s390x-syscalls.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390x-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,642 +0,0 @@ -/* - * Copyright 2015 IBM - * Author: Jan Willeke - */ - -#include - -#include - -#include "arch.h" -#include "arch-s390x.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def s390x_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", __PNR__newselect }, - { "_sysctl", 149 }, - { "accept", __PNR_accept }, - { "accept4", 364 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 278 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, - { "bdflush", 134 }, - { "bind", 361 }, - { "bpf", 351 }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 184 }, - { "capset", 185 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 212 }, - { "chown32", __PNR_chown32 }, - { "chroot", 61 }, - { "clock_adjtime", 337 }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", 261 }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", 260 }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", 262 }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", 259 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 120 }, - { "clone3", 435 }, - { "close", 6 }, - { "connect", 362 }, - { "copy_file_range", 375 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 326 }, - { "epoll_create", 249 }, - { "epoll_create1", 327 }, - { "epoll_ctl", 250 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 312 }, - { "epoll_wait", 251 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 318 }, - { "eventfd2", 323 }, - { "execve", 11 }, - { "execveat", 354 }, - { "exit", 1 }, - { "exit_group", 248 }, - { "faccessat", 300 }, - { "fadvise64", 253 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", 314 }, - { "fanotify_init", 332 }, - { "fanotify_mark", 333 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 299 }, - { "fchown", 207 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 291 }, - { "fcntl", 55 }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", 148 }, - { "fgetxattr", 229 }, - { "finit_module", 344 }, - { "flistxattr", 232 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 235 }, - { "fsconfig", 431 }, - { "fsetxattr", 226 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 108 }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstatat64 }, - { "fstatfs", 100 }, - { "fstatfs64", 266 }, - { "fsync", 118 }, - { "ftime", __PNR_ftime }, - { "ftruncate", 93 }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", 238 }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", 292 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 269 }, - { "get_robust_list", 305 }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 311 }, - { "getcwd", 183 }, - { "getdents", 141 }, - { "getdents64", 220 }, - { "getegid", 202 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 201 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 200 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 205 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 105 }, - { "getpeername", 368 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 188 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 349 }, - { "getresgid", 211 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 209 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", 191 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 367 }, - { "getsockopt", 365 }, - { "gettid", 236 }, - { "gettimeofday", 78 }, - { "getuid", 199 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 227 }, - { "gtty", __PNR_gtty }, - { "idle", 112 }, - { "init_module", 128 }, - { "inotify_add_watch", 285 }, - { "inotify_init", 284 }, - { "inotify_init1", 324 }, - { "inotify_rm_watch", 286 }, - { "io_cancel", 247 }, - { "io_destroy", 244 }, - { "io_getevents", 245 }, - { "io_pgetevents", 382 }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", 243 }, - { "io_submit", 246 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", __PNR_ioperm}, - { "iopl", __PNR_iopl }, - { "ioprio_get", 283 }, - { "ioprio_set", 282 }, - { "ipc", 117 }, - { "kcmp", 343 }, - { "kexec_file_load", 381 }, - { "kexec_load", 277 }, - { "keyctl", 280 }, - { "kill", 37 }, - { "lchown", 198 }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 228 }, - { "link", 9 }, - { "linkat", 296 }, - { "listen", 363 }, - { "listxattr", 230 }, - { "llistxattr", 231 }, - { "lock", __PNR_lock }, - { "lookup_dcookie", 110 }, - { "lremovexattr", 234 }, - { "lseek", 19 }, - { "lsetxattr", 225 }, - { "lstat", 107 }, - { "lstat64", __PNR_lstat64 }, - { "madvise", 219 }, - { "mbind", 268 }, - { "membarrier", 356 }, - { "memfd_create", 350 }, - { "migrate_pages", 287 }, - { "mincore", 218 }, - { "mkdir", 39 }, - { "mkdirat", 289 }, - { "mknod", 14 }, - { "mknodat", 290 }, - { "mlock", 150 }, - { "mlock2", 374 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", __PNR_modify_ldt }, - { "mount", 21 }, - { "move_mount", 429 }, - { "move_pages", 310 }, - { "mprotect", 125 }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", 276 }, - { "mq_notify", 275 }, - { "mq_open", 271 }, - { "mq_timedreceive", 274 }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", 273 }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", 272 }, - { "mremap", 163 }, - { "msgctl", 402 }, - { "msgget", 399 }, - { "msgrcv", 401 }, - { "msgsnd", 400 }, - { "msync", 144 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 335 }, - { "nanosleep", 162 }, - { "newfstatat", 293 }, - { "nfsservctl", 169 }, - { "nice", 34 }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 336 }, - { "open_tree", 428 }, - { "openat", 288 }, - { "pause", 29 }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 331 }, - { "personality", 136 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 42 }, - { "pipe2", 325 }, - { "pivot_root", 217 }, - { "pkey_alloc", 385 }, - { "pkey_free", 386 }, - { "pkey_mprotect", 384 }, - { "poll", 168 }, - { "ppoll", 302 }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", 172 }, - { "pread64", 180 }, - { "preadv", 328 }, - { "preadv2", 376 }, - { "prlimit64", 334 }, - { "process_vm_readv", 340 }, - { "process_vm_writev", 341 }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", 301 }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", 26 }, - { "putpmsg", 189 }, - { "pwrite64", 181 }, - { "pwritev", 329 }, - { "pwritev2", 377 }, - { "query_module", 167 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 222 }, - { "readdir", 89 }, - { "readlink", 85 }, - { "readlinkat", 298 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", __PNR_recv }, - { "recvfrom", 371 }, - { "recvmmsg", 357 }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", 372 }, - { "remap_file_pages", 267 }, - { "removexattr", 233 }, - { "rename", 38 }, - { "renameat", 295 }, - { "renameat2", 347 }, - { "request_key", 279 }, - { "restart_syscall", 7 }, - { "rmdir", 40 }, - { "rseq", 383 }, - { "rt_sigaction", 174 }, - { "rt_sigpending", 176 }, - { "rt_sigprocmask", 175 }, - { "rt_sigqueueinfo", 178 }, - { "rt_sigreturn", 173 }, - { "rt_sigsuspend", 179 }, - { "rt_sigtimedwait", 177 }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", 330 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", 378 }, - { "s390_pci_mmio_read", 353 }, - { "s390_pci_mmio_write", 352 }, - { "s390_runtime_instr", 342 }, - { "s390_sthyi", 380 }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 240 }, - { "sched_getattr", 346 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", 239 }, - { "sched_setattr", 345 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 348 }, - { "security", __PNR_security }, - { "select", 142 }, - { "semctl", 394 }, - { "semget", 393 }, - { "semop", __PNR_semop }, - { "semtimedop", 392 }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", __PNR_send }, - { "sendfile", 187 }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", 358 }, - { "sendmsg", 370 }, - { "sendto", 369 }, - { "set_mempolicy", 270 }, - { "set_robust_list", 304 }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", 252 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 216 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 215 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 214 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 206 }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 339 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 204 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 210 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 208 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 203 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 366 }, - { "settimeofday", 79 }, - { "setuid", 213 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 224 }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", 397 }, - { "shmctl", 396 }, - { "shmdt", 398 }, - { "shmget", 395 }, - { "shutdown", 373 }, - { "sigaction", 67 }, - { "sigaltstack", 186 }, - { "signal", 48 }, - { "signalfd", 316 }, - { "signalfd4", 322 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", 119 }, - { "sigsuspend", 72 }, - { "socket", 359 }, - { "socketcall", 102 }, - { "socketpair", 360 }, - { "splice", 306 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", 106 }, - { "stat64", __PNR_stat64 }, - { "statfs", 99 }, - { "statfs64", 265 }, - { "statx", 379 }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", 83 }, - { "symlinkat", 297 }, - { "sync", 36 }, - { "sync_file_range", 307 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 338 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 308 }, - { "tgkill", 241 }, - { "time", __PNR_time }, - { "timer_create", 254 }, - { "timer_delete", 258 }, - { "timer_getoverrun", 257 }, - { "timer_gettime", 256 }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", 255 }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", 317 }, - { "timerfd_create", 319 }, - { "timerfd_gettime", 321 }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", 320 }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", 43 }, - { "tkill", 237 }, - { "truncate", 92 }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", 60 }, - { "umount", 22 }, - { "umount2", 52 }, - { "uname", 122 }, - { "unlink", 10 }, - { "unlinkat", 294 }, - { "unshare", 303 }, - { "uselib", 86 }, - { "userfaultfd", 355 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 315 }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", 313 }, - { "vfork", 190 }, - { "vhangup", 111 }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 309 }, - { "vserver", __PNR_vserver }, - { "wait4", 114 }, - { "waitid", 281 }, - { "waitpid", __PNR_waitpid }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int s390x_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = s390x_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (strcmp(name, "accept") == 0) - return __PNR_accept; - if (strcmp(name, "accept4") == 0) - return __PNR_accept4; - else if (strcmp(name, "bind") == 0) - return __PNR_bind; - else if (strcmp(name, "connect") == 0) - return __PNR_connect; - else if (strcmp(name, "getpeername") == 0) - return __PNR_getpeername; - else if (strcmp(name, "getsockname") == 0) - return __PNR_getsockname; - else if (strcmp(name, "getsockopt") == 0) - return __PNR_getsockopt; - else if (strcmp(name, "listen") == 0) - return __PNR_listen; - else if (strcmp(name, "recv") == 0) - return __PNR_recv; - else if (strcmp(name, "recvfrom") == 0) - return __PNR_recvfrom; - else if (strcmp(name, "recvmsg") == 0) - return __PNR_recvmsg; - else if (strcmp(name, "recvmmsg") == 0) - return __PNR_recvmmsg; - else if (strcmp(name, "send") == 0) - return __PNR_send; - else if (strcmp(name, "sendmsg") == 0) - return __PNR_sendmsg; - else if (strcmp(name, "sendmmsg") == 0) - return __PNR_sendmmsg; - else if (strcmp(name, "sendto") == 0) - return __PNR_sendto; - else if (strcmp(name, "setsockopt") == 0) - return __PNR_setsockopt; - else if (strcmp(name, "shmat") == 0) - return __PNR_shmat; - else if (strcmp(name, "shmdt") == 0) - return __PNR_shmdt; - else if (strcmp(name, "shmget") == 0) - return __PNR_shmget; - else if (strcmp(name, "shmctl") == 0) - return __PNR_shmctl; - else if (strcmp(name, "shutdown") == 0) - return __PNR_shutdown; - else if (strcmp(name, "socket") == 0) - return __PNR_socket; - else if (strcmp(name, "socketpair") == 0) - return __PNR_socketpair; - - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *s390x_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = s390x_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (num == __PNR_accept) - return "accept"; - else if (num == __PNR_accept4) - return "accept4"; - else if (num == __PNR_bind) - return "bind"; - else if (num == __PNR_connect) - return "connect"; - else if (num == __PNR_getpeername) - return "getpeername"; - else if (num == __PNR_getsockname) - return "getsockname"; - else if (num == __PNR_getsockopt) - return "getsockopt"; - else if (num == __PNR_listen) - return "listen"; - else if (num == __PNR_recv) - return "recv"; - else if (num == __PNR_recvfrom) - return "recvfrom"; - else if (num == __PNR_recvmsg) - return "recvmsg"; - else if (num == __PNR_recvmmsg) - return "recvmmsg"; - else if (num == __PNR_send) - return "send"; - else if (num == __PNR_sendmsg) - return "sendmsg"; - else if (num == __PNR_sendmmsg) - return "sendmmsg"; - else if (num == __PNR_sendto) - return "sendto"; - else if (num == __PNR_setsockopt) - return "setsockopt"; - else if (num == __PNR_shmat) - return "shmat"; - else if (num == __PNR_shmdt) - return "shmdt"; - else if (num == __PNR_shmget) - return "shmget"; - else if (num == __PNR_shmctl) - return "shmctl"; - else if (num == __PNR_shutdown) - return "shutdown"; - else if (num == __PNR_socket) - return "socket"; - else if (num == __PNR_socketpair) - return "socketpair"; - - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *s390x_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &s390x_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-s390x.c libseccomp-2.5.1/src/arch-s390x.c --- libseccomp-2.4.3/src/arch-s390x.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390x.c 2020-11-17 08:34:38.780027364 +1030 @@ -8,6 +8,8 @@ #include #include +#include "db.h" +#include "syscalls.h" #include "arch.h" #include "arch-s390x.h" @@ -15,16 +17,159 @@ #define __s390x_NR_socketcall 102 #define __s390x_NR_ipc 117 -const struct arch_def arch_def_s390x = { - .token = SCMP_ARCH_S390X, - .token_bpf = AUDIT_ARCH_S390X, - .size = ARCH_SIZE_64, - .endian = ARCH_ENDIAN_BIG, - .syscall_resolve_name = s390x_syscall_resolve_name, - .syscall_resolve_num = s390x_syscall_resolve_num, - .syscall_rewrite = s390x_syscall_rewrite, - .rule_add = s390x_rule_add, -}; +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int s390x_syscall_resolve_name_munge(const char *name) +{ + if (strcmp(name, "accept") == 0) + return __PNR_accept; + if (strcmp(name, "accept4") == 0) + return __PNR_accept4; + else if (strcmp(name, "bind") == 0) + return __PNR_bind; + else if (strcmp(name, "connect") == 0) + return __PNR_connect; + else if (strcmp(name, "getpeername") == 0) + return __PNR_getpeername; + else if (strcmp(name, "getsockname") == 0) + return __PNR_getsockname; + else if (strcmp(name, "getsockopt") == 0) + return __PNR_getsockopt; + else if (strcmp(name, "listen") == 0) + return __PNR_listen; + else if (strcmp(name, "msgctl") == 0) + return __PNR_msgctl; + else if (strcmp(name, "msgget") == 0) + return __PNR_msgget; + else if (strcmp(name, "msgrcv") == 0) + return __PNR_msgrcv; + else if (strcmp(name, "msgsnd") == 0) + return __PNR_msgsnd; + else if (strcmp(name, "recv") == 0) + return __PNR_recv; + else if (strcmp(name, "recvfrom") == 0) + return __PNR_recvfrom; + else if (strcmp(name, "recvmsg") == 0) + return __PNR_recvmsg; + else if (strcmp(name, "recvmmsg") == 0) + return __PNR_recvmmsg; + else if (strcmp(name, "semctl") == 0) + return __PNR_semctl; + else if (strcmp(name, "semget") == 0) + return __PNR_semget; + else if (strcmp(name, "semtimedop") == 0) + return __PNR_semtimedop; + else if (strcmp(name, "send") == 0) + return __PNR_send; + else if (strcmp(name, "sendmsg") == 0) + return __PNR_sendmsg; + else if (strcmp(name, "sendmmsg") == 0) + return __PNR_sendmmsg; + else if (strcmp(name, "sendto") == 0) + return __PNR_sendto; + else if (strcmp(name, "setsockopt") == 0) + return __PNR_setsockopt; + else if (strcmp(name, "shmat") == 0) + return __PNR_shmat; + else if (strcmp(name, "shmdt") == 0) + return __PNR_shmdt; + else if (strcmp(name, "shmget") == 0) + return __PNR_shmget; + else if (strcmp(name, "shmctl") == 0) + return __PNR_shmctl; + else if (strcmp(name, "shutdown") == 0) + return __PNR_shutdown; + else if (strcmp(name, "socket") == 0) + return __PNR_socket; + else if (strcmp(name, "socketpair") == 0) + return __PNR_socketpair; + + return s390x_syscall_resolve_name(name); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *s390x_syscall_resolve_num_munge(int num) +{ + if (num == __PNR_accept) + return "accept"; + else if (num == __PNR_accept4) + return "accept4"; + else if (num == __PNR_bind) + return "bind"; + else if (num == __PNR_connect) + return "connect"; + else if (num == __PNR_getpeername) + return "getpeername"; + else if (num == __PNR_getsockname) + return "getsockname"; + else if (num == __PNR_getsockopt) + return "getsockopt"; + else if (num == __PNR_listen) + return "listen"; + else if (num == __PNR_msgctl) + return "msgctl"; + else if (num == __PNR_msgget) + return "msgget"; + else if (num == __PNR_msgrcv) + return "msgrcv"; + else if (num == __PNR_msgsnd) + return "msgsnd"; + else if (num == __PNR_recv) + return "recv"; + else if (num == __PNR_recvfrom) + return "recvfrom"; + else if (num == __PNR_recvmsg) + return "recvmsg"; + else if (num == __PNR_recvmmsg) + return "recvmmsg"; + else if (num == __PNR_semctl) + return "semctl"; + else if (num == __PNR_semget) + return "semget"; + else if (num == __PNR_semtimedop) + return "semtimedop"; + else if (num == __PNR_send) + return "send"; + else if (num == __PNR_sendmsg) + return "sendmsg"; + else if (num == __PNR_sendmmsg) + return "sendmmsg"; + else if (num == __PNR_sendto) + return "sendto"; + else if (num == __PNR_setsockopt) + return "setsockopt"; + else if (num == __PNR_shmat) + return "shmat"; + else if (num == __PNR_shmdt) + return "shmdt"; + else if (num == __PNR_shmget) + return "shmget"; + else if (num == __PNR_shmctl) + return "shmctl"; + else if (num == __PNR_shutdown) + return "shutdown"; + else if (num == __PNR_socket) + return "socket"; + else if (num == __PNR_socketpair) + return "socketpair"; + + return s390x_syscall_resolve_num(num); +} /** * Convert a multiplexed pseudo socket syscall into a direct syscall @@ -450,3 +595,14 @@ free(rule_dup); return rc; } + +const struct arch_def arch_def_s390x = { + .token = SCMP_ARCH_S390X, + .token_bpf = AUDIT_ARCH_S390X, + .size = ARCH_SIZE_64, + .endian = ARCH_ENDIAN_BIG, + .syscall_resolve_name = s390x_syscall_resolve_name_munge, + .syscall_resolve_num = s390x_syscall_resolve_num_munge, + .syscall_rewrite = s390x_syscall_rewrite, + .rule_add = s390x_rule_add, +}; diff -Nru libseccomp-2.4.3/src/arch-s390x.h libseccomp-2.5.1/src/arch-s390x.h --- libseccomp-2.4.3/src/arch-s390x.h 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-s390x.h 2020-11-17 08:34:38.780027364 +1030 @@ -6,27 +6,8 @@ #ifndef _ARCH_S390X_H #define _ARCH_S390X_H -#include - #include "arch.h" -#include "db.h" -#include "system.h" - -#define s390x_arg_count_max 6 - -extern const struct arch_def arch_def_s390x; -#define s390x_arg_offset(x) (offsetof(struct seccomp_data, args[x])) - -#define s390x_arg_offset_lo(x) (s390x_arg_offset(x) + 4) -#define s390x_arg_offset_hi(x) (s390x_arg_offset(x)) - -int s390x_syscall_resolve_name(const char *name); -const char *s390x_syscall_resolve_num(int num); - -const struct arch_syscall_def *s390x_syscall_iterate(unsigned int spot); - -int s390x_syscall_rewrite(int *syscall); -int s390x_rule_add(struct db_filter *db, struct db_api_rule_list *rule); +ARCH_DECL(s390x) #endif diff -Nru libseccomp-2.4.3/src/arch-syscall-dump.c libseccomp-2.5.1/src/arch-syscall-dump.c --- libseccomp-2.4.3/src/arch-syscall-dump.c 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-syscall-dump.c 2020-11-17 08:34:38.780027364 +1030 @@ -39,8 +39,10 @@ #include "arch-mips64n32.h" #include "arch-aarch64.h" #include "arch-parisc.h" +#include "arch-parisc64.h" #include "arch-ppc.h" #include "arch-ppc64.h" +#include "arch-riscv64.h" #include "arch-s390.h" #include "arch-s390x.h" @@ -117,9 +119,11 @@ sys = mips64n32_syscall_iterate(iter); break; case SCMP_ARCH_PARISC: - case SCMP_ARCH_PARISC64: sys = parisc_syscall_iterate(iter); break; + case SCMP_ARCH_PARISC64: + sys = parisc64_syscall_iterate(iter); + break; case SCMP_ARCH_PPC: sys = ppc_syscall_iterate(iter); break; @@ -127,6 +131,9 @@ case SCMP_ARCH_PPC64LE: sys = ppc64_syscall_iterate(iter); break; + case SCMP_ARCH_RISCV64: + sys = riscv64_syscall_iterate(iter); + break; case SCMP_ARCH_S390: sys = s390_syscall_iterate(iter); break; diff -Nru libseccomp-2.4.3/src/arch-syscall-validate libseccomp-2.5.1/src/arch-syscall-validate --- libseccomp-2.4.3/src/arch-syscall-validate 2020-03-03 02:13:34.189033124 +1030 +++ libseccomp-2.5.1/src/arch-syscall-validate 2020-11-17 08:34:38.781027373 +1030 @@ -4,6 +4,8 @@ # libseccomp syscall validation script # # Copyright (c) 2014 Red Hat +# Copyright (c) 2020 Cisco Systems, Inc. +# # Author: Paul Moore # @@ -57,18 +59,39 @@ # function usage() { cat << EOF -usage: arch-syscall-validate [-h] [-a ] +usage: arch-syscall-validate [-h] [-c] [-a ] libseccomp syscall validation script optional arguments: -h show this help message and exit -a architecture -l output the library's syscall definitions - -s output the system's syscall definitions + -s output the kernel's syscall definitions + -c generate a CSV of the kernel's syscall definitions EOF } # +# Dump the kernel version +# +# Arguments: +# 1 path to the kernel source +# +# Dump the kernel's version information to stdout. +# +function kernel_version() { + local maj=$(cat $1/Makefile | \ + grep "^VERSION =" | awk -F "= " '{ print $2 }') + local min=$(cat $1/Makefile | \ + grep "^PATCHLEVEL =" | awk -F "= " '{ print $2 }') + local sub=$(cat $1/Makefile | \ + grep "^SUBLEVEL =" | awk -F "= " '{ print $2 }') + local xtr=$(cat $1/Makefile | \ + grep "^EXTRAVERSION =" | awk -F "= " '{ print $2 }') + echo "${maj}.${min}.${sub}${xtr}" +} + +# # Dump the library syscall table for a given architecture # # Arguments: @@ -84,7 +107,58 @@ [[ -z $1 ]] && return [[ -n $2 ]] && offset_str="-o $2" - $LIB_SYS_DUMP -a $1 $offset_str | sed -e '/[^\t]\+\t-[0-9]\+/d' | sort + $LIB_SYS_DUMP -a $1 $offset_str | sed 's/\t/,/' | sort +} + +# +# Mangle the library pseudo syscall values +# +# Arguments: +# 1 architecture +# +# Mangle the supplied pseudo syscall to match the system values +# +function mangle_lib_syscall() { + local sed_filter="" + + sed_filter+='s/accept4,-118/accept4,364/;' + sed_filter+='s/bind,-102/bind,361/;' + sed_filter+='s/connect,-103/connect,362/;' + sed_filter+='s/getpeername,-107/getpeername,368/;' + sed_filter+='s/getsockname,-106/getsockname,367/;' + sed_filter+='s/getsockopt,-115/getsockopt,365/;' + sed_filter+='s/listen,-104/listen,363/;' + sed_filter+='s/msgctl,-214/msgctl,402/;' + sed_filter+='s/msgget,-213/msgget,399/;' + sed_filter+='s/msgrcv,-212/msgrcv,401/;' + sed_filter+='s/msgsnd,-211/msgsnd,400/;' + sed_filter+='s/recvfrom,-112/recvfrom,371/;' + sed_filter+='s/recvmsg,-117/recvmsg,372/;' + sed_filter+='s/semctl,-203/semctl,394/;' + sed_filter+='s/semget,-202/semget,393/;' + sed_filter+='s/sendmsg,-116/sendmsg,370/;' + sed_filter+='s/sendto,-111/sendto,369/;' + sed_filter+='s/setsockopt,-114/setsockopt,366/;' + sed_filter+='s/shmat,-221/shmat,397/;' + sed_filter+='s/shmctl,-224/shmctl,396/;' + sed_filter+='s/shmdt,-222/shmdt,398/;' + sed_filter+='s/shmget,-223/shmget,395/;' + sed_filter+='s/shutdown,-113/shutdown,373/;' + sed_filter+='s/socket,-101/socket,359/;' + sed_filter+='s/socketpair,-108/socketpair,360/;' + + case $1 in + s390|s390x) + sed_filter+='s/recvmmsg,-119/recvmmsg,357/;' + sed_filter+='s/sendmmsg,-120/sendmmsg,358/;' + ;; + *) + sed_filter+='s/recvmmsg,-119/recvmmsg,337/;' + sed_filter+='s/sendmmsg,-120/sendmmsg,345/;' + ;; + esac + + sed $sed_filter | sed '/,-[0-9]\+$/d' } # @@ -97,7 +171,7 @@ # function dump_sys_x86() { cat $1/arch/x86/entry/syscalls/syscall_32.tbl | \ - grep -v "^#" | awk '{ print $3"\t"$1 }' | sed '/^[ \t]*$/d' | \ + grep -v "^#" | awk '{ print $3","$1 }' | \ sort } @@ -107,7 +181,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_x86() { - dump_lib_arch x86 + dump_lib_arch x86 | mangle_lib_syscall x86 } # @@ -120,8 +194,8 @@ # function dump_sys_x86_64() { cat $1/arch/x86/entry/syscalls/syscall_64.tbl | \ - grep -v "^#" | awk '{ print $2,$3,$1 }' | sed -e '/^x32/d' | \ - awk '{ print $2"\t"$3 }' | sed '/^[ \t]*$/d' | sort + grep -v "^#" | sed '/^$/d' | awk '{ print $2,$3,$1 }' | \ + sed '/^x32/d' | awk '{ print $2","$3 }' | sort } # @@ -130,7 +204,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_x86_64() { - dump_lib_arch x86_64 + dump_lib_arch x86_64 | mangle_lib_syscall x86_64 } # @@ -143,8 +217,8 @@ # function dump_sys_x32() { cat $1/arch/x86/entry/syscalls/syscall_64.tbl | \ - grep -v "^#" | awk '{ print $2,$3,$1 }' | sed -e '/^64/d' | \ - awk '{ print $2"\t"$3 }' | sed '/^[ \t]*$/d' | sort + grep -v "^#" | sed '/^$/d' | awk '{ print $2,$3,$1 }' | \ + sed '/^64/d' | awk '{ print $2","$3 }' | sort } # @@ -153,8 +227,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_x32() { - # 1073741824 == 0x40000000 - dump_lib_arch x32 1073741824 + dump_lib_arch x32 | mangle_lib_syscall x32 } # @@ -167,12 +240,13 @@ # function dump_sys_arm() { cat $1/arch/arm/tools/syscall.tbl | grep -v "^#" | \ - sed -ne "/[0-9]\+[ \t]\+\(common\|eabi\)/p" | \ - awk '{ print $3"\t"$1 }' | sort | (cat -; \ + sed -n "/[0-9]\+[ \t]\+\(common\|eabi\)/p" | \ + awk '{ print $3","$1 }' | sort | (cat -; \ (cat $1/arch/arm/include/uapi/asm/unistd.h | \ - grep "^#define __ARM_NR_" | grep -v "^#define __ARM_NR_BASE" | \ - sed -e 's/#define __ARM_NR_\([a-z0-9_]*\)[ \t]\+(__ARM_NR_BASE+\(.*\))/\1 983040 + \2/' | \ - awk '{ print $1"\t"$2+$4 }')) | sort + grep "^#define __ARM_NR_" | \ + grep -v "^#define __ARM_NR_BASE" | \ + sed 's/#define __ARM_NR_\([a-z0-9_]*\)[ \t]\+(__ARM_NR_BASE+\(.*\))/\1 983040 + \2/' | \ + awk '{ print $1","$2+$4 }')) | sort } # @@ -182,7 +256,8 @@ # function dump_lib_arm() { # NOTE: arm_sync_file_range() and sync_file_range2() share values - dump_lib_arch arm | sed -e '/sync_file_range2[ \t]\+341/d' + dump_lib_arch arm | sed '/sync_file_range2,\+341/d' | \ + mangle_lib_syscall arm } # @@ -194,28 +269,31 @@ # Dump the architecture's syscall table to stdout. # function dump_sys_aarch64() { + local sed_filter="" + + sed_filter+='s/__NR3264_statfs/43/;' + sed_filter+='s/__NR3264_ftruncate/46/;' + sed_filter+='s/__NR3264_truncate/45/;' + sed_filter+='s/__NR3264_lseek/62/;' + sed_filter+='s/__NR3264_sendfile/71/;' + sed_filter+='s/__NR3264_fstatat/79/;' + sed_filter+='s/__NR3264_fstatfs/44/;' + sed_filter+='s/__NR3264_fcntl/25/;' + sed_filter+='s/__NR3264_fadvise64/223/;' + sed_filter+='s/__NR3264_mmap/222/;' + sed_filter+='s/__NR3264_fstat/80/;' + sed_filter+='s/__NR3264_lstat/1039/;' + sed_filter+='s/__NR3264_stat/1038/;' + gcc -E -dM -I$1/include/uapi \ -D__BITS_PER_LONG=64 -D__ARCH_WANT_RENAMEAT \ -D__ARCH_WANT_NEW_STAT \ - $1/include/uapi/asm-generic/unistd.h | \ + $1/arch/arm64/include/uapi/asm/unistd.h | \ grep "^#define __NR_" | \ - sed -e '/__NR_syscalls/d' | \ - sed -e '/__NR_arch_specific_syscall/d' | \ - sed -e 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+\(.*\)/\1\t\2/' | \ - sed -e 's/__NR3264_statfs/43/' | \ - sed -e 's/__NR3264_ftruncate/46/' | \ - sed -e 's/__NR3264_truncate/45/' | \ - sed -e 's/__NR3264_lseek/62/' | \ - sed -e 's/__NR3264_sendfile/71/' | \ - sed -e 's/__NR3264_fstatat/79/' | \ - sed -e 's/__NR3264_fstatfs/44/' | \ - sed -e 's/__NR3264_fcntl/25/' | \ - sed -e 's/__NR3264_fadvise64/223/' | \ - sed -e 's/__NR3264_mmap/222/' | \ - sed -e 's/__NR3264_fstat/80/' | \ - sed -e 's/__NR3264_lstat/1039/' | \ - sed -e 's/__NR3264_stat/1038/' | \ - sort + sed '/__NR_syscalls/d' | \ + sed '/__NR_arch_specific_syscall/d' | \ + sed 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+\(.*\)/\1,\2/' | \ + sed $sed_filter | sort } # @@ -224,7 +302,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_aarch64() { - dump_lib_arch aarch64 + dump_lib_arch aarch64 | mangle_lib_syscall aarch64 } # @@ -236,23 +314,11 @@ # Dump the architecture's syscall table to stdout. # function dump_sys_mips() { - pushd $1 2>&1 > /dev/null - make ARCH=mips archheaders - popd 2>&1 > /dev/null - # _MIPS_SIM values: - # _MIPS_SIM_ABI32 == 1 - # _MIPS_SIM_NABI32 == 2 - # _MIPS_SIM_ABI64 == 3 - gcc -E -dM -I$1/arch/mips/include/uapi -I$1/arch/mips/include/generated/uapi -D_MIPS_SIM=1 $1/arch/mips/include/uapi/asm/unistd.h | \ - grep "^#define __NR_" | \ - grep -v "^#define __NR_O32_" | \ - grep -v "^#define __NR_N32_" | \ - grep -v "^#define __NR_64_" | \ - grep -v "^#define __NR_Linux" | \ - grep -v "^#define __NR_unused" | \ - grep -v "^#define __NR_reserved" | \ - sed -e 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+(__NR_Linux[ \t]*+[ \t]*\([0-9]\+\)).*/\1\t\2/' | \ - sort + cat $1/arch/mips/kernel/syscalls/syscall_o32.tbl | \ + grep -v "^#" | \ + sed -e '/[ \t]\+reserved[0-9]\+[ \t]\+/d;' | \ + sed -e '/[ \t]\+unused[0-9]\+[ \t]\+/d;' | \ + awk '{ print $3","$1 }' | sort } # @@ -261,7 +327,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_mips() { - dump_lib_arch mips 4000 + dump_lib_arch mips | mangle_lib_syscall mips } # @@ -273,23 +339,11 @@ # Dump the architecture's syscall table to stdout. # function dump_sys_mips64() { - pushd $1 2>&1 > /dev/null - make ARCH=mips archheaders - popd 2>&1 > /dev/null - # _MIPS_SIM values: - # _MIPS_SIM_ABI32 == 1 - # _MIPS_SIM_NABI32 == 2 - # _MIPS_SIM_ABI64 == 3 - gcc -E -dM -I$1/arch/mips/include/uapi -I$1/arch/mips/include/generated/uapi -D_MIPS_SIM=3 $1/arch/mips/include/uapi/asm/unistd.h | \ - grep "^#define __NR_" | \ - grep -v "^#define __NR_O32_" | \ - grep -v "^#define __NR_N32_" | \ - grep -v "^#define __NR_64_" | \ - grep -v "^#define __NR_Linux" | \ - grep -v "^#define __NR_unused" | \ - grep -v "^#define __NR_reserved" | \ - sed -e 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+(__NR_Linux[ \t]*+[ \t]*\([0-9]\+\)).*/\1\t\2/' | \ - sort + cat $1/arch/mips/kernel/syscalls/syscall_n64.tbl | \ + grep -v "^#" | \ + sed -e '/[ \t]\+reserved[0-9]\+[ \t]\+/d;' | \ + sed -e '/[ \t]\+unused[0-9]\+[ \t]\+/d;' | \ + awk '{ print $3","$1 }' | sort } # @@ -298,7 +352,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_mips64() { - dump_lib_arch mips64 5000 + dump_lib_arch mips64 | mangle_lib_syscall mips64 } # @@ -310,23 +364,11 @@ # Dump the architecture's syscall table to stdout. # function dump_sys_mips64n32() { - pushd $1 2>&1 > /dev/null - make ARCH=mips archheaders - popd 2>&1 > /dev/null - # _MIPS_SIM values: - # _MIPS_SIM_ABI32 == 1 - # _MIPS_SIM_NABI32 == 2 - # _MIPS_SIM_ABI64 == 3 - gcc -E -dM -I$1/arch/mips/include/uapi -I$1/arch/mips/include/generated/uapi -D_MIPS_SIM=2 $1/arch/mips/include/uapi/asm/unistd.h | \ - grep "^#define __NR_" | \ - grep -v "^#define __NR_O32_" | \ - grep -v "^#define __NR_N32_" | \ - grep -v "^#define __NR_64_" | \ - grep -v "^#define __NR_Linux" | \ - grep -v "^#define __NR_unused" | \ - grep -v "^#define __NR_reserved" | \ - sed -e 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+(__NR_Linux[ \t]*+[ \t]*\([0-9]\+\)).*/\1\t\2/' | \ - sort + cat $1/arch/mips/kernel/syscalls/syscall_n32.tbl | \ + grep -v "^#" | \ + sed -e '/[ \t]\+reserved[0-9]\+[ \t]\+/d;' | \ + sed -e '/[ \t]\+unused[0-9]\+[ \t]\+/d;' | \ + awk '{ print $3","$1 }' | sort } # @@ -335,7 +377,57 @@ # Dump the library's syscall table to stdout. # function dump_lib_mips64n32() { - dump_lib_arch mips64n32 6000 + dump_lib_arch mips64n32 | mangle_lib_syscall mips64n32 +} + +# +# Dump the parisc system syscall table +# +# Arguments: +# 1 path to the kernel source +# +# Dump the architecture's syscall table to stdout. +# +function dump_sys_parisc() { + cat $1/arch/parisc/kernel/syscalls/syscall.tbl | \ + grep -v "^#" | \ + sed -n "/[0-9]\+[ \t]\+\(common\|32\)/p" | \ + awk '{ print $3","$1 }' | \ + sort +} + +# +# Dump the parisc library syscall table +# +# Dump the library's syscall table to stdout. +# +function dump_lib_parisc() { + dump_lib_arch parisc | mangle_lib_syscall parisc +} + +# +# Dump the parisc64 system syscall table +# +# Arguments: +# 1 path to the kernel source +# +# Dump the architecture's syscall table to stdout. +# +function dump_sys_parisc64() { + cat $1/arch/parisc/kernel/syscalls/syscall.tbl | \ + grep -v "^#" | \ + sed -n "/[0-9]\+[ \t]\+\(common\|64\)/p" | \ + awk '{ print $3","$1 }' | \ + sort +} + +# +# Dump the parisc64 library syscall table +# +# Dump the library's syscall table to stdout. +# +function dump_lib_parisc64() { + dump_lib_arch parisc64 | mangle_lib_syscall parisc64 } # @@ -349,11 +441,7 @@ function dump_sys_ppc() { cat $1/arch/powerpc/kernel/syscalls/syscall.tbl | grep -v "^#" | \ sed -ne "/[0-9]\+[ \t]\+\(common\|nospu\|32\)/p" | \ - awk '{ print $3"\t"$1 }' | sort | (cat -; \ - (cat $1/arch/powerpc/include/uapi/asm/unistd.h | \ - grep "^#define __PPC_NR_" | grep -v "^#define __PPC_NR_BASE" | \ - sed -e 's/#define _PPC_NR_\([a-z0-9_]*\)[ \t]\+(__PPC_NR_BASE+\(.*\))/\1 983040 + \2/' | \ - awk '{ print $1"\t"$2+$4 }')) | sort + awk '{ print $3","$1 }' | sort } # @@ -362,7 +450,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_ppc() { - dump_lib_arch ppc + dump_lib_arch ppc | mangle_lib_syscall ppc } # @@ -376,11 +464,7 @@ function dump_sys_ppc64() { cat $1/arch/powerpc/kernel/syscalls/syscall.tbl | grep -v "^#" | \ sed -ne "/[0-9]\+[ \t]\+\(common\|nospu\|64\)/p" | \ - awk '{ print $3"\t"$1 }' | sort | (cat -; \ - (cat $1/arch/powerpc/include/uapi/asm/unistd.h | \ - grep "^#define __PPC_NR_" | grep -v "^#define __PPC_NR_BASE" | \ - sed -e 's/#define _PPC_NR_\([a-z0-9_]*\)[ \t]\+(__PPC_NR_BASE+\(.*\))/\1 983040 + \2/' | \ - awk '{ print $1"\t"$2+$4 }')) | sort + awk '{ print $3","$1 }' | sort } # @@ -389,7 +473,50 @@ # Dump the library's syscall table to stdout. # function dump_lib_ppc64() { - dump_lib_arch ppc64 + dump_lib_arch ppc64 | mangle_lib_syscall ppc64 +} + +# +# Dump the riscv64 system syscall table +# +# Arguments: +# 1 path to the kernel source +# +# Dump the architecture's syscall table to stdout. +# +function dump_sys_riscv64() { + local sed_filter="" + + sed_filter+='s/__NR3264_fadvise64/223/;' + sed_filter+='s/__NR3264_fcntl/25/;' + sed_filter+='s/__NR3264_fstatat/79/;' + sed_filter+='s/__NR3264_fstatfs/44/;' + sed_filter+='s/__NR3264_ftruncate/46/;' + sed_filter+='s/__NR3264_lseek/62/;' + sed_filter+='s/__NR3264_mmap/222/;' + sed_filter+='s/__NR3264_sendfile/71/;' + sed_filter+='s/__NR3264_statfs/43/;' + sed_filter+='s/__NR3264_truncate/45/;' + sed_filter+='s/__NR3264_fstat/80/;' + + gcc -E -dM -I$1/include/uapi \ + -D__BITS_PER_LONG=64 -D__ARCH_WANT_NEW_STAT \ + $1/arch/riscv/include/uapi/asm/unistd.h | \ + grep "^#define __NR_" | \ + sed '/__NR_syscalls/d' | \ + sed 's/(__NR_arch_specific_syscall + 15)/259/' | \ + sed '/__NR_arch_specific_syscall/d' | \ + sed 's/#define[ \t]\+__NR_\([^ \t]\+\)[ \t]\+\(.*\)/\1,\2/' | \ + sed $sed_filter | sort +} + +# +# Dump the riscv64 library syscall table +# +# Dump the library's syscall table to stdout. +# +function dump_lib_riscv64() { + dump_lib_arch riscv64 | mangle_lib_syscall riscv64 } # @@ -403,11 +530,8 @@ function dump_sys_s390() { cat $1/arch/s390/kernel/syscalls/syscall.tbl | grep -v "^#" | \ sed -ne "/[0-9]\+[ \t]\+\(common\|32\)/p" | \ - awk '{ print $3"\t"$1 }' | sort | (cat -; \ - (cat $1/arch/s390/include/uapi/asm/unistd.h | \ - grep "^#define __PPC_NR_" | grep -v "^#define __PPC_NR_BASE" | \ - sed -e 's/#define _PPC_NR_\([a-z0-9_]*\)[ \t]\+(__PPC_NR_BASE+\(.*\))/\1 983040 + \2/' | \ - awk '{ print $1"\t"$2+$4 }')) | sort + awk '{ print $3","$1 }' | \ + sort } # @@ -416,7 +540,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_s390() { - dump_lib_arch s390 + dump_lib_arch s390 | mangle_lib_syscall s390 } # @@ -430,11 +554,8 @@ function dump_sys_s390x() { cat $1/arch/s390/kernel/syscalls/syscall.tbl | grep -v "^#" | \ sed -ne "/[0-9]\+[ \t]\+\(common\|64\)/p" | \ - awk '{ print $3"\t"$1 }' | sort | (cat -; \ - (cat $1/arch/s390/include/uapi/asm/unistd.h | \ - grep "^#define __PPC_NR_" | grep -v "^#define __PPC_NR_BASE" | \ - sed -e 's/#define _PPC_NR_\([a-z0-9_]*\)[ \t]\+(__PPC_NR_BASE+\(.*\))/\1 983040 + \2/' | \ - awk '{ print $1"\t"$2+$4 }')) | sort + awk '{ print $3","$1 }' | \ + sort } # @@ -443,7 +564,7 @@ # Dump the library's syscall table to stdout. # function dump_lib_s390x() { - dump_lib_arch s390x + dump_lib_arch s390x | mangle_lib_syscall s390x } # @@ -481,12 +602,21 @@ mips64n32) dump_sys_mips64n32 "$2" ;; + parisc) + dump_sys_parisc "$2" + ;; + parisc64) + dump_sys_parisc64 "$2" + ;; ppc) dump_sys_ppc "$2" ;; ppc64) dump_sys_ppc64 "$2" ;; + riscv64) + dump_sys_riscv64 "$2" + ;; s390) dump_sys_s390 "$2" ;; @@ -536,17 +666,26 @@ mips64n32) dump_lib_mips64n32 ;; + parisc) + dump_lib_parisc + ;; + parisc64) + dump_lib_parisc64 + ;; ppc) - dump_lib_ppc "$2" + dump_lib_ppc ;; ppc64) - dump_lib_ppc64 "$2" + dump_lib_ppc64 + ;; + riscv64) + dump_lib_riscv64 ;; s390) - dump_lib_s390 "$2" + dump_lib_s390 ;; s390x) - dump_lib_s390x "$2" + dump_lib_s390x ;; *) echo "" @@ -557,6 +696,69 @@ return 0 } +# +# Generate the syscall csv file +# +# Arguments: +# 1 path to the kernel source +# 2 "sys" or "lib" depending on the syscall list to use +# +# Generare a syscall csv file from the given kernel sources. +# +function gen_csv() { + + # sanity checks + [[ -z $1 ]] && return + [[ $2 != "sys" && $2 != "lib" ]] && return + + # abi list + # NOTE: the ordering here is dependent on the layout of the + # arch_syscall_table struct in syscalls.h - BEWARE! + abi_list="" + abi_list+=" x86 x86_64 x32" + abi_list+=" arm aarch64" + abi_list+=" mips mips64 mips64n32" + abi_list+=" parisc parisc64" + abi_list+=" ppc ppc64" + abi_list+=" riscv64" + abi_list+=" s390 s390x" + + # get the full syscall list + for abi in $abi_list; do + eval output_$abi=$(mktemp -t syscall_validate_XXXXXX) + dump_$2_$abi "$1" > $(eval echo $`eval echo output_$abi`) + done + sc_list=$((for abi in $abi_list; do + cat $(eval echo $`eval echo output_$abi`); + done) | awk -F "," '{ print $1 }' | sort -u) + + # output a simple header + printf "#syscall (v%s %s)" \ + "$(kernel_version "$1")" "$(TZ=UTC date "+%Y-%m-%d")" + for abi in $abi_list; do + printf ",%s" $abi + done + printf "\n" + + # output the syscall csv details + for sc in $sc_list; do + printf "%s" $sc + for abi in $abi_list; do + num=$(grep "^$sc," \ + $(eval echo $`eval echo output_$abi`) | \ + awk -F "," '{ print $2 }' ) + [[ -z $num ]] && num="PNR" + printf ",%s" $num + done + printf "\n" + done + + # cleanup + for abi in $abi_list; do + rm -f $(eval echo $`eval echo output_$abi`) + done +} + #### # main @@ -571,14 +773,18 @@ fi opt_arches="" -opt_sys="" -opt_lib="" +opt_csv=0 +opt_sys=0 +opt_lib=0 -while getopts "a:slh" opt; do +while getopts "a:cslh" opt; do case $opt in a) opt_arches+="$OPTARG " ;; + c) + opt_csv=1 + ;; s) opt_sys=1 opt_lib=0 @@ -601,6 +807,7 @@ x86 x86_64 x32 \ arm aarch64 \ mips mips64 mips64n32 \ + parisc parisc64 \ ppc ppc64 \ s390 s390x" fi @@ -620,30 +827,39 @@ tmp_lib=$(mktemp -t syscall_validate_XXXXXX) tmp_sys=$(mktemp -t syscall_validate_XXXXXX) -# loop through the architectures and compare -for i in $opt_arches; do - # dump the syscall tables - dump_lib $i > $tmp_lib - if [[ $? -ne 0 ]]; then - echo "error: unknown arch $i" - exit 1 - fi - dump_sys $i "$kernel_dir" > $tmp_sys - if [[ $? -ne 0 ]]; then - echo "error: unknown arch $i" - exit 1 - fi - +if [[ $opt_csv -eq 1 ]]; then + # generate the syscall csv file if [[ $opt_lib -eq 1 ]]; then - cat $tmp_lib - elif [[ $opt_sys -eq 1 ]]; then - cat $tmp_sys + gen_csv $kernel_dir "lib" else - # compare the lib and sys output - diff -u --label="$i [library]" $tmp_lib \ - --label "$i [system]" $tmp_sys + gen_csv $kernel_dir "sys" fi -done +else + # loop through the architectures and compare + for i in $opt_arches; do + # dump the syscall tables + dump_lib $i > $tmp_lib + if [[ $? -ne 0 ]]; then + echo "error: unknown arch $i" + exit 1 + fi + dump_sys $i "$kernel_dir" > $tmp_sys + if [[ $? -ne 0 ]]; then + echo "error: unknown arch $i" + exit 1 + fi + + if [[ $opt_lib -eq 1 ]]; then + cat $tmp_lib + elif [[ $opt_sys -eq 1 ]]; then + cat $tmp_sys + else + # compare the lib and sys output + diff -u --label="$i [library]" $tmp_lib \ + --label "$i [system]" $tmp_sys + fi + done +fi # cleanup and exit rm -f $tmp_lib $tmp_sys diff -Nru libseccomp-2.4.3/src/arch-x32-syscalls.c libseccomp-2.5.1/src/arch-x32-syscalls.c --- libseccomp-2.4.3/src/arch-x32-syscalls.c 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x32-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,558 +0,0 @@ -/** - * Enhanced Seccomp x32 Syscall Table - * - * Copyright (c) 2013 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-x32.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def x32_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", __PNR__newselect }, - { "_sysctl", __PNR__sysctl }, - { "accept", (X32_SYSCALL_BIT + 43) }, - { "accept4", (X32_SYSCALL_BIT + 288) }, - { "access", (X32_SYSCALL_BIT + 21) }, - { "acct", (X32_SYSCALL_BIT + 163) }, - { "add_key", (X32_SYSCALL_BIT + 248) }, - { "adjtimex", (X32_SYSCALL_BIT + 159) }, - { "afs_syscall", (X32_SYSCALL_BIT + 183) }, - { "alarm", (X32_SYSCALL_BIT + 37) }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", (X32_SYSCALL_BIT + 158) }, - { "bdflush", __PNR_bdflush }, - { "bind", (X32_SYSCALL_BIT + 49) }, - { "bpf", (X32_SYSCALL_BIT + 321) }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", (X32_SYSCALL_BIT + 12) }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", (X32_SYSCALL_BIT + 125) }, - { "capset", (X32_SYSCALL_BIT + 126) }, - { "chdir", (X32_SYSCALL_BIT + 80) }, - { "chmod", (X32_SYSCALL_BIT + 90) }, - { "chown", (X32_SYSCALL_BIT + 92) }, - { "chown32", __PNR_chown32 }, - { "chroot", (X32_SYSCALL_BIT + 161) }, - { "clock_adjtime", (X32_SYSCALL_BIT + 305) }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", (X32_SYSCALL_BIT + 229) }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", (X32_SYSCALL_BIT + 228) }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", (X32_SYSCALL_BIT + 230) }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", (X32_SYSCALL_BIT + 227) }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", (X32_SYSCALL_BIT + 56) }, - { "clone3", (X32_SYSCALL_BIT + 435) }, - { "close", (X32_SYSCALL_BIT + 3) }, - { "connect", (X32_SYSCALL_BIT + 42) }, - { "copy_file_range", (X32_SYSCALL_BIT + 326) }, - { "creat", (X32_SYSCALL_BIT + 85) }, - { "create_module", __PNR_create_module }, - { "delete_module", (X32_SYSCALL_BIT + 176) }, - { "dup", (X32_SYSCALL_BIT + 32) }, - { "dup2", (X32_SYSCALL_BIT + 33) }, - { "dup3", (X32_SYSCALL_BIT + 292) }, - { "epoll_create", (X32_SYSCALL_BIT + 213) }, - { "epoll_create1", (X32_SYSCALL_BIT + 291) }, - { "epoll_ctl", (X32_SYSCALL_BIT + 233) }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", (X32_SYSCALL_BIT + 281) }, - { "epoll_wait", (X32_SYSCALL_BIT + 232) }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", (X32_SYSCALL_BIT + 284) }, - { "eventfd2", (X32_SYSCALL_BIT + 290) }, - { "execve", (X32_SYSCALL_BIT + 520) }, - { "execveat", (X32_SYSCALL_BIT + 545) }, - { "exit", (X32_SYSCALL_BIT + 60) }, - { "exit_group", (X32_SYSCALL_BIT + 231) }, - { "faccessat", (X32_SYSCALL_BIT + 269) }, - { "fadvise64", (X32_SYSCALL_BIT + 221) }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", (X32_SYSCALL_BIT + 285) }, - { "fanotify_init", (X32_SYSCALL_BIT + 300) }, - { "fanotify_mark", (X32_SYSCALL_BIT + 301) }, - { "fchdir", (X32_SYSCALL_BIT + 81) }, - { "fchmod", (X32_SYSCALL_BIT + 91) }, - { "fchmodat", (X32_SYSCALL_BIT + 268) }, - { "fchown", (X32_SYSCALL_BIT + 93) }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", (X32_SYSCALL_BIT + 260) }, - { "fcntl", (X32_SYSCALL_BIT + 72) }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", (X32_SYSCALL_BIT + 75) }, - { "fgetxattr", (X32_SYSCALL_BIT + 193) }, - { "finit_module", (X32_SYSCALL_BIT + 313) }, - { "flistxattr", (X32_SYSCALL_BIT + 196) }, - { "flock", (X32_SYSCALL_BIT + 73) }, - { "fork", (X32_SYSCALL_BIT + 57) }, - { "fremovexattr", (X32_SYSCALL_BIT + 199) }, - { "fsconfig", (X32_SYSCALL_BIT + 431) }, - { "fsetxattr", (X32_SYSCALL_BIT + 190) }, - { "fsmount", (X32_SYSCALL_BIT + 432) }, - { "fsopen", (X32_SYSCALL_BIT + 430) }, - { "fspick", (X32_SYSCALL_BIT + 433) }, - { "fstat", (X32_SYSCALL_BIT + 5) }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstatat64 }, - { "fstatfs", (X32_SYSCALL_BIT + 138) }, - { "fstatfs64", __PNR_fstatfs64 }, - { "fsync", (X32_SYSCALL_BIT + 74) }, - { "ftime", __PNR_ftime }, - { "ftruncate", (X32_SYSCALL_BIT + 77) }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", (X32_SYSCALL_BIT + 202) }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", (X32_SYSCALL_BIT + 261) }, - { "get_kernel_syms", __PNR_get_kernel_syms }, - { "get_mempolicy", (X32_SYSCALL_BIT + 239) }, - { "get_robust_list", (X32_SYSCALL_BIT + 531) }, - { "get_thread_area", __PNR_get_thread_area }, - { "get_tls", __PNR_get_tls }, - { "getcpu", (X32_SYSCALL_BIT + 309) }, - { "getcwd", (X32_SYSCALL_BIT + 79) }, - { "getdents", (X32_SYSCALL_BIT + 78) }, - { "getdents64", (X32_SYSCALL_BIT + 217) }, - { "getegid", (X32_SYSCALL_BIT + 108) }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", (X32_SYSCALL_BIT + 107) }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", (X32_SYSCALL_BIT + 104) }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", (X32_SYSCALL_BIT + 115) }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", (X32_SYSCALL_BIT + 36) }, - { "getpeername", (X32_SYSCALL_BIT + 52) }, - { "getpgid", (X32_SYSCALL_BIT + 121) }, - { "getpgrp", (X32_SYSCALL_BIT + 111) }, - { "getpid", (X32_SYSCALL_BIT + 39) }, - { "getpmsg", (X32_SYSCALL_BIT + 181) }, - { "getppid", (X32_SYSCALL_BIT + 110) }, - { "getpriority", (X32_SYSCALL_BIT + 140) }, - { "getrandom", (X32_SYSCALL_BIT + 318) }, - { "getresgid", (X32_SYSCALL_BIT + 120) }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", (X32_SYSCALL_BIT + 118) }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", (X32_SYSCALL_BIT + 97) }, - { "getrusage", (X32_SYSCALL_BIT + 98) }, - { "getsid", (X32_SYSCALL_BIT + 124) }, - { "getsockname", (X32_SYSCALL_BIT + 51) }, - { "getsockopt", (X32_SYSCALL_BIT + 542) }, - { "gettid", (X32_SYSCALL_BIT + 186) }, - { "gettimeofday", (X32_SYSCALL_BIT + 96) }, - { "getuid", (X32_SYSCALL_BIT + 102) }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", (X32_SYSCALL_BIT + 191) }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", (X32_SYSCALL_BIT + 175) }, - { "inotify_add_watch", (X32_SYSCALL_BIT + 254) }, - { "inotify_init", (X32_SYSCALL_BIT + 253) }, - { "inotify_init1", (X32_SYSCALL_BIT + 294) }, - { "inotify_rm_watch", (X32_SYSCALL_BIT + 255) }, - { "io_cancel", (X32_SYSCALL_BIT + 210) }, - { "io_destroy", (X32_SYSCALL_BIT + 207) }, - { "io_getevents", (X32_SYSCALL_BIT + 208) }, - { "io_pgetevents", (X32_SYSCALL_BIT + 333) }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", (X32_SYSCALL_BIT + 543) }, - { "io_submit", (X32_SYSCALL_BIT + 544) }, - { "io_uring_setup", (X32_SYSCALL_BIT + 425) }, - { "io_uring_enter", (X32_SYSCALL_BIT + 426) }, - { "io_uring_register", (X32_SYSCALL_BIT + 427) }, - { "ioctl", (X32_SYSCALL_BIT + 514) }, - { "ioperm", (X32_SYSCALL_BIT + 173) }, - { "iopl", (X32_SYSCALL_BIT + 172) }, - { "ioprio_get", (X32_SYSCALL_BIT + 252) }, - { "ioprio_set", (X32_SYSCALL_BIT + 251) }, - { "ipc", __PNR_ipc }, - { "kcmp", (X32_SYSCALL_BIT + 312) }, - { "kexec_file_load", (X32_SYSCALL_BIT + 320) }, - { "kexec_load", (X32_SYSCALL_BIT + 528) }, - { "keyctl", (X32_SYSCALL_BIT + 250) }, - { "kill", (X32_SYSCALL_BIT + 62) }, - { "lchown", (X32_SYSCALL_BIT + 94) }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", (X32_SYSCALL_BIT + 192) }, - { "link", (X32_SYSCALL_BIT + 86) }, - { "linkat", (X32_SYSCALL_BIT + 265) }, - { "listen", (X32_SYSCALL_BIT + 50) }, - { "listxattr", (X32_SYSCALL_BIT + 194) }, - { "llistxattr", (X32_SYSCALL_BIT + 195) }, - { "lock", __PNR_lock }, - { "lookup_dcookie", (X32_SYSCALL_BIT + 212) }, - { "lremovexattr", (X32_SYSCALL_BIT + 198) }, - { "lseek", (X32_SYSCALL_BIT + 8) }, - { "lsetxattr", (X32_SYSCALL_BIT + 189) }, - { "lstat", (X32_SYSCALL_BIT + 6) }, - { "lstat64", __PNR_lstat64 }, - { "madvise", (X32_SYSCALL_BIT + 28) }, - { "mbind", (X32_SYSCALL_BIT + 237) }, - { "membarrier", (X32_SYSCALL_BIT + 324) }, - { "memfd_create", (X32_SYSCALL_BIT + 319) }, - { "migrate_pages", (X32_SYSCALL_BIT + 256) }, - { "mincore", (X32_SYSCALL_BIT + 27) }, - { "mkdir", (X32_SYSCALL_BIT + 83) }, - { "mkdirat", (X32_SYSCALL_BIT + 258) }, - { "mknod", (X32_SYSCALL_BIT + 133) }, - { "mknodat", (X32_SYSCALL_BIT + 259) }, - { "mlock", (X32_SYSCALL_BIT + 149) }, - { "mlock2", (X32_SYSCALL_BIT + 325) }, - { "mlockall", (X32_SYSCALL_BIT + 151) }, - { "mmap", (X32_SYSCALL_BIT + 9) }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", (X32_SYSCALL_BIT + 154) }, - { "mount", (X32_SYSCALL_BIT + 165) }, - { "move_mount", (X32_SYSCALL_BIT + 429) }, - { "move_pages", (X32_SYSCALL_BIT + 533) }, - { "mprotect", (X32_SYSCALL_BIT + 10) }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", (X32_SYSCALL_BIT + 245) }, - { "mq_notify", (X32_SYSCALL_BIT + 527) }, - { "mq_open", (X32_SYSCALL_BIT + 240) }, - { "mq_timedreceive", (X32_SYSCALL_BIT + 243) }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", (X32_SYSCALL_BIT + 242) }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", (X32_SYSCALL_BIT + 241) }, - { "mremap", (X32_SYSCALL_BIT + 25) }, - { "msgctl", (X32_SYSCALL_BIT + 71) }, - { "msgget", (X32_SYSCALL_BIT + 68) }, - { "msgrcv", (X32_SYSCALL_BIT + 70) }, - { "msgsnd", (X32_SYSCALL_BIT + 69) }, - { "msync", (X32_SYSCALL_BIT + 26) }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", (X32_SYSCALL_BIT + 150) }, - { "munlockall", (X32_SYSCALL_BIT + 152) }, - { "munmap", (X32_SYSCALL_BIT + 11) }, - { "name_to_handle_at", (X32_SYSCALL_BIT + 303) }, - { "nanosleep", (X32_SYSCALL_BIT + 35) }, - { "newfstatat", (X32_SYSCALL_BIT + 262) }, - { "nfsservctl", __PNR_nfsservctl }, - { "nice", __PNR_nice }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", (X32_SYSCALL_BIT + 2) }, - { "open_by_handle_at", (X32_SYSCALL_BIT + 304) }, - { "open_tree", (X32_SYSCALL_BIT + 428) }, - { "openat", (X32_SYSCALL_BIT + 257) }, - { "pause", (X32_SYSCALL_BIT + 34) }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", (X32_SYSCALL_BIT + 298) }, - { "personality", (X32_SYSCALL_BIT + 135) }, - { "pidfd_open", (X32_SYSCALL_BIT + 434) }, - { "pidfd_send_signal", (X32_SYSCALL_BIT + 424) }, - { "pipe", (X32_SYSCALL_BIT + 22) }, - { "pipe2", (X32_SYSCALL_BIT + 293) }, - { "pivot_root", (X32_SYSCALL_BIT + 155) }, - { "pkey_alloc", (X32_SYSCALL_BIT + 330) }, - { "pkey_free", (X32_SYSCALL_BIT + 331) }, - { "pkey_mprotect", (X32_SYSCALL_BIT + 329) }, - { "poll", (X32_SYSCALL_BIT + 7) }, - { "ppoll", (X32_SYSCALL_BIT + 271) }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", (X32_SYSCALL_BIT + 157) }, - { "pread64", (X32_SYSCALL_BIT + 17) }, - { "preadv", (X32_SYSCALL_BIT + 534) }, - { "preadv2", (X32_SYSCALL_BIT + 546) }, - { "prlimit64", (X32_SYSCALL_BIT + 302) }, - { "process_vm_readv", (X32_SYSCALL_BIT + 539) }, - { "process_vm_writev", (X32_SYSCALL_BIT + 540) }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", (X32_SYSCALL_BIT + 270) }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", (X32_SYSCALL_BIT + 521) }, - { "putpmsg", (X32_SYSCALL_BIT + 182) }, - { "pwrite64", (X32_SYSCALL_BIT + 18) }, - { "pwritev", (X32_SYSCALL_BIT + 535) }, - { "pwritev2", (X32_SYSCALL_BIT + 547) }, - { "query_module", __PNR_query_module }, - { "quotactl", (X32_SYSCALL_BIT + 179) }, - { "read", (X32_SYSCALL_BIT + 0) }, - { "readahead", (X32_SYSCALL_BIT + 187) }, - { "readdir", __PNR_readdir }, - { "readlink", (X32_SYSCALL_BIT + 89) }, - { "readlinkat", (X32_SYSCALL_BIT + 267) }, - { "readv", (X32_SYSCALL_BIT + 515) }, - { "reboot", (X32_SYSCALL_BIT + 169) }, - { "recv", __PNR_recv }, - { "recvfrom", (X32_SYSCALL_BIT + 517) }, - { "recvmmsg", (X32_SYSCALL_BIT + 537) }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", (X32_SYSCALL_BIT + 519) }, - { "remap_file_pages", (X32_SYSCALL_BIT + 216) }, - { "removexattr", (X32_SYSCALL_BIT + 197) }, - { "rename", (X32_SYSCALL_BIT + 82) }, - { "renameat", (X32_SYSCALL_BIT + 264) }, - { "renameat2", (X32_SYSCALL_BIT + 316) }, - { "request_key", (X32_SYSCALL_BIT + 249) }, - { "restart_syscall", (X32_SYSCALL_BIT + 219) }, - { "rmdir", (X32_SYSCALL_BIT + 84) }, - { "rseq", (X32_SYSCALL_BIT + 334) }, - { "rt_sigaction", (X32_SYSCALL_BIT + 512) }, - { "rt_sigpending", (X32_SYSCALL_BIT + 522) }, - { "rt_sigprocmask", (X32_SYSCALL_BIT + 14) }, - { "rt_sigqueueinfo", (X32_SYSCALL_BIT + 524) }, - { "rt_sigreturn", (X32_SYSCALL_BIT + 513) }, - { "rt_sigsuspend", (X32_SYSCALL_BIT + 130) }, - { "rt_sigtimedwait", (X32_SYSCALL_BIT + 523) }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", (X32_SYSCALL_BIT + 536) }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", (X32_SYSCALL_BIT + 146) }, - { "sched_get_priority_min", (X32_SYSCALL_BIT + 147) }, - { "sched_getaffinity", (X32_SYSCALL_BIT + 204) }, - { "sched_getattr", (X32_SYSCALL_BIT + 315) }, - { "sched_getparam", (X32_SYSCALL_BIT + 143) }, - { "sched_getscheduler", (X32_SYSCALL_BIT + 145) }, - { "sched_rr_get_interval", (X32_SYSCALL_BIT + 148) }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", (X32_SYSCALL_BIT + 203) }, - { "sched_setattr", (X32_SYSCALL_BIT + 314) }, - { "sched_setparam", (X32_SYSCALL_BIT + 142) }, - { "sched_setscheduler", (X32_SYSCALL_BIT + 144) }, - { "sched_yield", (X32_SYSCALL_BIT + 24) }, - { "seccomp", (X32_SYSCALL_BIT + 317) }, - { "security", (X32_SYSCALL_BIT + 185) }, - { "select", (X32_SYSCALL_BIT + 23) }, - { "semctl", (X32_SYSCALL_BIT + 66) }, - { "semget", (X32_SYSCALL_BIT + 64) }, - { "semop", (X32_SYSCALL_BIT + 65) }, - { "semtimedop", (X32_SYSCALL_BIT + 220) }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", __PNR_send }, - { "sendfile", (X32_SYSCALL_BIT + 40) }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", (X32_SYSCALL_BIT + 538) }, - { "sendmsg", (X32_SYSCALL_BIT + 518) }, - { "sendto", (X32_SYSCALL_BIT + 44) }, - { "set_mempolicy", (X32_SYSCALL_BIT + 238) }, - { "set_robust_list", (X32_SYSCALL_BIT + 530) }, - { "set_thread_area", __PNR_set_thread_area }, - { "set_tid_address", (X32_SYSCALL_BIT + 218) }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", (X32_SYSCALL_BIT + 171) }, - { "setfsgid", (X32_SYSCALL_BIT + 123) }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", (X32_SYSCALL_BIT + 122) }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", (X32_SYSCALL_BIT + 106) }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", (X32_SYSCALL_BIT + 116) }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", (X32_SYSCALL_BIT + 170) }, - { "setitimer", (X32_SYSCALL_BIT + 38) }, - { "setns", (X32_SYSCALL_BIT + 308) }, - { "setpgid", (X32_SYSCALL_BIT + 109) }, - { "setpriority", (X32_SYSCALL_BIT + 141) }, - { "setregid", (X32_SYSCALL_BIT + 114) }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", (X32_SYSCALL_BIT + 119) }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", (X32_SYSCALL_BIT + 117) }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", (X32_SYSCALL_BIT + 113) }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", (X32_SYSCALL_BIT + 160) }, - { "setsid", (X32_SYSCALL_BIT + 112) }, - { "setsockopt", (X32_SYSCALL_BIT + 541) }, - { "settimeofday", (X32_SYSCALL_BIT + 164) }, - { "setuid", (X32_SYSCALL_BIT + 105) }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", (X32_SYSCALL_BIT + 188) }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", (X32_SYSCALL_BIT + 30) }, - { "shmctl", (X32_SYSCALL_BIT + 31) }, - { "shmdt", (X32_SYSCALL_BIT + 67) }, - { "shmget", (X32_SYSCALL_BIT + 29) }, - { "shutdown", (X32_SYSCALL_BIT + 48) }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", (X32_SYSCALL_BIT + 525) }, - { "signal", __PNR_signal }, - { "signalfd", (X32_SYSCALL_BIT + 282) }, - { "signalfd4", (X32_SYSCALL_BIT + 289) }, - { "sigpending", __PNR_sigpending }, - { "sigprocmask", __PNR_sigprocmask }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", (X32_SYSCALL_BIT + 41) }, - { "socketcall", __PNR_socketcall }, - { "socketpair", (X32_SYSCALL_BIT + 53) }, - { "splice", (X32_SYSCALL_BIT + 275) }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", (X32_SYSCALL_BIT + 4) }, - { "stat64", __PNR_stat64 }, - { "statfs", (X32_SYSCALL_BIT + 137) }, - { "statfs64", __PNR_statfs64 }, - { "statx", (X32_SYSCALL_BIT + 332) }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", (X32_SYSCALL_BIT + 168) }, - { "swapon", (X32_SYSCALL_BIT + 167) }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", (X32_SYSCALL_BIT + 88) }, - { "symlinkat", (X32_SYSCALL_BIT + 266) }, - { "sync", (X32_SYSCALL_BIT + 162) }, - { "sync_file_range", (X32_SYSCALL_BIT + 277) }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", (X32_SYSCALL_BIT + 306) }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", (X32_SYSCALL_BIT + 139) }, - { "sysinfo", (X32_SYSCALL_BIT + 99) }, - { "syslog", (X32_SYSCALL_BIT + 103) }, - { "sysmips", __PNR_sysmips }, - { "tee", (X32_SYSCALL_BIT + 276) }, - { "tgkill", (X32_SYSCALL_BIT + 234) }, - { "time", (X32_SYSCALL_BIT + 201) }, - { "timer_create", (X32_SYSCALL_BIT + 526) }, - { "timer_delete", (X32_SYSCALL_BIT + 226) }, - { "timer_getoverrun", (X32_SYSCALL_BIT + 225) }, - { "timer_gettime", (X32_SYSCALL_BIT + 224) }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", (X32_SYSCALL_BIT + 223) }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", (X32_SYSCALL_BIT + 283) }, - { "timerfd_gettime", (X32_SYSCALL_BIT + 287) }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", (X32_SYSCALL_BIT + 286) }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", (X32_SYSCALL_BIT + 100) }, - { "tkill", (X32_SYSCALL_BIT + 200) }, - { "truncate", (X32_SYSCALL_BIT + 76) }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", (X32_SYSCALL_BIT + 184) }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", (X32_SYSCALL_BIT + 95) }, - { "umount", __PNR_umount }, - { "umount2", (X32_SYSCALL_BIT + 166) }, - { "uname", (X32_SYSCALL_BIT + 63) }, - { "unlink", (X32_SYSCALL_BIT + 87) }, - { "unlinkat", (X32_SYSCALL_BIT + 263) }, - { "unshare", (X32_SYSCALL_BIT + 272) }, - { "uselib", __PNR_uselib }, - { "userfaultfd", (X32_SYSCALL_BIT + 323) }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", (X32_SYSCALL_BIT + 136) }, - { "utime", (X32_SYSCALL_BIT + 132) }, - { "utimensat", (X32_SYSCALL_BIT + 280) }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", (X32_SYSCALL_BIT + 235) }, - { "vfork", (X32_SYSCALL_BIT + 58) }, - { "vhangup", (X32_SYSCALL_BIT + 153) }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", (X32_SYSCALL_BIT + 532) }, - { "vserver", __PNR_vserver }, - { "wait4", (X32_SYSCALL_BIT + 61) }, - { "waitid", (X32_SYSCALL_BIT + 529) }, - { "waitpid", __PNR_waitpid }, - { "write", (X32_SYSCALL_BIT + 1) }, - { "writev", (X32_SYSCALL_BIT + 516) }, - { NULL, __NR_SCMP_ERROR}, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int x32_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = x32_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *x32_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = x32_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *x32_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &x32_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-x32.c libseccomp-2.5.1/src/arch-x32.c --- libseccomp-2.4.3/src/arch-x32.c 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x32.c 2020-11-17 08:34:38.781027373 +1030 @@ -26,14 +26,52 @@ #include "arch.h" #include "arch-x32.h" +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int x32_syscall_resolve_name_munge(const char *name) +{ + int sys; + + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + sys = x32_syscall_resolve_name(name); + if (sys == __NR_SCMP_ERROR || sys < 0) + return sys; + + return (sys | X32_SYSCALL_BIT); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *x32_syscall_resolve_num_munge(int num) +{ + /* NOTE: we don't want to modify the pseudo-syscall numbers */ + if (num >= 0) + num &= ~X32_SYSCALL_BIT; + return x32_syscall_resolve_num(num); +} + const struct arch_def arch_def_x32 = { .token = SCMP_ARCH_X32, /* NOTE: this seems odd but the kernel treats x32 like x86_64 here */ .token_bpf = AUDIT_ARCH_X86_64, .size = ARCH_SIZE_32, .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = x32_syscall_resolve_name, - .syscall_resolve_num = x32_syscall_resolve_num, + .syscall_resolve_name = x32_syscall_resolve_name_munge, + .syscall_resolve_num = x32_syscall_resolve_num_munge, .syscall_rewrite = NULL, .rule_add = NULL, }; diff -Nru libseccomp-2.4.3/src/arch-x32.h libseccomp-2.5.1/src/arch-x32.h --- libseccomp-2.4.3/src/arch-x32.h 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x32.h 2020-11-17 08:34:38.781027373 +1030 @@ -22,18 +22,10 @@ #ifndef _ARCH_X32_H #define _ARCH_X32_H -#include - #include "arch.h" -#include "system.h" - -#define X32_SYSCALL_BIT 0x40000000 - -extern const struct arch_def arch_def_x32; -int x32_syscall_resolve_name(const char *name); -const char *x32_syscall_resolve_num(int num); +#define X32_SYSCALL_BIT 0x40000000 -const struct arch_syscall_def *x32_syscall_iterate(unsigned int spot); +ARCH_DECL(x32) #endif diff -Nru libseccomp-2.4.3/src/arch-x86-syscalls.c libseccomp-2.5.1/src/arch-x86-syscalls.c --- libseccomp-2.4.3/src/arch-x86-syscalls.c 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x86-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,692 +0,0 @@ -/** - * Enhanced Seccomp x86 Syscall Table - * - * Copyright (c) 2012 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-x86.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def x86_syscall_table[] = { \ - { "_llseek", 140 }, - { "_newselect", 142 }, - { "_sysctl", 149 }, - { "accept", __PNR_accept }, - { "accept4", 364 }, - { "access", 33 }, - { "acct", 51 }, - { "add_key", 286 }, - { "adjtimex", 124 }, - { "afs_syscall", 137 }, - { "alarm", 27 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", 384 }, - { "bdflush", 134 }, - { "bind", 361 }, - { "bpf", 357 }, - { "break", 17 }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 45 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 184 }, - { "capset", 185 }, - { "chdir", 12 }, - { "chmod", 15 }, - { "chown", 182 }, - { "chown32", 212 }, - { "chroot", 61 }, - { "clock_adjtime", 343 }, - { "clock_adjtime64", 405 }, - { "clock_getres", 266 }, - { "clock_getres_time64", 406 }, - { "clock_gettime", 265 }, - { "clock_gettime64", 403 }, - { "clock_nanosleep", 267 }, - { "clock_nanosleep_time64", 407 }, - { "clock_settime", 264 }, - { "clock_settime64", 404 }, - { "clone", 120 }, - { "clone3", 435 }, - { "close", 6 }, - { "connect", 362 }, - { "copy_file_range", 377 }, - { "creat", 8 }, - { "create_module", 127 }, - { "delete_module", 129 }, - { "dup", 41 }, - { "dup2", 63 }, - { "dup3", 330 }, - { "epoll_create", 254 }, - { "epoll_create1", 329 }, - { "epoll_ctl", 255 }, - { "epoll_ctl_old", __PNR_epoll_ctl_old }, - { "epoll_pwait", 319 }, - { "epoll_wait", 256 }, - { "epoll_wait_old", __PNR_epoll_wait_old }, - { "eventfd", 323 }, - { "eventfd2", 328 }, - { "execve", 11 }, - { "execveat", 358 }, - { "exit", 1 }, - { "exit_group", 252 }, - { "faccessat", 307 }, - { "fadvise64", 250 }, - { "fadvise64_64", 272 }, - { "fallocate", 324 }, - { "fanotify_init", 338 }, - { "fanotify_mark", 339 }, - { "fchdir", 133 }, - { "fchmod", 94 }, - { "fchmodat", 306 }, - { "fchown", 95 }, - { "fchown32", 207 }, - { "fchownat", 298 }, - { "fcntl", 55 }, - { "fcntl64", 221 }, - { "fdatasync", 148 }, - { "fgetxattr", 231 }, - { "finit_module", 350 }, - { "flistxattr", 234 }, - { "flock", 143 }, - { "fork", 2 }, - { "fremovexattr", 237 }, - { "fsconfig", 431 }, - { "fsetxattr", 228 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 108 }, - { "fstat64", 197 }, - { "fstatat64", 300 }, - { "fstatfs", 100 }, - { "fstatfs64", 269 }, - { "fsync", 118 }, - { "ftime", 35 }, - { "ftruncate", 93 }, - { "ftruncate64", 194 }, - { "futex", 240 }, - { "futex_time64", 422 }, - { "futimesat", 299 }, - { "get_kernel_syms", 130 }, - { "get_mempolicy", 275 }, - { "get_robust_list", 312 }, - { "get_thread_area", 244 }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 318 }, - { "getcwd", 183 }, - { "getdents", 141 }, - { "getdents64", 220 }, - { "getegid", 50 }, - { "getegid32", 202 }, - { "geteuid", 49 }, - { "geteuid32", 201 }, - { "getgid", 47 }, - { "getgid32", 200 }, - { "getgroups", 80 }, - { "getgroups32", 205 }, - { "getitimer", 105 }, - { "getpeername", 368 }, - { "getpgid", 132 }, - { "getpgrp", 65 }, - { "getpid", 20 }, - { "getpmsg", 188 }, - { "getppid", 64 }, - { "getpriority", 96 }, - { "getrandom", 355 }, - { "getresgid", 171 }, - { "getresgid32", 211 }, - { "getresuid", 165 }, - { "getresuid32", 209 }, - { "getrlimit", 76 }, - { "getrusage", 77 }, - { "getsid", 147 }, - { "getsockname", 367 }, - { "getsockopt", 365 }, - { "gettid", 224 }, - { "gettimeofday", 78 }, - { "getuid", 24 }, - { "getuid32", 199 }, - { "getxattr", 229 }, - { "gtty", 32 }, - { "idle", 112 }, - { "init_module", 128 }, - { "inotify_add_watch", 292 }, - { "inotify_init", 291 }, - { "inotify_init1", 332 }, - { "inotify_rm_watch", 293 }, - { "io_cancel", 249 }, - { "io_destroy", 246 }, - { "io_getevents", 247 }, - { "io_pgetevents", 385 }, - { "io_pgetevents_time64", 416 }, - { "io_setup", 245 }, - { "io_submit", 248 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 54 }, - { "ioperm", 101 }, - { "iopl", 110 }, - { "ioprio_get", 290 }, - { "ioprio_set", 289 }, - { "ipc", 117 }, - { "kcmp", 349 }, - { "kexec_file_load", __PNR_kexec_file_load }, - { "kexec_load", 283 }, - { "keyctl", 288 }, - { "kill", 37 }, - { "lchown", 16 }, - { "lchown32", 198 }, - { "lgetxattr", 230 }, - { "link", 9 }, - { "linkat", 303 }, - { "listen", 363 }, - { "listxattr", 232 }, - { "llistxattr", 233 }, - { "lock", 53 }, - { "lookup_dcookie", 253 }, - { "lremovexattr", 236 }, - { "lseek", 19 }, - { "lsetxattr", 227 }, - { "lstat", 107 }, - { "lstat64", 196 }, - { "madvise", 219 }, - { "mbind", 274 }, - { "membarrier", 375 }, - { "memfd_create", 356 }, - { "migrate_pages", 294 }, - { "mincore", 218 }, - { "mkdir", 39 }, - { "mkdirat", 296 }, - { "mknod", 14 }, - { "mknodat", 297 }, - { "mlock", 150 }, - { "mlock2", 376 }, - { "mlockall", 152 }, - { "mmap", 90 }, - { "mmap2", 192 }, - { "modify_ldt", 123 }, - { "mount", 21 }, - { "move_mount", 429 }, - { "move_pages", 317 }, - { "mprotect", 125 }, - { "mpx", 56 }, - { "mq_getsetattr", 282 }, - { "mq_notify", 281 }, - { "mq_open", 277 }, - { "mq_timedreceive", 280 }, - { "mq_timedreceive_time64", 419 }, - { "mq_timedsend", 279 }, - { "mq_timedsend_time64", 418 }, - { "mq_unlink", 278 }, - { "mremap", 163 }, - { "msgctl", 402 }, - { "msgget", 399 }, - { "msgrcv", 401 }, - { "msgsnd", 400 }, - { "msync", 144 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 151 }, - { "munlockall", 153 }, - { "munmap", 91 }, - { "name_to_handle_at", 341 }, - { "nanosleep", 162 }, - { "newfstatat", __PNR_newfstatat }, - { "nfsservctl", 169 }, - { "nice", 34 }, - { "oldfstat", 28 }, - { "oldlstat", 84 }, - { "oldolduname", 59 }, - { "oldstat", 18 }, - { "olduname", 109 }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 5 }, - { "open_by_handle_at", 342 }, - { "open_tree", 428 }, - { "openat", 295 }, - { "pause", 29 }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 336 }, - { "personality", 136 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 42 }, - { "pipe2", 331 }, - { "pivot_root", 217 }, - { "pkey_alloc", 381 }, - { "pkey_free", 382 }, - { "pkey_mprotect", 380 }, - { "poll", 168 }, - { "ppoll", 309 }, - { "ppoll_time64", 414 }, - { "prctl", 172 }, - { "pread64", 180 }, - { "preadv", 333 }, - { "preadv2", 378 }, - { "prlimit64", 340 }, - { "process_vm_readv", 347 }, - { "process_vm_writev", 348 }, - { "prof", 44 }, - { "profil", 98 }, - { "pselect6", 308 }, - { "pselect6_time64", 413 }, - { "ptrace", 26 }, - { "putpmsg", 189 }, - { "pwrite64", 181 }, - { "pwritev", 334 }, - { "pwritev2", 379 }, - { "query_module", 167 }, - { "quotactl", 131 }, - { "read", 3 }, - { "readahead", 225 }, - { "readdir", 89 }, - { "readlink", 85 }, - { "readlinkat", 305 }, - { "readv", 145 }, - { "reboot", 88 }, - { "recv", __PNR_recv }, - { "recvfrom", 371 }, - { "recvmmsg", 337 }, - { "recvmmsg_time64", 417 }, - { "recvmsg", 372 }, - { "remap_file_pages", 257 }, - { "removexattr", 235 }, - { "rename", 38 }, - { "renameat", 302 }, - { "renameat2", 353 }, - { "request_key", 287 }, - { "restart_syscall", 0 }, - { "rmdir", 40 }, - { "rseq", 386 }, - { "rt_sigaction", 174 }, - { "rt_sigpending", 176 }, - { "rt_sigprocmask", 175 }, - { "rt_sigqueueinfo", 178 }, - { "rt_sigreturn", 173 }, - { "rt_sigsuspend", 179 }, - { "rt_sigtimedwait", 177 }, - { "rt_sigtimedwait_time64", 421 }, - { "rt_tgsigqueueinfo", 335 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 159 }, - { "sched_get_priority_min", 160 }, - { "sched_getaffinity", 242 }, - { "sched_getattr", 352 }, - { "sched_getparam", 155 }, - { "sched_getscheduler", 157 }, - { "sched_rr_get_interval", 161 }, - { "sched_rr_get_interval_time64", 423 }, - { "sched_setaffinity", 241 }, - { "sched_setattr", 351 }, - { "sched_setparam", 154 }, - { "sched_setscheduler", 156 }, - { "sched_yield", 158 }, - { "seccomp", 354 }, - { "security", __PNR_security }, - { "select", 82 }, - { "semctl", 394 }, - { "semget", 393 }, - { "semop", __PNR_semop }, - { "semtimedop", __PNR_semtimedop }, - { "semtimedop_time64", 420 }, - { "send", __PNR_send }, - { "sendfile", 187 }, - { "sendfile64", 239 }, - { "sendmmsg", 345 }, - { "sendmsg", 370 }, - { "sendto", 369 }, - { "set_mempolicy", 276 }, - { "set_robust_list", 311 }, - { "set_thread_area", 243 }, - { "set_tid_address", 258 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 121 }, - { "setfsgid", 139 }, - { "setfsgid32", 216 }, - { "setfsuid", 138 }, - { "setfsuid32", 215 }, - { "setgid", 46 }, - { "setgid32", 214 }, - { "setgroups", 81 }, - { "setgroups32", 206 }, - { "sethostname", 74 }, - { "setitimer", 104 }, - { "setns", 346 }, - { "setpgid", 57 }, - { "setpriority", 97 }, - { "setregid", 71 }, - { "setregid32", 204 }, - { "setresgid", 170 }, - { "setresgid32", 210 }, - { "setresuid", 164 }, - { "setresuid32", 208 }, - { "setreuid", 70 }, - { "setreuid32", 203 }, - { "setrlimit", 75 }, - { "setsid", 66 }, - { "setsockopt", 366 }, - { "settimeofday", 79 }, - { "setuid", 23 }, - { "setuid32", 213 }, - { "setxattr", 226 }, - { "sgetmask", 68 }, - { "shmat", 397 }, - { "shmctl", 396 }, - { "shmdt", 398 }, - { "shmget", 395 }, - { "shutdown", 373 }, - { "sigaction", 67 }, - { "sigaltstack", 186 }, - { "signal", 48 }, - { "signalfd", 321 }, - { "signalfd4", 327 }, - { "sigpending", 73 }, - { "sigprocmask", 126 }, - { "sigreturn", 119 }, - { "sigsuspend", 72 }, - { "socket", 359 }, - { "socketcall", 102 }, - { "socketpair", 360 }, - { "splice", 313 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", 69 }, - { "stat", 106 }, - { "stat64", 195 }, - { "statfs", 99 }, - { "statfs64", 268 }, - { "statx", 383 }, - { "stime", 25 }, - { "stty", 31 }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 115 }, - { "swapon", 87 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", 83 }, - { "symlinkat", 304 }, - { "sync", 36 }, - { "sync_file_range", 314 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 344 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", 135 }, - { "sysinfo", 116 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 315 }, - { "tgkill", 270 }, - { "time", 13 }, - { "timer_create", 259 }, - { "timer_delete", 263 }, - { "timer_getoverrun", 262 }, - { "timer_gettime", 261 }, - { "timer_gettime64", 408 }, - { "timer_settime", 260 }, - { "timer_settime64", 409 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", 322 }, - { "timerfd_gettime", 326 }, - { "timerfd_gettime64", 410 }, - { "timerfd_settime", 325 }, - { "timerfd_settime64", 411 }, - { "times", 43 }, - { "tkill", 238 }, - { "truncate", 92 }, - { "truncate64", 193 }, - { "tuxcall", __PNR_tuxcall }, - { "ugetrlimit", 191 }, - { "ulimit", 58 }, - { "umask", 60 }, - { "umount", 22 }, - { "umount2", 52 }, - { "uname", 122 }, - { "unlink", 10 }, - { "unlinkat", 301 }, - { "unshare", 310 }, - { "uselib", 86 }, - { "userfaultfd", 374 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 62 }, - { "utime", 30 }, - { "utimensat", 320 }, - { "utimensat_time64", 412 }, - { "utimes", 271 }, - { "vfork", 190 }, - { "vhangup", 111 }, - { "vm86", 166 }, - { "vm86old", 113 }, - { "vmsplice", 316 }, - { "vserver", 273 }, - { "wait4", 114 }, - { "waitid", 284 }, - { "waitpid", 7 }, - { "write", 4 }, - { "writev", 146 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int x86_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = x86_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (strcmp(name, "accept") == 0) - return __PNR_accept; - else if (strcmp(name, "accept4") == 0) - return __PNR_accept4; - else if (strcmp(name, "bind") == 0) - return __PNR_bind; - else if (strcmp(name, "connect") == 0) - return __PNR_connect; - else if (strcmp(name, "getpeername") == 0) - return __PNR_getpeername; - else if (strcmp(name, "getsockname") == 0) - return __PNR_getsockname; - else if (strcmp(name, "getsockopt") == 0) - return __PNR_getsockopt; - else if (strcmp(name, "listen") == 0) - return __PNR_listen; - else if (strcmp(name, "recv") == 0) - return __PNR_recv; - else if (strcmp(name, "recvfrom") == 0) - return __PNR_recvfrom; - else if (strcmp(name, "recvmsg") == 0) - return __PNR_recvmsg; - else if (strcmp(name, "recvmmsg") == 0) - return __PNR_recvmmsg; - else if (strcmp(name, "send") == 0) - return __PNR_send; - else if (strcmp(name, "sendmsg") == 0) - return __PNR_sendmsg; - else if (strcmp(name, "sendmmsg") == 0) - return __PNR_sendmmsg; - else if (strcmp(name, "sendto") == 0) - return __PNR_sendto; - else if (strcmp(name, "setsockopt") == 0) - return __PNR_setsockopt; - else if (strcmp(name, "shutdown") == 0) - return __PNR_shutdown; - else if (strcmp(name, "socket") == 0) - return __PNR_socket; - else if (strcmp(name, "socketpair") == 0) - return __PNR_socketpair; - - if (strcmp(name, "semop") == 0) - return __PNR_semop; - else if (strcmp(name, "semget") == 0) - return __PNR_semget; - else if (strcmp(name, "semctl") == 0) - return __PNR_semctl; - else if (strcmp(name, "semtimedop") == 0) - return __PNR_semtimedop; - else if (strcmp(name, "msgsnd") == 0) - return __PNR_msgsnd; - else if (strcmp(name, "msgrcv") == 0) - return __PNR_msgrcv; - else if (strcmp(name, "msgget") == 0) - return __PNR_msgget; - else if (strcmp(name, "msgctl") == 0) - return __PNR_msgctl; - else if (strcmp(name, "shmat") == 0) - return __PNR_shmat; - else if (strcmp(name, "shmdt") == 0) - return __PNR_shmdt; - else if (strcmp(name, "shmget") == 0) - return __PNR_shmget; - else if (strcmp(name, "shmctl") == 0) - return __PNR_shmctl; - - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *x86_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = x86_syscall_table; - - /* XXX - plenty of room for future improvement here */ - - if (num == __PNR_accept) - return "accept"; - else if (num == __PNR_accept4) - return "accept4"; - else if (num == __PNR_bind) - return "bind"; - else if (num == __PNR_connect) - return "connect"; - else if (num == __PNR_getpeername) - return "getpeername"; - else if (num == __PNR_getsockname) - return "getsockname"; - else if (num == __PNR_getsockopt) - return "getsockopt"; - else if (num == __PNR_listen) - return "listen"; - else if (num == __PNR_recv) - return "recv"; - else if (num == __PNR_recvfrom) - return "recvfrom"; - else if (num == __PNR_recvmsg) - return "recvmsg"; - else if (num == __PNR_recvmmsg) - return "recvmmsg"; - else if (num == __PNR_send) - return "send"; - else if (num == __PNR_sendmsg) - return "sendmsg"; - else if (num == __PNR_sendmmsg) - return "sendmmsg"; - else if (num == __PNR_sendto) - return "sendto"; - else if (num == __PNR_setsockopt) - return "setsockopt"; - else if (num == __PNR_shutdown) - return "shutdown"; - else if (num == __PNR_socket) - return "socket"; - else if (num == __PNR_socketpair) - return "socketpair"; - - if (num == __PNR_semop) - return "semop"; - else if (num == __PNR_semget) - return "semget"; - else if (num == __PNR_semctl) - return "semctl"; - else if (num == __PNR_semtimedop) - return "semtimedop"; - else if (num == __PNR_msgsnd) - return "msgsnd"; - else if (num == __PNR_msgrcv) - return "msgrcv"; - else if (num == __PNR_msgget) - return "msgget"; - else if (num == __PNR_msgctl) - return "msgctl"; - else if (num == __PNR_shmat) - return "shmat"; - else if (num == __PNR_shmdt) - return "shmdt"; - else if (num == __PNR_shmget) - return "shmget"; - else if (num == __PNR_shmctl) - return "shmctl"; - - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *x86_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &x86_syscall_table[spot]; -} diff -Nru libseccomp-2.4.3/src/arch-x86.c libseccomp-2.5.1/src/arch-x86.c --- libseccomp-2.4.3/src/arch-x86.c 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x86.c 2020-11-17 08:34:38.781027373 +1030 @@ -24,6 +24,8 @@ #include #include +#include "db.h" +#include "syscalls.h" #include "arch.h" #include "arch-x86.h" @@ -31,16 +33,165 @@ #define __x86_NR_socketcall 102 #define __x86_NR_ipc 117 -const struct arch_def arch_def_x86 = { - .token = SCMP_ARCH_X86, - .token_bpf = AUDIT_ARCH_I386, - .size = ARCH_SIZE_32, - .endian = ARCH_ENDIAN_LITTLE, - .syscall_resolve_name = x86_syscall_resolve_name, - .syscall_resolve_num = x86_syscall_resolve_num, - .syscall_rewrite = x86_syscall_rewrite, - .rule_add = x86_rule_add, -}; +/** + * Resolve a syscall name to a number + * @param name the syscall name + * + * Resolve the given syscall name to the syscall number using the syscall table. + * Returns the syscall number on success, including negative pseudo syscall + * numbers; returns __NR_SCMP_ERROR on failure. + * + */ +int x86_syscall_resolve_name_munge(const char *name) +{ + if (strcmp(name, "accept") == 0) + return __PNR_accept; + else if (strcmp(name, "accept4") == 0) + return __PNR_accept4; + else if (strcmp(name, "bind") == 0) + return __PNR_bind; + else if (strcmp(name, "connect") == 0) + return __PNR_connect; + else if (strcmp(name, "getpeername") == 0) + return __PNR_getpeername; + else if (strcmp(name, "getsockname") == 0) + return __PNR_getsockname; + else if (strcmp(name, "getsockopt") == 0) + return __PNR_getsockopt; + else if (strcmp(name, "listen") == 0) + return __PNR_listen; + else if (strcmp(name, "recv") == 0) + return __PNR_recv; + else if (strcmp(name, "recvfrom") == 0) + return __PNR_recvfrom; + else if (strcmp(name, "recvmsg") == 0) + return __PNR_recvmsg; + else if (strcmp(name, "recvmmsg") == 0) + return __PNR_recvmmsg; + else if (strcmp(name, "send") == 0) + return __PNR_send; + else if (strcmp(name, "sendmsg") == 0) + return __PNR_sendmsg; + else if (strcmp(name, "sendmmsg") == 0) + return __PNR_sendmmsg; + else if (strcmp(name, "sendto") == 0) + return __PNR_sendto; + else if (strcmp(name, "setsockopt") == 0) + return __PNR_setsockopt; + else if (strcmp(name, "shutdown") == 0) + return __PNR_shutdown; + else if (strcmp(name, "socket") == 0) + return __PNR_socket; + else if (strcmp(name, "socketpair") == 0) + return __PNR_socketpair; + + if (strcmp(name, "semop") == 0) + return __PNR_semop; + else if (strcmp(name, "semget") == 0) + return __PNR_semget; + else if (strcmp(name, "semctl") == 0) + return __PNR_semctl; + else if (strcmp(name, "semtimedop") == 0) + return __PNR_semtimedop; + else if (strcmp(name, "msgsnd") == 0) + return __PNR_msgsnd; + else if (strcmp(name, "msgrcv") == 0) + return __PNR_msgrcv; + else if (strcmp(name, "msgget") == 0) + return __PNR_msgget; + else if (strcmp(name, "msgctl") == 0) + return __PNR_msgctl; + else if (strcmp(name, "shmat") == 0) + return __PNR_shmat; + else if (strcmp(name, "shmdt") == 0) + return __PNR_shmdt; + else if (strcmp(name, "shmget") == 0) + return __PNR_shmget; + else if (strcmp(name, "shmctl") == 0) + return __PNR_shmctl; + + return x86_syscall_resolve_name(name); +} + +/** + * Resolve a syscall number to a name + * @param num the syscall number + * + * Resolve the given syscall number to the syscall name using the syscall table. + * Returns a pointer to the syscall name string on success, including pseudo + * syscall names; returns NULL on failure. + * + */ +const char *x86_syscall_resolve_num_munge(int num) +{ + if (num == __PNR_accept) + return "accept"; + else if (num == __PNR_accept4) + return "accept4"; + else if (num == __PNR_bind) + return "bind"; + else if (num == __PNR_connect) + return "connect"; + else if (num == __PNR_getpeername) + return "getpeername"; + else if (num == __PNR_getsockname) + return "getsockname"; + else if (num == __PNR_getsockopt) + return "getsockopt"; + else if (num == __PNR_listen) + return "listen"; + else if (num == __PNR_recv) + return "recv"; + else if (num == __PNR_recvfrom) + return "recvfrom"; + else if (num == __PNR_recvmsg) + return "recvmsg"; + else if (num == __PNR_recvmmsg) + return "recvmmsg"; + else if (num == __PNR_send) + return "send"; + else if (num == __PNR_sendmsg) + return "sendmsg"; + else if (num == __PNR_sendmmsg) + return "sendmmsg"; + else if (num == __PNR_sendto) + return "sendto"; + else if (num == __PNR_setsockopt) + return "setsockopt"; + else if (num == __PNR_shutdown) + return "shutdown"; + else if (num == __PNR_socket) + return "socket"; + else if (num == __PNR_socketpair) + return "socketpair"; + + if (num == __PNR_semop) + return "semop"; + else if (num == __PNR_semget) + return "semget"; + else if (num == __PNR_semctl) + return "semctl"; + else if (num == __PNR_semtimedop) + return "semtimedop"; + else if (num == __PNR_msgsnd) + return "msgsnd"; + else if (num == __PNR_msgrcv) + return "msgrcv"; + else if (num == __PNR_msgget) + return "msgget"; + else if (num == __PNR_msgctl) + return "msgctl"; + else if (num == __PNR_shmat) + return "shmat"; + else if (num == __PNR_shmdt) + return "shmdt"; + else if (num == __PNR_shmget) + return "shmget"; + else if (num == __PNR_shmctl) + return "shmctl"; + + return x86_syscall_resolve_num(num); +} /** * Convert a multiplexed pseudo syscall into a direct syscall @@ -461,3 +612,14 @@ free(rule_dup); return rc; } + +const struct arch_def arch_def_x86 = { + .token = SCMP_ARCH_X86, + .token_bpf = AUDIT_ARCH_I386, + .size = ARCH_SIZE_32, + .endian = ARCH_ENDIAN_LITTLE, + .syscall_resolve_name = x86_syscall_resolve_name_munge, + .syscall_resolve_num = x86_syscall_resolve_num_munge, + .syscall_rewrite = x86_syscall_rewrite, + .rule_add = x86_rule_add, +}; diff -Nru libseccomp-2.4.3/src/arch-x86.h libseccomp-2.5.1/src/arch-x86.h --- libseccomp-2.4.3/src/arch-x86.h 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x86.h 2020-11-17 08:34:38.781027373 +1030 @@ -22,21 +22,8 @@ #ifndef _ARCH_X86_H #define _ARCH_X86_H -#include - #include "arch.h" -#include "db.h" -#include "system.h" - -extern const struct arch_def arch_def_x86; - -int x86_syscall_resolve_name(const char *name); -const char *x86_syscall_resolve_num(int num); - -const struct arch_syscall_def *x86_syscall_iterate(unsigned int spot); - -int x86_syscall_rewrite(int *syscall); -int x86_rule_add(struct db_filter *db, struct db_api_rule_list *rule); +ARCH_DECL(x86) #endif diff -Nru libseccomp-2.4.3/src/arch-x86_64-syscalls.c libseccomp-2.5.1/src/arch-x86_64-syscalls.c --- libseccomp-2.4.3/src/arch-x86_64-syscalls.c 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x86_64-syscalls.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,559 +0,0 @@ -/** - * Enhanced Seccomp x86_64 Syscall Table - * - * Copyright (c) 2012 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include - -#include - -#include "arch.h" -#include "arch-x86_64.h" - -/* NOTE: based on Linux v5.4-rc4 */ -const struct arch_syscall_def x86_64_syscall_table[] = { \ - { "_llseek", __PNR__llseek }, - { "_newselect", __PNR__newselect }, - { "_sysctl", 156 }, - { "accept", 43 }, - { "accept4", 288 }, - { "access", 21 }, - { "acct", 163 }, - { "add_key", 248 }, - { "adjtimex", 159 }, - { "afs_syscall", 183 }, - { "alarm", 37 }, - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, - { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", 158 }, - { "bdflush", __PNR_bdflush }, - { "bind", 49 }, - { "bpf", 321 }, - { "break", __PNR_break }, - { "breakpoint", __PNR_breakpoint }, - { "brk", 12 }, - { "cachectl", __PNR_cachectl }, - { "cacheflush", __PNR_cacheflush }, - { "capget", 125 }, - { "capset", 126 }, - { "chdir", 80 }, - { "chmod", 90 }, - { "chown", 92 }, - { "chown32", __PNR_chown32 }, - { "chroot", 161 }, - { "clock_adjtime", 305 }, - { "clock_adjtime64", __PNR_clock_adjtime64 }, - { "clock_getres", 229 }, - { "clock_getres_time64", __PNR_clock_getres_time64 }, - { "clock_gettime", 228 }, - { "clock_gettime64", __PNR_clock_gettime64 }, - { "clock_nanosleep", 230 }, - { "clock_nanosleep_time64", __PNR_clock_nanosleep_time64 }, - { "clock_settime", 227 }, - { "clock_settime64", __PNR_clock_settime64 }, - { "clone", 56 }, - { "clone3", 435 }, - { "close", 3 }, - { "connect", 42 }, - { "copy_file_range", 326 }, - { "creat", 85 }, - { "create_module", 174 }, - { "delete_module", 176 }, - { "dup", 32 }, - { "dup2", 33 }, - { "dup3", 292 }, - { "epoll_create", 213 }, - { "epoll_create1", 291 }, - { "epoll_ctl", 233 }, - { "epoll_ctl_old", 214 }, - { "epoll_pwait", 281 }, - { "epoll_wait", 232 }, - { "epoll_wait_old", 215 }, - { "eventfd", 284 }, - { "eventfd2", 290 }, - { "execve", 59 }, - { "execveat", 322 }, - { "exit", 60 }, - { "exit_group", 231 }, - { "faccessat", 269 }, - { "fadvise64", 221 }, - { "fadvise64_64", __PNR_fadvise64_64 }, - { "fallocate", 285 }, - { "fanotify_init", 300 }, - { "fanotify_mark", 301 }, - { "fchdir", 81 }, - { "fchmod", 91 }, - { "fchmodat", 268 }, - { "fchown", 93 }, - { "fchown32", __PNR_fchown32 }, - { "fchownat", 260 }, - { "fcntl", 72 }, - { "fcntl64", __PNR_fcntl64 }, - { "fdatasync", 75 }, - { "fgetxattr", 193 }, - { "finit_module", 313 }, - { "flistxattr", 196 }, - { "flock", 73 }, - { "fork", 57 }, - { "fremovexattr", 199 }, - { "fsconfig", 431 }, - { "fsetxattr", 190 }, - { "fsmount", 432 }, - { "fsopen", 430 }, - { "fspick", 433 }, - { "fstat", 5 }, - { "fstat64", __PNR_fstat64 }, - { "fstatat64", __PNR_fstatat64 }, - { "fstatfs", 138 }, - { "fstatfs64", __PNR_fstatfs64 }, - { "fsync", 74 }, - { "ftime", __PNR_ftime }, - { "ftruncate", 77 }, - { "ftruncate64", __PNR_ftruncate64 }, - { "futex", 202 }, - { "futex_time64", __PNR_futex_time64 }, - { "futimesat", 261 }, - { "get_kernel_syms", 177 }, - { "get_mempolicy", 239 }, - { "get_robust_list", 274 }, - { "get_thread_area", 211 }, - { "get_tls", __PNR_get_tls }, - { "getcpu", 309 }, - { "getcwd", 79 }, - { "getdents", 78 }, - { "getdents64", 217 }, - { "getegid", 108 }, - { "getegid32", __PNR_getegid32 }, - { "geteuid", 107 }, - { "geteuid32", __PNR_geteuid32 }, - { "getgid", 104 }, - { "getgid32", __PNR_getgid32 }, - { "getgroups", 115 }, - { "getgroups32", __PNR_getgroups32 }, - { "getitimer", 36 }, - { "getpeername", 52 }, - { "getpgid", 121 }, - { "getpgrp", 111 }, - { "getpid", 39 }, - { "getpmsg", 181 }, - { "getppid", 110 }, - { "getpriority", 140 }, - { "getrandom", 318 }, - { "getresgid", 120 }, - { "getresgid32", __PNR_getresgid32 }, - { "getresuid", 118 }, - { "getresuid32", __PNR_getresuid32 }, - { "getrlimit", 97 }, - { "getrusage", 98 }, - { "getsid", 124 }, - { "getsockname", 51 }, - { "getsockopt", 55 }, - { "gettid", 186 }, - { "gettimeofday", 96 }, - { "getuid", 102 }, - { "getuid32", __PNR_getuid32 }, - { "getxattr", 191 }, - { "gtty", __PNR_gtty }, - { "idle", __PNR_idle }, - { "init_module", 175 }, - { "inotify_add_watch", 254 }, - { "inotify_init", 253 }, - { "inotify_init1", 294 }, - { "inotify_rm_watch", 255 }, - { "io_cancel", 210 }, - { "io_destroy", 207 }, - { "io_getevents", 208 }, - { "io_pgetevents", 333 }, - { "io_pgetevents_time64", __PNR_io_pgetevents_time64 }, - { "io_setup", 206 }, - { "io_submit", 209 }, - { "io_uring_setup", 425 }, - { "io_uring_enter", 426 }, - { "io_uring_register", 427 }, - { "ioctl", 16 }, - { "ioperm", 173 }, - { "iopl", 172 }, - { "ioprio_get", 252 }, - { "ioprio_set", 251 }, - { "ipc", __PNR_ipc }, - { "kcmp", 312 }, - { "kexec_file_load", 320 }, - { "kexec_load", 246 }, - { "keyctl", 250 }, - { "kill", 62 }, - { "lchown", 94 }, - { "lchown32", __PNR_lchown32 }, - { "lgetxattr", 192 }, - { "link", 86 }, - { "linkat", 265 }, - { "listen", 50 }, - { "listxattr", 194 }, - { "llistxattr", 195 }, - { "lock", __PNR_lock }, - { "lookup_dcookie", 212 }, - { "lremovexattr", 198 }, - { "lseek", 8 }, - { "lsetxattr", 189 }, - { "lstat", 6 }, - { "lstat64", __PNR_lstat64 }, - { "madvise", 28 }, - { "mbind", 237 }, - { "membarrier", 324 }, - { "memfd_create", 319 }, - { "migrate_pages", 256 }, - { "mincore", 27 }, - { "mkdir", 83 }, - { "mkdirat", 258 }, - { "mknod", 133 }, - { "mknodat", 259 }, - { "mlock", 149 }, - { "mlock2", 325 }, - { "mlockall", 151 }, - { "mmap", 9 }, - { "mmap2", __PNR_mmap2 }, - { "modify_ldt", 154 }, - { "mount", 165 }, - { "move_mount", 429 }, - { "move_pages", 279 }, - { "mprotect", 10 }, - { "mpx", __PNR_mpx }, - { "mq_getsetattr", 245 }, - { "mq_notify", 244 }, - { "mq_open", 240 }, - { "mq_timedreceive", 243 }, - { "mq_timedreceive_time64", __PNR_mq_timedreceive_time64 }, - { "mq_timedsend", 242 }, - { "mq_timedsend_time64", __PNR_mq_timedsend_time64 }, - { "mq_unlink", 241 }, - { "mremap", 25 }, - { "msgctl", 71 }, - { "msgget", 68 }, - { "msgrcv", 70 }, - { "msgsnd", 69 }, - { "msync", 26 }, - { "multiplexer", __PNR_multiplexer }, - { "munlock", 150 }, - { "munlockall", 152 }, - { "munmap", 11 }, - { "name_to_handle_at", 303 }, - { "nanosleep", 35 }, - { "newfstatat", 262 }, - { "nfsservctl", 180 }, - { "nice", __PNR_nice }, - { "oldfstat", __PNR_oldfstat }, - { "oldlstat", __PNR_oldlstat }, - { "oldolduname", __PNR_oldolduname }, - { "oldstat", __PNR_oldstat }, - { "olduname", __PNR_olduname }, - { "oldwait4", __PNR_oldwait4 }, - { "open", 2 }, - { "open_by_handle_at", 304 }, - { "open_tree", 428 }, - { "openat", 257 }, - { "pause", 34 }, - { "pciconfig_iobase", __PNR_pciconfig_iobase }, - { "pciconfig_read", __PNR_pciconfig_read }, - { "pciconfig_write", __PNR_pciconfig_write }, - { "perf_event_open", 298 }, - { "personality", 135 }, - { "pidfd_open", 434 }, - { "pidfd_send_signal", 424 }, - { "pipe", 22 }, - { "pipe2", 293 }, - { "pivot_root", 155 }, - { "pkey_alloc", 330 }, - { "pkey_free", 331 }, - { "pkey_mprotect", 329 }, - { "poll", 7 }, - { "ppoll", 271 }, - { "ppoll_time64", __PNR_ppoll_time64 }, - { "prctl", 157 }, - { "pread64", 17 }, - { "preadv", 295 }, - { "preadv2", 327 }, - { "prlimit64", 302 }, - { "process_vm_readv", 310 }, - { "process_vm_writev", 311 }, - { "prof", __PNR_prof }, - { "profil", __PNR_profil }, - { "pselect6", 270 }, - { "pselect6_time64", __PNR_pselect6_time64 }, - { "ptrace", 101 }, - { "putpmsg", 182 }, - { "pwrite64", 18 }, - { "pwritev", 296 }, - { "pwritev2", 328 }, - { "query_module", 178 }, - { "quotactl", 179 }, - { "read", 0 }, - { "readahead", 187 }, - { "readdir", __PNR_readdir }, - { "readlink", 89 }, - { "readlinkat", 267 }, - { "readv", 19 }, - { "reboot", 169 }, - { "recv", __PNR_recv }, - { "recvfrom", 45 }, - { "recvmmsg", 299 }, - { "recvmmsg_time64", __PNR_recvmmsg_time64 }, - { "recvmsg", 47 }, - { "remap_file_pages", 216 }, - { "removexattr", 197 }, - { "rename", 82 }, - { "renameat", 264 }, - { "renameat2", 316 }, - { "request_key", 249 }, - { "restart_syscall", 219 }, - { "rmdir", 84 }, - { "rseq", 334 }, - { "rt_sigaction", 13 }, - { "rt_sigpending", 127 }, - { "rt_sigprocmask", 14 }, - { "rt_sigqueueinfo", 129 }, - { "rt_sigreturn", 15 }, - { "rt_sigsuspend", 130 }, - { "rt_sigtimedwait", 128 }, - { "rt_sigtimedwait_time64", __PNR_rt_sigtimedwait_time64 }, - { "rt_tgsigqueueinfo", 297 }, - { "rtas", __PNR_rtas }, - { "s390_guarded_storage", __PNR_s390_guarded_storage }, - { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, - { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, - { "s390_runtime_instr", __PNR_s390_runtime_instr }, - { "s390_sthyi", __PNR_s390_sthyi }, - { "sched_get_priority_max", 146 }, - { "sched_get_priority_min", 147 }, - { "sched_getaffinity", 204 }, - { "sched_getattr", 315 }, - { "sched_getparam", 143 }, - { "sched_getscheduler", 145 }, - { "sched_rr_get_interval", 148 }, - { "sched_rr_get_interval_time64", __PNR_sched_rr_get_interval_time64 }, - { "sched_setaffinity", 203 }, - { "sched_setattr", 314 }, - { "sched_setparam", 142 }, - { "sched_setscheduler", 144 }, - { "sched_yield", 24 }, - { "seccomp", 317 }, - { "security", 185 }, - { "select", 23 }, - { "semctl", 66 }, - { "semget", 64 }, - { "semop", 65 }, - { "semtimedop", 220 }, - { "semtimedop_time64", __PNR_semtimedop_time64 }, - { "send", __PNR_send }, - { "sendfile", 40 }, - { "sendfile64", __PNR_sendfile64 }, - { "sendmmsg", 307 }, - { "sendmsg", 46 }, - { "sendto", 44 }, - { "set_mempolicy", 238 }, - { "set_robust_list", 273 }, - { "set_thread_area", 205 }, - { "set_tid_address", 218 }, - { "set_tls", __PNR_set_tls }, - { "setdomainname", 171 }, - { "setfsgid", 123 }, - { "setfsgid32", __PNR_setfsgid32 }, - { "setfsuid", 122 }, - { "setfsuid32", __PNR_setfsuid32 }, - { "setgid", 106 }, - { "setgid32", __PNR_setgid32 }, - { "setgroups", 116 }, - { "setgroups32", __PNR_setgroups32 }, - { "sethostname", 170 }, - { "setitimer", 38 }, - { "setns", 308 }, - { "setpgid", 109 }, - { "setpriority", 141 }, - { "setregid", 114 }, - { "setregid32", __PNR_setregid32 }, - { "setresgid", 119 }, - { "setresgid32", __PNR_setresgid32 }, - { "setresuid", 117 }, - { "setresuid32", __PNR_setresuid32 }, - { "setreuid", 113 }, - { "setreuid32", __PNR_setreuid32 }, - { "setrlimit", 160 }, - { "setsid", 112 }, - { "setsockopt", 54 }, - { "settimeofday", 164 }, - { "setuid", 105 }, - { "setuid32", __PNR_setuid32 }, - { "setxattr", 188 }, - { "sgetmask", __PNR_sgetmask }, - { "shmat", 30 }, - { "shmctl", 31 }, - { "shmdt", 67 }, - { "shmget", 29 }, - { "shutdown", 48 }, - { "sigaction", __PNR_sigaction }, - { "sigaltstack", 131 }, - { "signal", __PNR_signal }, - { "signalfd", 282 }, - { "signalfd4", 289 }, - { "sigpending", __PNR_sigpending }, - { "sigprocmask", __PNR_sigprocmask }, - { "sigreturn", __PNR_sigreturn }, - { "sigsuspend", __PNR_sigsuspend }, - { "socket", 41 }, - { "socketcall", __PNR_socketcall }, - { "socketpair", 53 }, - { "splice", 275 }, - { "spu_create", __PNR_spu_create }, - { "spu_run", __PNR_spu_run }, - { "ssetmask", __PNR_ssetmask }, - { "stat", 4 }, - { "stat64", __PNR_stat64 }, - { "statfs", 137 }, - { "statfs64", __PNR_statfs64 }, - { "statx", 332 }, - { "stime", __PNR_stime }, - { "stty", __PNR_stty }, - { "subpage_prot", __PNR_subpage_prot }, - { "swapcontext", __PNR_swapcontext }, - { "swapoff", 168 }, - { "swapon", 167 }, - { "switch_endian", __PNR_switch_endian }, - { "symlink", 88 }, - { "symlinkat", 266 }, - { "sync", 162 }, - { "sync_file_range", 277 }, - { "sync_file_range2", __PNR_sync_file_range2 }, - { "syncfs", 306 }, - { "syscall", __PNR_syscall }, - { "sys_debug_setcontext", __PNR_sys_debug_setcontext }, - { "sysfs", 139 }, - { "sysinfo", 99 }, - { "syslog", 103 }, - { "sysmips", __PNR_sysmips }, - { "tee", 276 }, - { "tgkill", 234 }, - { "time", 201 }, - { "timer_create", 222 }, - { "timer_delete", 226 }, - { "timer_getoverrun", 225 }, - { "timer_gettime", 224 }, - { "timer_gettime64", __PNR_timer_gettime64 }, - { "timer_settime", 223 }, - { "timer_settime64", __PNR_timer_settime64 }, - { "timerfd", __PNR_timerfd }, - { "timerfd_create", 283 }, - { "timerfd_gettime", 287 }, - { "timerfd_gettime64", __PNR_timerfd_gettime64 }, - { "timerfd_settime", 286 }, - { "timerfd_settime64", __PNR_timerfd_settime64 }, - { "times", 100 }, - { "tkill", 200 }, - { "truncate", 76 }, - { "truncate64", __PNR_truncate64 }, - { "tuxcall", 184 }, - { "ugetrlimit", __PNR_ugetrlimit }, - { "ulimit", __PNR_ulimit }, - { "umask", 95 }, - { "umount", __PNR_umount }, - { "umount2", 166 }, - { "uname", 63 }, - { "unlink", 87 }, - { "unlinkat", 263 }, - { "unshare", 272 }, - { "uselib", 134 }, - { "userfaultfd", 323 }, - { "usr26", __PNR_usr26 }, - { "usr32", __PNR_usr32 }, - { "ustat", 136 }, - { "utime", 132 }, - { "utimensat", 280 }, - { "utimensat_time64", __PNR_utimensat_time64 }, - { "utimes", 235 }, - { "vfork", 58 }, - { "vhangup", 153 }, - { "vm86", __PNR_vm86 }, - { "vm86old", __PNR_vm86old }, - { "vmsplice", 278 }, - { "vserver", 236 }, - { "wait4", 61 }, - { "waitid", 247 }, - { "waitpid", __PNR_waitpid }, - { "write", 1 }, - { "writev", 20 }, - { NULL, __NR_SCMP_ERROR }, -}; - -/** - * Resolve a syscall name to a number - * @param name the syscall name - * - * Resolve the given syscall name to the syscall number using the syscall table. - * Returns the syscall number on success, including negative pseudo syscall - * numbers; returns __NR_SCMP_ERROR on failure. - * - */ -int x86_64_syscall_resolve_name(const char *name) -{ - unsigned int iter; - const struct arch_syscall_def *table = x86_64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].name != NULL; iter++) { - if (strcmp(name, table[iter].name) == 0) - return table[iter].num; - } - - return __NR_SCMP_ERROR; -} - -/** - * Resolve a syscall number to a name - * @param num the syscall number - * - * Resolve the given syscall number to the syscall name using the syscall table. - * Returns a pointer to the syscall name string on success, including pseudo - * syscall names; returns NULL on failure. - * - */ -const char *x86_64_syscall_resolve_num(int num) -{ - unsigned int iter; - const struct arch_syscall_def *table = x86_64_syscall_table; - - /* XXX - plenty of room for future improvement here */ - for (iter = 0; table[iter].num != __NR_SCMP_ERROR; iter++) { - if (num == table[iter].num) - return table[iter].name; - } - - return NULL; -} - -/** - * Iterate through the syscall table and return the syscall mapping - * @param spot the offset into the syscall table - * - * Return the syscall mapping at position @spot or NULL on failure. This - * function should only ever be used internally by libseccomp. - * - */ -const struct arch_syscall_def *x86_64_syscall_iterate(unsigned int spot) -{ - /* XXX - no safety checks here */ - return &x86_64_syscall_table[spot]; -} - diff -Nru libseccomp-2.4.3/src/arch-x86_64.h libseccomp-2.5.1/src/arch-x86_64.h --- libseccomp-2.4.3/src/arch-x86_64.h 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch-x86_64.h 2020-11-17 08:34:38.781027373 +1030 @@ -22,16 +22,8 @@ #ifndef _ARCH_x86_64_H #define _ARCH_x86_64_H -#include - #include "arch.h" -#include "system.h" - -extern const struct arch_def arch_def_x86_64; - -int x86_64_syscall_resolve_name(const char *name); -const char *x86_64_syscall_resolve_num(int num); -const struct arch_syscall_def *x86_64_syscall_iterate(unsigned int spot); +ARCH_DECL(x86_64) #endif diff -Nru libseccomp-2.4.3/src/arch.c libseccomp-2.5.1/src/arch.c --- libseccomp-2.4.3/src/arch.c 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/src/arch.c 2020-11-17 08:34:59.763209755 +1030 @@ -39,8 +39,10 @@ #include "arch-mips64.h" #include "arch-mips64n32.h" #include "arch-parisc.h" +#include "arch-parisc64.h" #include "arch-ppc.h" #include "arch-ppc64.h" +#include "arch-riscv64.h" #include "arch-s390.h" #include "arch-s390x.h" #include "db.h" @@ -94,6 +96,8 @@ const struct arch_def *arch_def_native = &arch_def_s390x; #elif __s390__ const struct arch_def *arch_def_native = &arch_def_s390; +#elif __riscv && __riscv_xlen == 64 +const struct arch_def *arch_def_native = &arch_def_riscv64; #else #error the arch code needs to know about your machine type #endif /* machine type guess */ @@ -156,6 +160,8 @@ return &arch_def_s390; case SCMP_ARCH_S390X: return &arch_def_s390x; + case SCMP_ARCH_RISCV64: + return &arch_def_riscv64; } return NULL; @@ -206,6 +212,8 @@ return &arch_def_s390; else if (strcmp(arch_name, "s390x") == 0) return &arch_def_s390x; + else if (strcmp(arch_name, "riscv64") == 0) + return &arch_def_riscv64; return NULL; } @@ -367,10 +375,10 @@ if (sys >= -1) { /* we shouldn't be here - no rewrite needed */ return 0; - } else if (sys < -1 && sys > -100) { - /* reserved values */ + } else if (sys > -100) { + /* -2 to -99 are reserved values */ return -EINVAL; - } else if (sys <= -100 && sys > -10000) { + } else if (sys > -10000) { /* rewritable syscalls */ if (arch->syscall_rewrite) (*arch->syscall_rewrite)(syscall); diff -Nru libseccomp-2.4.3/src/arch.h libseccomp-2.5.1/src/arch.h --- libseccomp-2.4.3/src/arch.h 2020-03-03 02:13:34.190033127 +1030 +++ libseccomp-2.5.1/src/arch.h 2020-11-17 08:34:38.781027373 +1030 @@ -59,6 +59,13 @@ /* arch_def for the current architecture */ extern const struct arch_def *arch_def_native; +/* macro to declare the arch specific structures and functions */ +#define ARCH_DECL(NAME) \ + extern const struct arch_def arch_def_##NAME; \ + int NAME##_syscall_resolve_name(const char *name); \ + const char *NAME##_syscall_resolve_num(int num); \ + const struct arch_syscall_def *NAME##_syscall_iterate(unsigned int spot); + /* syscall name/num mapping */ struct arch_syscall_def { const char *name; diff -Nru libseccomp-2.4.3/src/db.c libseccomp-2.5.1/src/db.c --- libseccomp-2.4.3/src/db.c 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/src/db.c 2020-11-17 08:34:59.764209764 +1030 @@ -841,6 +841,7 @@ } db->syscalls = NULL; } + db->syscall_cnt = 0; /* free any rules */ if (db->rules != NULL) { @@ -909,6 +910,9 @@ { unsigned int iter; + if (snap == NULL) + return; + if (snap->filter_cnt > 0) { for (iter = 0; iter < snap->filter_cnt; iter++) { if (snap->filters[iter]) @@ -1064,9 +1068,16 @@ col->attr.tsync_enable = 0; col->attr.api_tskip = 0; col->attr.log_enable = 0; + col->attr.spec_allow = 0; + col->attr.optimize = 1; + col->attr.api_sysrawrc = 0; /* set the state */ col->state = _DB_STA_VALID; + if (def_action == SCMP_ACT_NOTIFY) + col->notify_used = true; + else + col->notify_used = false; /* reset the initial db */ db = _db_init(arch_def_native); @@ -1128,6 +1139,7 @@ void db_col_release(struct db_filter_col *col) { unsigned int iter; + struct db_filter_snap *snap; if (col == NULL) return; @@ -1135,6 +1147,13 @@ /* set the state, just in case */ col->state = _DB_STA_FREED; + /* free any snapshots */ + while (col->snapshots != NULL) { + snap = col->snapshots; + col->snapshots = snap->next; + _db_snap_release(snap); + } + /* free any filters */ for (iter = 0; iter < col->filter_cnt; iter++) _db_release(col->filters[iter]); @@ -1148,30 +1167,42 @@ } /** - * Validate the seccomp action - * @param action the seccomp action + * Validate a filter collection + * @param col the seccomp filter collection + * + * This function validates a seccomp filter collection. Returns zero if the + * collection is valid, negative values on failure. * - * Verify that the given action is a valid seccomp action; return zero if - * valid, -EINVAL if invalid. */ -int db_action_valid(uint32_t action) +int db_col_valid(struct db_filter_col *col) { - if (sys_chk_seccomp_action(action) == 1) + if (col != NULL && col->state == _DB_STA_VALID && col->filter_cnt > 0) return 0; return -EINVAL; } /** - * Validate a filter collection + * Validate the seccomp action * @param col the seccomp filter collection + * @param action the seccomp action * - * This function validates a seccomp filter collection. Returns zero if the - * collection is valid, negative values on failure. - * + * Verify that the given action is a valid seccomp action; return zero if + * valid, -EINVAL if invalid. */ -int db_col_valid(struct db_filter_col *col) +int db_col_action_valid(const struct db_filter_col *col, uint32_t action) { - if (col != NULL && col->state == _DB_STA_VALID && col->filter_cnt > 0) + if (col != NULL) { + /* NOTE: in some cases we don't have a filter collection yet, + * but when we do we need to do the following checks */ + + /* kernel disallows TSYNC and NOTIFY in one filter unless we + * have the TSYNC_ESRCH flag */ + if (sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH) < 1 && + col->attr.tsync_enable && action == SCMP_ACT_NOTIFY) + return -EINVAL; + } + + if (sys_chk_seccomp_action(action) == 1) return 0; return -EINVAL; } @@ -1281,8 +1312,17 @@ case SCMP_FLTATR_CTL_LOG: *value = col->attr.log_enable; break; + case SCMP_FLTATR_CTL_SSB: + *value = col->attr.spec_allow; + break; + case SCMP_FLTATR_CTL_OPTIMIZE: + *value = col->attr.optimize; + break; + case SCMP_FLTATR_API_SYSRAWRC: + *value = col->attr.api_sysrawrc; + break; default: - rc = -EEXIST; + rc = -EINVAL; break; } @@ -1290,6 +1330,25 @@ } /** + * Get a filter attribute + * @param col the seccomp filter collection + * @param attr the filter attribute + * + * Returns the requested filter attribute value with zero on any error. + * Special care must be given with this function as error conditions can be + * hidden from the caller. + * + */ +uint32_t db_col_attr_read(const struct db_filter_col *col, + enum scmp_filter_attr attr) +{ + uint32_t value = 0; + + db_col_attr_get(col, attr, &value); + return value; +} + +/** * Set a filter attribute * @param col the seccomp filter collection * @param attr the filter attribute @@ -1310,7 +1369,7 @@ return -EACCES; break; case SCMP_FLTATR_ACT_BADARCH: - if (db_action_valid(value) == 0) + if (db_col_action_valid(col, value) == 0) col->attr.act_badarch = value; else return -EINVAL; @@ -1323,6 +1382,11 @@ if (rc == 1) { /* supported */ rc = 0; + /* kernel disallows TSYNC and NOTIFY in one filter + * unless we have TSYNC_ESRCH */ + if (sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_TSYNC_ESRCH) < 1 && + value && col->notify_used) + return -EINVAL; col->attr.tsync_enable = (value ? 1 : 0); } else if (rc == 0) /* unsupported */ @@ -1342,8 +1406,33 @@ rc = -EOPNOTSUPP; } break; + case SCMP_FLTATR_CTL_SSB: + rc = sys_chk_seccomp_flag(SECCOMP_FILTER_FLAG_SPEC_ALLOW); + if (rc == 1) { + /* supported */ + rc = 0; + col->attr.spec_allow = (value ? 1 : 0); + } else if (rc == 0) { + /* unsupported */ + rc = -EOPNOTSUPP; + } + break; + case SCMP_FLTATR_CTL_OPTIMIZE: + switch (value) { + case 1: + case 2: + col->attr.optimize = value; + break; + default: + rc = -EOPNOTSUPP; + break; + } + break; + case SCMP_FLTATR_API_SYSRAWRC: + col->attr.api_sysrawrc = (value ? 1 : 0); + break; default: - rc = -EEXIST; + rc = -EINVAL; break; } @@ -2008,6 +2097,7 @@ s_new->next = db->syscalls; db->syscalls = s_new; } + db->syscall_cnt++; return 0; } else if (s_iter->chains == NULL) { if (rm_flag || !s_iter->valid) { @@ -2147,6 +2237,44 @@ } /** + * Add a new rule to a single filter + * @param filter the filter + * @param rule the filter rule + * + * This is a helper function for db_col_rule_add() and similar functions, it + * isn't generally useful. Returns zero on success, negative values on error. + * + */ +static int _db_col_rule_add(struct db_filter *filter, + struct db_api_rule_list *rule) +{ + int rc; + struct db_api_rule_list *iter; + + /* add the rule to the filter */ + rc = arch_filter_rule_add(filter, rule); + if (rc != 0) + return rc; + + /* insert the chain to the end of the rule list */ + iter = rule; + while (iter->next) + iter = iter->next; + if (filter->rules != NULL) { + rule->prev = filter->rules->prev; + iter->next = filter->rules; + filter->rules->prev->next = rule; + filter->rules->prev = iter; + } else { + rule->prev = iter; + iter->next = rule; + filter->rules = rule; + } + + return 0; +} + +/** * Add a new rule to the current filter * @param col the filter collection * @param strict the strict flag @@ -2174,7 +2302,7 @@ size_t chain_size; struct db_api_arg *chain = NULL; struct scmp_arg_cmp arg_data; - struct db_api_rule_list *rule, *rule_tmp; + struct db_api_rule_list *rule; struct db_filter *db; /* collect the arguments for the filter rule */ @@ -2222,9 +2350,6 @@ /* add the rule to the different filters in the collection */ for (iter = 0; iter < col->filter_cnt; iter++) { - - /* TODO: consolidate with db_col_transaction_start() */ - db = col->filters[iter]; /* create the rule */ @@ -2235,24 +2360,10 @@ } /* add the rule */ - rc_tmp = arch_filter_rule_add(db, rule); - if (rc_tmp == 0) { - /* insert the chain to the end of the rule list */ - rule_tmp = rule; - while (rule_tmp->next) - rule_tmp = rule_tmp->next; - if (db->rules != NULL) { - rule->prev = db->rules->prev; - rule_tmp->next = db->rules; - db->rules->prev->next = rule; - db->rules->prev = rule_tmp; - } else { - rule->prev = rule_tmp; - rule_tmp->next = rule; - db->rules = rule; - } - } else + rc_tmp = _db_col_rule_add(db, rule); + if (rc_tmp != 0) free(rule); + add_arch_fail: if (rc_tmp != 0 && rc == 0) rc = rc_tmp; @@ -2265,6 +2376,9 @@ db_col_transaction_abort(col); add_return: + /* update the misc state */ + if (rc == 0 && action == SCMP_ACT_NOTIFY) + col->notify_used = true; if (chain != NULL) free(chain); return rc; @@ -2284,7 +2398,21 @@ unsigned int iter; struct db_filter_snap *snap; struct db_filter *filter_o, *filter_s; - struct db_api_rule_list *rule_o, *rule_s = NULL, *rule_tmp; + struct db_api_rule_list *rule_o, *rule_s = NULL; + + /* check to see if a shadow snapshot exists */ + if (col->snapshots && col->snapshots->shadow) { + /* we have a shadow! this will be easy */ + + /* NOTE: we don't bother to do any verification of the shadow + * because we start a new transaction every time we add + * a new rule to the filter(s); if this ever changes we + * will need to add a mechanism to verify that the shadow + * transaction is current/correct */ + + col->snapshots->shadow = false; + return 0; + } /* allocate the snapshot */ snap = zmalloc(sizeof(*snap)); @@ -2314,33 +2442,15 @@ if (rule_o == NULL) continue; do { - - /* TODO: consolidate with db_col_rule_add() */ - /* duplicate the rule */ rule_s = db_rule_dup(rule_o); if (rule_s == NULL) goto trans_start_failure; /* add the rule */ - rc = arch_filter_rule_add(filter_s, rule_s); + rc = _db_col_rule_add(filter_s, rule_s); if (rc != 0) goto trans_start_failure; - - /* insert the chain to the end of the rule list */ - rule_tmp = rule_s; - while (rule_tmp->next) - rule_tmp = rule_tmp->next; - if (filter_s->rules != NULL) { - rule_s->prev = filter_s->rules->prev; - rule_tmp->next = filter_s->rules; - filter_s->rules->prev->next = rule_s; - filter_s->rules->prev = rule_tmp; - } else { - rule_s->prev = rule_tmp; - rule_tmp->next = rule_s; - filter_s->rules = rule_s; - } rule_s = NULL; /* next rule */ @@ -2397,14 +2507,114 @@ * Commit the top most seccomp filter transaction * @param col the filter collection * - * This function commits the most recent seccomp filter transaction. + * This function commits the most recent seccomp filter transaction and + * attempts to create a shadow transaction that is a duplicate of the current + * filter to speed up future transactions. * */ void db_col_transaction_commit(struct db_filter_col *col) { + int rc; + unsigned int iter; struct db_filter_snap *snap; + struct db_filter *filter_o, *filter_s; + struct db_api_rule_list *rule_o, *rule_s; snap = col->snapshots; + if (snap == NULL) + return; + + /* check for a shadow set by a higher transaction commit */ + if (snap->shadow) { + /* leave the shadow intact, but drop the next snapshot */ + if (snap->next) { + snap->next = snap->next->next; + _db_snap_release(snap->next); + } + return; + } + + /* adjust the number of filters if needed */ + if (col->filter_cnt > snap->filter_cnt) { + unsigned int tmp_i; + struct db_filter **tmp_f; + + /* add filters */ + tmp_f = realloc(snap->filters, + sizeof(struct db_filter *) * col->filter_cnt); + if (tmp_f == NULL) + goto shadow_err; + snap->filters = tmp_f; + do { + tmp_i = snap->filter_cnt; + snap->filters[tmp_i] = + _db_init(col->filters[tmp_i]->arch); + if (snap->filters[tmp_i] == NULL) + goto shadow_err; + snap->filter_cnt++; + } while (snap->filter_cnt < col->filter_cnt); + } else if (col->filter_cnt < snap->filter_cnt) { + /* remove filters */ + + /* NOTE: while we release the filters we no longer need, we + * don't bother to resize the filter array, we just + * adjust the filter counter, this *should* be harmless + * at the cost of a not reaping all the memory possible */ + + do { + _db_release(snap->filters[snap->filter_cnt--]); + } while (snap->filter_cnt > col->filter_cnt); + } + + /* loop through each filter and update the rules on the snapshot */ + for (iter = 0; iter < col->filter_cnt; iter++) { + filter_o = col->filters[iter]; + filter_s = snap->filters[iter]; + + /* skip ahead to the new rule(s) */ + rule_o = filter_o->rules; + rule_s = filter_s->rules; + if (rule_o == NULL) + /* nothing to shadow */ + continue; + if (rule_s != NULL) { + do { + rule_o = rule_o->next; + rule_s = rule_s->next; + } while (rule_s != filter_s->rules); + + /* did we actually add any rules? */ + if (rule_o == filter_o->rules) + /* no, we are done in this case */ + continue; + } + + /* update the old snapshot to make it a shadow */ + do { + /* duplicate the rule */ + rule_s = db_rule_dup(rule_o); + if (rule_s == NULL) + goto shadow_err; + + /* add the rule */ + rc = _db_col_rule_add(filter_s, rule_s); + if (rc != 0) { + free(rule_s); + goto shadow_err; + } + + /* next rule */ + rule_o = rule_o->next; + } while (rule_o != filter_o->rules); + } + + /* success, mark the snapshot as a shadow and return */ + snap->shadow = true; + return; + +shadow_err: + /* we failed making a shadow, cleanup and return */ col->snapshots = snap->next; _db_snap_release(snap); + return; } diff -Nru libseccomp-2.4.3/src/db.h libseccomp-2.5.1/src/db.h --- libseccomp-2.4.3/src/db.h 2020-03-03 02:49:57.856374583 +1030 +++ libseccomp-2.5.1/src/db.h 2020-11-17 08:34:38.781027373 +1030 @@ -116,6 +116,12 @@ uint32_t api_tskip; /* SECCOMP_FILTER_FLAG_LOG related attributes */ uint32_t log_enable; + /* SPEC_ALLOW related attributes */ + uint32_t spec_allow; + /* SCMP_FLTATR_CTL_OPTIMIZE related attributes */ + uint32_t optimize; + /* return the raw system return codes */ + uint32_t api_sysrawrc; }; struct db_filter { @@ -124,6 +130,7 @@ /* syscall filters, kept as a sorted single-linked list */ struct db_sys_list *syscalls; + unsigned int syscall_cnt; /* list of rules used to build the filters, kept in order */ struct db_api_rule_list *rules; @@ -133,6 +140,7 @@ /* individual filters */ struct db_filter **filters; unsigned int filter_cnt; + bool shadow; struct db_filter_snap *next; }; @@ -151,6 +159,9 @@ /* transaction snapshots */ struct db_filter_snap *snapshots; + + /* userspace notification */ + bool notify_used; }; /** @@ -165,8 +176,6 @@ #define db_list_foreach(iter,list) \ for (iter = (list); iter != NULL; iter = iter->next) -int db_action_valid(uint32_t action); - struct db_api_rule_list *db_rule_dup(const struct db_api_rule_list *src); struct db_filter_col *db_col_init(uint32_t def_action); @@ -175,12 +184,16 @@ int db_col_valid(struct db_filter_col *col); +int db_col_action_valid(const struct db_filter_col *col, uint32_t action); + int db_col_merge(struct db_filter_col *col_dst, struct db_filter_col *col_src); int db_col_arch_exist(struct db_filter_col *col, uint32_t arch_token); int db_col_attr_get(const struct db_filter_col *col, enum scmp_filter_attr attr, uint32_t *value); +uint32_t db_col_attr_read(const struct db_filter_col *col, + enum scmp_filter_attr attr); int db_col_attr_set(struct db_filter_col *col, enum scmp_filter_attr attr, uint32_t value); diff -Nru libseccomp-2.4.3/src/gen_bpf.c libseccomp-2.5.1/src/gen_bpf.c --- libseccomp-2.4.3/src/gen_bpf.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/gen_bpf.c 2020-11-17 08:34:59.764209764 +1030 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -45,6 +46,11 @@ #define AINC_BLK 2 #define AINC_PROG 64 +/* binary tree definitions */ +#define SYSCALLS_PER_NODE (4) +#define BTREE_HSH_INVALID (UINT64_MAX) +#define BTREE_SYSCALL_INVALID (UINT_MAX) + struct acc_state { int32_t offset; uint32_t mask; @@ -159,11 +165,14 @@ /* default action */ uint64_t def_hsh; - /* target arch - NOTE: be careful, temporary use only! */ - const struct arch_def *arch; - /* bpf program */ struct bpf_program *bpf; + + /* WARNING - the following variables are temporary use only */ + const struct arch_def *arch; + struct bpf_blk *b_head; + struct bpf_blk *b_tail; + struct bpf_blk *b_new; }; /** @@ -1144,6 +1153,318 @@ } /** + * Sort the syscalls by syscall number + * @param syscalls the linked list of syscalls to be sorted + * @param s_head the head of the linked list to be returned to the caller + * @param s_tail the tail of the linked list to be returned to the caller + */ +static void _sys_num_sort(struct db_sys_list *syscalls, + struct db_sys_list **s_head, + struct db_sys_list **s_tail) +{ + struct db_sys_list *s_iter, *s_iter_b; + + db_list_foreach(s_iter, syscalls) { + if (*s_head != NULL) { + s_iter_b = *s_head; + while ((s_iter_b->pri_nxt != NULL) && + (s_iter->num <= s_iter_b->num)) + s_iter_b = s_iter_b->pri_nxt; + + if (s_iter->num > s_iter_b->num) { + s_iter->pri_prv = s_iter_b->pri_prv; + s_iter->pri_nxt = s_iter_b; + if (s_iter_b == *s_head) { + (*s_head)->pri_prv = s_iter; + *s_head = s_iter; + } else { + s_iter->pri_prv->pri_nxt = s_iter; + s_iter->pri_nxt->pri_prv = s_iter; + } + } else { + s_iter->pri_prv = *s_tail; + s_iter->pri_nxt = NULL; + s_iter->pri_prv->pri_nxt = s_iter; + *s_tail = s_iter; + } + } else { + *s_head = s_iter; + *s_tail = s_iter; + (*s_head)->pri_prv = NULL; + (*s_head)->pri_nxt = NULL; + } + } +} + +/** + * Sort the syscalls by priority + * @param syscalls the linked list of syscalls to be sorted + * @param s_head the head of the linked list to be returned to the caller + * @param s_tail the tail of the linked list to be returned to the caller + */ +static void _sys_priority_sort(struct db_sys_list *syscalls, + struct db_sys_list **s_head, + struct db_sys_list **s_tail) +{ + struct db_sys_list *s_iter, *s_iter_b; + + db_list_foreach(s_iter, syscalls) { + if (*s_head != NULL) { + s_iter_b = *s_head; + while ((s_iter_b->pri_nxt != NULL) && + (s_iter->priority <= s_iter_b->priority)) + s_iter_b = s_iter_b->pri_nxt; + + if (s_iter->priority > s_iter_b->priority) { + s_iter->pri_prv = s_iter_b->pri_prv; + s_iter->pri_nxt = s_iter_b; + if (s_iter_b == *s_head) { + (*s_head)->pri_prv = s_iter; + *s_head = s_iter; + } else { + s_iter->pri_prv->pri_nxt = s_iter; + s_iter->pri_nxt->pri_prv = s_iter; + } + } else { + s_iter->pri_prv = *s_tail; + s_iter->pri_nxt = NULL; + s_iter->pri_prv->pri_nxt = s_iter; + *s_tail = s_iter; + } + } else { + *s_head = s_iter; + *s_tail = s_iter; + (*s_head)->pri_prv = NULL; + (*s_head)->pri_nxt = NULL; + } + } +} + +/** + * Sort the syscalls + * @param syscalls the linked list of syscalls to be sorted + * @param s_head the head of the linked list to be returned to the caller + * @param s_tail the tail of the linked list to be returned to the caller + * + * Wrapper function for sorting syscalls + * + */ +static void _sys_sort(struct db_sys_list *syscalls, + struct db_sys_list **s_head, + struct db_sys_list **s_tail, + uint32_t optimize) +{ + if (optimize != 2) + _sys_priority_sort(syscalls, s_head, s_tail); + else + /* sort by number for the binary tree */ + _sys_num_sort(syscalls, s_head, s_tail); +} + +/** + * Insert an instruction into the BPF state and connect the linked list + * @param state the BPF state + * @param instr the instruction to insert + * @param insert the BPF blk that represents the instruction + * @param next the next BPF instruction in the linked list + * @param existing_blk insert will be added to the end of this blk if non-NULL + * + * Insert a set of instructions into the BPF state and associate those + * instructions with the bpf_blk called insert. The "next" field in the + * newly inserted block will be linked with the "next" bpf_blk parameter. + */ +static int _gen_bpf_insert(struct bpf_state *state, struct bpf_instr *instr, + struct bpf_blk **insert, struct bpf_blk **next, + struct bpf_blk *existing_blk) +{ + int rc; + + *insert = _blk_append(state, existing_blk, instr); + if (*insert == NULL) + return -ENOMEM; + (*insert)->next = (*next); + if (*next != NULL) + (*next)->prev = (*insert); + *next = *insert; + + rc = _hsh_add(state, insert, 1); + return rc; +} + +/** + * Decide if we need to omit the syscall from the BPF filter + * @param state the BPF state + * @param syscall syscall being tested + * @return true if syscall is to be skipped, false otherwise + */ +static inline bool _skip_syscall(struct bpf_state *state, + struct db_sys_list *syscall) +{ + if (!syscall->valid) + return true; + + /* psuedo-syscalls should not be added to the filter unless explicity + * requested via SCMP_FLTATR_API_TSKIP + */ + if (((int)syscall->num < 0) && + (state->attr->api_tskip == 0 || syscall->num != -1)) + return true; + + return false; +} + +/** + * Calculate the number of syscalls that will be in the BPF filter + * @param state the BPF state + * @param s_tail the last syscall in the syscall linked list + */ +static unsigned int _get_syscall_cnt(struct bpf_state *state, + struct db_sys_list *s_tail) +{ + struct db_sys_list *s_iter; + unsigned int syscall_cnt = 0; + + for (s_iter = s_tail; s_iter != NULL; s_iter = s_iter->pri_prv) { + if (_skip_syscall(state, s_iter)) + continue; + + syscall_cnt++; + } + + return syscall_cnt; +} + +/** + * Calculate the number of levels in the binary tree + * @param syscall_cnt the number of syscalls in this seccomp filter + */ +static int _get_bintree_levels(unsigned int syscall_cnt) +{ + unsigned int i = 2, max_level = SYSCALLS_PER_NODE * 2; + + while (max_level < syscall_cnt) { + max_level <<= 1; + i++; + } + + return i; +} + +/** + * Initialize the binary tree + * @param bintree_hashes Array of hashes that store binary tree jump dests + * @param bintree_syscalls Array of syscalls for the binary tree "if > " logic + * @param bintree_levels Number of levels in the binary tree + * @param syscall_cnt Number of syscalls in this filter + * @param empty_cnt Number of empty slots needed to balance the tree + * + */ +static int _gen_bpf_init_bintree(uint64_t **bintree_hashes, + unsigned int **bintree_syscalls, + unsigned int *bintree_levels, + unsigned int syscall_cnt, + unsigned int *empty_cnt) +{ + int i; + + *bintree_levels = _get_bintree_levels(syscall_cnt); + + if (*bintree_levels > 0) { + *empty_cnt = ((unsigned int)(SYSCALLS_PER_NODE * 2) << + ((*bintree_levels) - 1)) - syscall_cnt; + *bintree_hashes = zmalloc(sizeof(uint64_t) * + (*bintree_levels)); + if (*bintree_hashes == NULL) + return -ENOMEM; + + *bintree_syscalls = zmalloc(sizeof(unsigned int) * + (*bintree_levels)); + if (*bintree_syscalls == NULL) + return -ENOMEM; + + for (i = 0; i < *bintree_levels; i++) { + (*bintree_syscalls)[i] = BTREE_SYSCALL_INVALID; + (*bintree_hashes)[i] = BTREE_HSH_INVALID; + } + } + + return 0; +} + +/** + * Generate the binary tree + * @param state the BPF state + * @param bintree_hashes Array of hashes that store binary tree jump dests + * @param bintree_syscalls Array of syscalls for the binary tree "if > " logic + * @param bintree_levels Number of levels in the binary tree + * @param total_cnt Total number of syscalls and empty slots in the bintree + * @param cur_syscall Current syscall being processed + * @param blks_added Number of BPF blocks added by this function + * + * Generate the BPF instruction blocks for the binary tree for cur_syscall. + * If this syscall is at the end of the node, then this function will + * create the requisite ifs and elses for the tree. + */ +static int _gen_bpf_bintree(struct bpf_state *state, uint64_t *bintree_hashes, + unsigned int *bintree_syscalls, + unsigned int bintree_levels, + unsigned int total_cnt, unsigned int cur_syscall, + unsigned int *blks_added) +{ + struct bpf_blk *b_bintree = NULL; + struct bpf_instr instr; + unsigned int level; + int rc = 0, i, j; + + for (i = bintree_levels - 1; i >= 0; i--) { + level = SYSCALLS_PER_NODE << i; + + if ((total_cnt % level) == 0) { + /* save the "if greater than" syscall num */ + bintree_syscalls[i] = cur_syscall; + /* save the hash for the jf case */ + bintree_hashes[i] = state->b_new->hash; + + for (j = 0; j < i; j++) { + if (bintree_syscalls[j] == BTREE_SYSCALL_INVALID || + bintree_hashes[j] == BTREE_HSH_INVALID) + /* we are near the end of the binary + * tree and the jump-to location is + * not valid. skip this if-else + */ + continue; + + _BPF_INSTR(instr, + _BPF_OP(state->arch, BPF_JMP + BPF_JGT), + _BPF_JMP_NO, + _BPF_JMP_NO, + _BPF_K(state->arch, bintree_syscalls[j])); + instr.jt = _BPF_JMP_HSH(b_bintree == NULL ? + state->b_new->hash : b_bintree->hash); + instr.jf = _BPF_JMP_HSH(bintree_hashes[j]); + (*blks_added)++; + + rc = _gen_bpf_insert(state, &instr, + &b_bintree, &state->b_head, NULL); + if (rc < 0) + goto out; + } + + if (b_bintree != NULL) + /* this is the last if in this "block". + * save it off so the next binary tree + * if can "else" to it. + */ + bintree_hashes[j] = b_bintree->hash; + break; + } + } + +out: + return rc; +} + +/** * Generate the BPF instruction blocks for a given syscall * @param state the BPF state * @param sys the syscall filter DB entry @@ -1222,94 +1543,44 @@ } /** - * Generate the BPF instruction blocks for a given filter/architecture + * Loop through the syscalls in the db_filter and generate their bpf * @param state the BPF state * @param db the filter DB * @param db_secondary the secondary DB - * - * Generate the BPF instruction block for the given filter DB(s)/architecture(s) - * and return a pointer to the block on succes, NULL on failure. The resulting - * block assumes that the architecture token has already been loaded into the - * BPF accumulator. - * + * @param Number of blocks added by this function */ -static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, - const struct db_filter *db, - const struct db_filter *db_secondary) -{ - int rc; - unsigned int blk_cnt = 0; +static int _gen_bpf_syscalls(struct bpf_state *state, + const struct db_filter *db, + const struct db_filter *db_secondary, + unsigned int *blks_added, uint32_t optimize, + unsigned int *bintree_levels) +{ + struct db_sys_list *s_head = NULL, *s_tail = NULL, *s_iter; + unsigned int syscall_cnt, empty_cnt = 0; + uint64_t *bintree_hashes = NULL, nxt_hsh; + unsigned int *bintree_syscalls = NULL; bool acc_reset; - struct bpf_instr instr; - struct db_sys_list *s_head = NULL, *s_tail = NULL, *s_iter, *s_iter_b; - struct bpf_blk *b_head = NULL, *b_tail = NULL, *b_iter, *b_new; + int rc = 0; state->arch = db->arch; + state->b_head = NULL; + state->b_tail = NULL; + state->b_new = NULL; - /* sort the syscall list */ - db_list_foreach(s_iter, db->syscalls) { - if (s_head != NULL) { - s_iter_b = s_head; - while ((s_iter_b->pri_nxt != NULL) && - (s_iter->priority <= s_iter_b->priority)) - s_iter_b = s_iter_b->pri_nxt; + *blks_added = 0; - if (s_iter->priority > s_iter_b->priority) { - s_iter->pri_prv = s_iter_b->pri_prv; - s_iter->pri_nxt = s_iter_b; - if (s_iter_b == s_head) { - s_head->pri_prv = s_iter; - s_head = s_iter; - } else { - s_iter->pri_prv->pri_nxt = s_iter; - s_iter->pri_nxt->pri_prv = s_iter; - } - } else { - s_iter->pri_prv = s_tail; - s_iter->pri_nxt = NULL; - s_iter->pri_prv->pri_nxt = s_iter; - s_tail = s_iter; - } - } else { - s_head = s_iter; - s_tail = s_iter; - s_head->pri_prv = NULL; - s_head->pri_nxt = NULL; - } - } - if (db_secondary != NULL) { - db_list_foreach(s_iter, db_secondary->syscalls) { - if (s_head != NULL) { - s_iter_b = s_head; - while ((s_iter_b->pri_nxt != NULL) && - (s_iter->priority <= s_iter_b->priority)) - s_iter_b = s_iter_b->pri_nxt; - - if (s_iter->priority > s_iter_b->priority) { - s_iter->pri_prv = s_iter_b->pri_prv; - s_iter->pri_nxt = s_iter_b; - if (s_iter_b == s_head) { - s_head->pri_prv = s_iter; - s_head = s_iter; - } else { - s_iter->pri_prv->pri_nxt = - s_iter; - s_iter->pri_nxt->pri_prv = - s_iter; - } - } else { - s_iter->pri_prv = s_tail; - s_iter->pri_nxt = NULL; - s_iter->pri_prv->pri_nxt = s_iter; - s_tail = s_iter; - } - } else { - s_head = s_iter; - s_tail = s_iter; - s_head->pri_prv = NULL; - s_head->pri_nxt = NULL; - } - } + /* sort the syscall list */ + _sys_sort(db->syscalls, &s_head, &s_tail, optimize); + if (db_secondary != NULL) + _sys_sort(db_secondary->syscalls, &s_head, &s_tail, optimize); + + if (optimize == 2) { + syscall_cnt = _get_syscall_cnt(state, s_tail); + rc = _gen_bpf_init_bintree(&bintree_hashes, &bintree_syscalls, + bintree_levels, syscall_cnt, + &empty_cnt); + if (rc < 0) + goto out; } if ((state->arch->token == SCMP_ARCH_X86_64 || @@ -1318,34 +1589,115 @@ else acc_reset = true; + if (*bintree_levels > 0) + /* The accumulator is reset when the first bintree "if" is + * generated. + */ + acc_reset = false; + + syscall_cnt = 0; + /* create the syscall filters and add them to block list group */ for (s_iter = s_tail; s_iter != NULL; s_iter = s_iter->pri_prv) { - if (!s_iter->valid) + if (_skip_syscall(state, s_iter)) continue; + if (*bintree_levels > 0 && + ((syscall_cnt + empty_cnt) % SYSCALLS_PER_NODE) == 0) + /* This is the last syscall in the node. go to the + * default hash */ + nxt_hsh = state->def_hsh; + else + nxt_hsh = state->b_head == NULL ? + state->def_hsh : state->b_head->hash; + /* build the syscall filter */ - b_new = _gen_bpf_syscall(state, s_iter, - (b_head == NULL ? - state->def_hsh : b_head->hash), - (s_iter == s_head ? - acc_reset : false)); - if (b_new == NULL) - goto arch_failure; + state->b_new = _gen_bpf_syscall(state, s_iter, nxt_hsh, + (s_iter == s_head ? + acc_reset : false)); + if (state->b_new == NULL) + goto out; /* add the filter to the list head */ - b_new->prev = NULL; - b_new->next = b_head; - if (b_tail != NULL) { - b_head->prev = b_new; - b_head = b_new; + state->b_new->prev = NULL; + state->b_new->next = state->b_head; + if (state->b_tail != NULL) { + state->b_head->prev = state->b_new; + state->b_head = state->b_new; } else { - b_head = b_new; - b_tail = b_head; + state->b_head = state->b_new; + state->b_tail = state->b_head; } - if (b_tail->next != NULL) - b_tail = b_tail->next; + if (state->b_tail->next != NULL) + state->b_tail = state->b_tail->next; + (*blks_added)++; + syscall_cnt++; + + /* build the binary tree if and else logic */ + if (*bintree_levels > 0) { + rc = _gen_bpf_bintree(state, bintree_hashes, + bintree_syscalls, + *bintree_levels, + syscall_cnt + empty_cnt, + s_iter->num, blks_added); + if (rc < 0) + goto out; + } + } + +out: + if (bintree_hashes != NULL) + free(bintree_hashes); + if (bintree_syscalls != NULL) + free(bintree_syscalls); + + return rc; +} + +/** + * Generate the BPF instruction blocks for a given filter/architecture + * @param state the BPF state + * @param db the filter DB + * @param db_secondary the secondary DB + * + * Generate the BPF instruction block for the given filter DB(s)/architecture(s) + * and return a pointer to the block on succes, NULL on failure. The resulting + * block assumes that the architecture token has already been loaded into the + * BPF accumulator. + * + */ +static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, + const struct db_filter *db, + const struct db_filter *db_secondary, + uint32_t optimize) +{ + int rc; + unsigned int blk_cnt = 0, blks_added = 0, bintree_levels = 0; + struct bpf_instr instr; + struct bpf_blk *b_iter, *b_bintree; + + state->arch = db->arch; + + /* create the syscall filters and add them to block list group */ + rc = _gen_bpf_syscalls(state, db, db_secondary, &blks_added, optimize, + &bintree_levels); + if (rc < 0) + goto arch_failure; + blk_cnt += blks_added; + + if (bintree_levels > 0) { + _BPF_INSTR(instr, _BPF_OP(state->arch, BPF_LD + BPF_ABS), + _BPF_JMP_NO, _BPF_JMP_NO, + _BPF_SYSCALL(state->arch)); blk_cnt++; + + rc = _gen_bpf_insert(state, &instr, &b_bintree, + &state->b_head, NULL); + if (rc < 0) + goto arch_failure; + b_bintree->acc_start = _ACC_STATE_UNDEF; + b_bintree->acc_end = _ACC_STATE_OFFSET(_BPF_OFFSET_SYSCALL); } /* additional ABI filtering */ @@ -1353,10 +1705,10 @@ state->arch->token == SCMP_ARCH_X32) && (db_secondary == NULL)) { _BPF_INSTR(instr, _BPF_OP(state->arch, BPF_LD + BPF_ABS), _BPF_JMP_NO, _BPF_JMP_NO, _BPF_SYSCALL(state->arch)); - b_new = _blk_append(state, NULL, &instr); - if (b_new == NULL) + state->b_new = _blk_append(state, NULL, &instr); + if (state->b_new == NULL) goto arch_failure; - b_new->acc_end = _ACC_STATE_OFFSET(_BPF_OFFSET_SYSCALL); + state->b_new->acc_end = _ACC_STATE_OFFSET(_BPF_OFFSET_SYSCALL); if (state->arch->token == SCMP_ARCH_X86_64) { /* filter out x32 */ _BPF_INSTR(instr, @@ -1364,12 +1716,12 @@ _BPF_JMP_NO, _BPF_JMP_NO, _BPF_K(state->arch, X32_SYSCALL_BIT)); - if (b_head != NULL) - instr.jf = _BPF_JMP_HSH(b_head->hash); + if (state->b_head != NULL) + instr.jf = _BPF_JMP_HSH(state->b_head->hash); else instr.jf = _BPF_JMP_HSH(state->def_hsh); - b_new = _blk_append(state, b_new, &instr); - if (b_new == NULL) + state->b_new = _blk_append(state, state->b_new, &instr); + if (state->b_new == NULL) goto arch_failure; /* NOTE: starting with Linux v4.8 the seccomp filters * are processed both when the syscall is @@ -1383,8 +1735,8 @@ _BPF_JMP_NO, _BPF_JMP_HSH(state->bad_arch_hsh), _BPF_K(state->arch, -1)); - if (b_head != NULL) - instr.jt = _BPF_JMP_HSH(b_head->hash); + if (state->b_head != NULL) + instr.jt = _BPF_JMP_HSH(state->b_head->hash); else instr.jt = _BPF_JMP_HSH(state->def_hsh); blk_cnt++; @@ -1395,22 +1747,17 @@ _BPF_JMP_NO, _BPF_JMP_HSH(state->bad_arch_hsh), _BPF_K(state->arch, X32_SYSCALL_BIT)); - if (b_head != NULL) - instr.jt = _BPF_JMP_HSH(b_head->hash); + if (state->b_head != NULL) + instr.jt = _BPF_JMP_HSH(state->b_head->hash); else instr.jt = _BPF_JMP_HSH(state->def_hsh); blk_cnt++; } else /* we should never get here */ goto arch_failure; - b_new = _blk_append(state, b_new, &instr); - if (b_new == NULL) - goto arch_failure; - b_new->next = b_head; - if (b_head != NULL) - b_head->prev = b_new; - b_head = b_new; - rc = _hsh_add(state, &b_head, 1); + + rc = _gen_bpf_insert(state, &instr, &state->b_new, + &state->b_head, state->b_new); if (rc < 0) goto arch_failure; } @@ -1419,34 +1766,29 @@ _BPF_INSTR(instr, _BPF_OP(state->arch, BPF_JMP + BPF_JEQ), _BPF_JMP_NO, _BPF_JMP_NXT(blk_cnt++), _BPF_K(state->arch, state->arch->token_bpf)); - if (b_head != NULL) - instr.jt = _BPF_JMP_HSH(b_head->hash); + if (state->b_head != NULL) + instr.jt = _BPF_JMP_HSH(state->b_head->hash); else instr.jt = _BPF_JMP_HSH(state->def_hsh); - b_new = _blk_append(state, NULL, &instr); - if (b_new == NULL) - goto arch_failure; - b_new->next = b_head; - if (b_head != NULL) - b_head->prev = b_new; - b_head = b_new; - rc = _hsh_add(state, &b_head, 1); + + rc = _gen_bpf_insert(state, &instr, &state->b_new, &state->b_head, + NULL); if (rc < 0) goto arch_failure; state->arch = NULL; - return b_head; + return state->b_head; arch_failure: /* NOTE: we do the cleanup here and not just return an error as all of * the instruction blocks may not be added to the hash table when we * hit an error */ state->arch = NULL; - b_iter = b_head; + b_iter = state->b_head; while (b_iter != NULL) { - b_new = b_iter->next; + state->b_new = b_iter->next; _blk_free(state, b_iter); - b_iter = b_new; + b_iter = state->b_new; } return NULL; } @@ -1653,9 +1995,6 @@ struct db_filter *db_secondary = NULL; struct arch_def pseudo_arch; - if (col->filter_cnt == 0) - return -EINVAL; - /* create a fake architecture definition for use in the early stages */ memset(&pseudo_arch, 0, sizeof(pseudo_arch)); pseudo_arch.endian = col->endian; @@ -1714,7 +2053,8 @@ db_secondary = NULL; /* create the filter for the architecture(s) */ - b_new = _gen_bpf_arch(state, col->filters[iter], db_secondary); + b_new = _gen_bpf_arch(state, col->filters[iter], db_secondary, + col->attr.optimize); if (b_new == NULL) return -ENOMEM; b_new->prev = b_tail; @@ -1850,6 +2190,7 @@ break; default: /* fatal error */ + rc = -EFAULT; goto build_bpf_free_blks; } switch (i_iter->jf.type) { @@ -1867,6 +2208,7 @@ break; default: /* fatal error */ + rc = -EFAULT; goto build_bpf_free_blks; } } @@ -1888,8 +2230,10 @@ jmp_len += b_jmp->blk_cnt; b_jmp = b_jmp->next; } - if (b_jmp == NULL || jmp_len > _BPF_JMP_MAX) + if (b_jmp == NULL || jmp_len > _BPF_JMP_MAX) { + rc = -EFAULT; goto build_bpf_free_blks; + } i_iter->jt = _BPF_JMP_IMM(jmp_len); } if (i_iter->jf.type == TGT_PTR_HSH) { @@ -1900,8 +2244,10 @@ jmp_len += b_jmp->blk_cnt; b_jmp = b_jmp->next; } - if (b_jmp == NULL || jmp_len > _BPF_JMP_MAX) + if (b_jmp == NULL || jmp_len > _BPF_JMP_MAX) { + rc = -EFAULT; goto build_bpf_free_blks; + } i_iter->jf = _BPF_JMP_IMM(jmp_len); } if (i_iter->k.type == TGT_PTR_HSH) { @@ -1915,14 +2261,17 @@ jmp_len += b_jmp->blk_cnt; b_jmp = b_jmp->prev; } - if (b_jmp == NULL) + if (b_jmp == NULL) { + rc = -EFAULT; goto build_bpf_free_blks; + } i_iter->k = _BPF_K(state->arch, jmp_len); } } /* build the bpf program */ - if (_bpf_append_blk(state->bpf, b_iter) < 0) + rc = _bpf_append_blk(state->bpf, b_iter); + if (rc < 0) goto build_bpf_free_blks; /* we're done with the block, free it */ @@ -1940,37 +2289,43 @@ __blk_free(state, b_iter); b_iter = b_jmp; } - return -EFAULT; + return rc; } /** * Generate a BPF representation of the filter DB * @param col the seccomp filter collection + * @param prgm_ptr the bpf program pointer * * This function generates a BPF representation of the given filter collection. - * Returns a pointer to a valid bpf_program on success, NULL on failure. + * Returns zero on success, negative values on failure. * */ -struct bpf_program *gen_bpf_generate(const struct db_filter_col *col) +int gen_bpf_generate(const struct db_filter_col *col, + struct bpf_program **prgm_ptr) { int rc; struct bpf_state state; struct bpf_program *prgm; + if (col->filter_cnt == 0) + return -EINVAL; + memset(&state, 0, sizeof(state)); state.attr = &col->attr; - prgm = zmalloc(sizeof(*(prgm))); - if (prgm == NULL) - return NULL; - state.bpf = prgm; + state.bpf = zmalloc(sizeof(*(prgm))); + if (state.bpf == NULL) + return -ENOMEM; rc = _gen_bpf_build_bpf(&state, col); - if (rc == 0) + if (rc == 0) { + *prgm_ptr = state.bpf; state.bpf = NULL; + } _state_release(&state); - return prgm; + return rc; } /** diff -Nru libseccomp-2.4.3/src/gen_bpf.h libseccomp-2.5.1/src/gen_bpf.h --- libseccomp-2.4.3/src/gen_bpf.h 2020-03-03 02:13:34.191033129 +1030 +++ libseccomp-2.5.1/src/gen_bpf.h 2020-11-17 08:34:38.781027373 +1030 @@ -36,7 +36,8 @@ #define BPF_PGM_SIZE(x) \ ((x)->blk_cnt * sizeof(*((x)->blks))) -struct bpf_program *gen_bpf_generate(const struct db_filter_col *col); +int gen_bpf_generate(const struct db_filter_col *col, + struct bpf_program **prgm_ptr); void gen_bpf_release(struct bpf_program *program); #endif diff -Nru libseccomp-2.4.3/src/gen_pfc.c libseccomp-2.5.1/src/gen_pfc.c --- libseccomp-2.4.3/src/gen_pfc.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/gen_pfc.c 2020-11-17 08:34:38.782027382 +1030 @@ -87,6 +87,8 @@ return "s390x"; case SCMP_ARCH_S390: return "s390"; + case SCMP_ARCH_RISCV64: + return "riscv64"; default: return "UNKNOWN"; } @@ -241,68 +243,163 @@ * */ static void _gen_pfc_syscall(const struct arch_def *arch, - const struct db_sys_list *sys, FILE *fds) + const struct db_sys_list *sys, FILE *fds, + int lvl) { unsigned int sys_num = sys->num; const char *sys_name = arch_syscall_resolve_num(arch, sys_num); - _indent(fds, 1); + _indent(fds, lvl); fprintf(fds, "# filter for syscall \"%s\" (%u) [priority: %d]\n", (sys_name ? sys_name : "UNKNOWN"), sys_num, sys->priority); - _indent(fds, 1); + _indent(fds, lvl); fprintf(fds, "if ($syscall == %u)\n", sys_num); if (sys->chains == NULL) { - _indent(fds, 2); + _indent(fds, lvl + 1); _pfc_action(fds, sys->action); } else - _gen_pfc_chain(arch, sys->chains, 2, fds); + _gen_pfc_chain(arch, sys->chains, lvl + 1, fds); } -/** - * Generate pseudo filter code for an architecture - * @param col the seccomp filter collection - * @param db the single seccomp filter - * @param fds the file stream to send the output - * - * This function generates a pseudo filter code representation of the given - * filter DB and writes it to the given output stream. Returns zero on - * success, negative values on failure. - * - */ -static int _gen_pfc_arch(const struct db_filter_col *col, - const struct db_filter *db, FILE *fds) +#define SYSCALLS_PER_NODE (4) +static int _get_bintree_levels(unsigned int syscall_cnt, + uint32_t optimize) +{ + unsigned int i = 0, max_level; + + if (optimize != 2) + /* Only use a binary tree if requested */ + return 0; + + do { + max_level = SYSCALLS_PER_NODE << i; + i++; + } while(max_level < syscall_cnt); + + return i; +} + +static int _get_bintree_syscall_num(const struct pfc_sys_list *cur, + int lookahead_cnt, + int *const num) +{ + while (lookahead_cnt > 0 && cur != NULL) { + cur = cur->next; + lookahead_cnt--; + } + + if (cur == NULL) + return -EFAULT; + + *num = cur->sys->num; + return 0; +} + +static int _sys_num_sort(struct db_sys_list *syscalls, + struct pfc_sys_list **p_head) { - int rc = 0; + struct pfc_sys_list *p_iter = NULL, *p_new, *p_prev; struct db_sys_list *s_iter; - struct pfc_sys_list *p_iter = NULL, *p_new, *p_head = NULL, *p_prev; - /* sort the syscall list */ - db_list_foreach(s_iter, db->syscalls) { + db_list_foreach(s_iter, syscalls) { p_new = zmalloc(sizeof(*p_new)); if (p_new == NULL) { - rc = -ENOMEM; - goto arch_return; + return -ENOMEM; } p_new->sys = s_iter; p_prev = NULL; - p_iter = p_head; + p_iter = *p_head; + while (p_iter != NULL && + s_iter->num < p_iter->sys->num) { + p_prev = p_iter; + p_iter = p_iter->next; + } + if (*p_head == NULL) + *p_head = p_new; + else if (p_prev == NULL) { + p_new->next = *p_head; + *p_head = p_new; + } else { + p_new->next = p_iter; + p_prev->next = p_new; + } + } + + return 0; +} + +static int _sys_priority_sort(struct db_sys_list *syscalls, + struct pfc_sys_list **p_head) +{ + struct pfc_sys_list *p_iter = NULL, *p_new, *p_prev; + struct db_sys_list *s_iter; + + db_list_foreach(s_iter, syscalls) { + p_new = zmalloc(sizeof(*p_new)); + if (p_new == NULL) { + return -ENOMEM; + } + p_new->sys = s_iter; + + p_prev = NULL; + p_iter = *p_head; while (p_iter != NULL && s_iter->priority < p_iter->sys->priority) { p_prev = p_iter; p_iter = p_iter->next; } - if (p_head == NULL) - p_head = p_new; + if (*p_head == NULL) + *p_head = p_new; else if (p_prev == NULL) { - p_new->next = p_head; - p_head = p_new; + p_new->next = *p_head; + *p_head = p_new; } else { p_new->next = p_iter; p_prev->next = p_new; } } + return 0; +} + +static int _sys_sort(struct db_sys_list *syscalls, + struct pfc_sys_list **p_head, + uint32_t optimize) +{ + if (optimize != 2) + return _sys_priority_sort(syscalls, p_head); + else + /* sort by number for the binary tree */ + return _sys_num_sort(syscalls, p_head); +} + +/** + * Generate pseudo filter code for an architecture + * @param col the seccomp filter collection + * @param db the single seccomp filter + * @param fds the file stream to send the output + * + * This function generates a pseudo filter code representation of the given + * filter DB and writes it to the given output stream. Returns zero on + * success, negative values on failure. + * + */ +static int _gen_pfc_arch(const struct db_filter_col *col, + const struct db_filter *db, FILE *fds, + uint32_t optimize) +{ + int rc = 0, i = 0, lookahead_num; + unsigned int syscall_cnt = 0, bintree_levels, level, indent = 1; + struct pfc_sys_list *p_iter = NULL, *p_head = NULL; + + /* sort the syscall list */ + rc = _sys_sort(db->syscalls, &p_head, optimize); + if (rc < 0) + goto arch_return; + + bintree_levels = _get_bintree_levels(db->syscall_cnt, optimize); + fprintf(fds, "# filter for arch %s (%u)\n", _pfc_arch(db->arch), db->arch->token_bpf); fprintf(fds, "if ($arch == %u)\n", db->arch->token_bpf); @@ -312,8 +409,40 @@ p_iter = p_iter->next; continue; } - _gen_pfc_syscall(db->arch, p_iter->sys, fds); + + for (i = bintree_levels - 1; i > 0; i--) { + level = SYSCALLS_PER_NODE << i; + + if (syscall_cnt == 0 || (syscall_cnt % level) == 0) { + rc = _get_bintree_syscall_num(p_iter, level / 2, + &lookahead_num); + if (rc < 0) + /* We have reached the end of the bintree. + * There aren't enough syscalls to construct + * any more if-elses. + */ + continue; + _indent(fds, indent); + fprintf(fds, "if ($syscall > %u)\n", lookahead_num); + indent++; + } else if ((syscall_cnt % (level / 2)) == 0) { + lookahead_num = p_iter->sys->num; + _indent(fds, indent - 1); + fprintf(fds, "else # ($syscall <= %u)\n", + p_iter->sys->num); + } + + } + + _gen_pfc_syscall(db->arch, p_iter->sys, fds, indent); + syscall_cnt++; p_iter = p_iter->next; + + /* undo the indentations as the else statements complete */ + for (i = 0; i < bintree_levels; i++) { + if (syscall_cnt % ((SYSCALLS_PER_NODE * 2) << i) == 0) + indent--; + } } _indent(fds, 1); fprintf(fds, "# default action\n"); @@ -328,7 +457,6 @@ } return rc; } - /** * Generate a pseudo filter code string representation * @param col the seccomp filter collection @@ -336,23 +464,22 @@ * * This function generates a pseudo filter code representation of the given * filter collection and writes it to the given fd. Returns zero on success, - * negative values on failure. + * negative errno values on failure. * */ int gen_pfc_generate(const struct db_filter_col *col, int fd) { - int rc = 0; int newfd; unsigned int iter; FILE *fds; newfd = dup(fd); if (newfd < 0) - return errno; + return -errno; fds = fdopen(newfd, "a"); if (fds == NULL) { close(newfd); - return errno; + return -errno; } /* generate the pfc */ @@ -361,7 +488,8 @@ fprintf(fds, "#\n"); for (iter = 0; iter < col->filter_cnt; iter++) - _gen_pfc_arch(col, col->filters[iter], fds); + _gen_pfc_arch(col, col->filters[iter], fds, + col->attr.optimize); fprintf(fds, "# invalid architecture action\n"); _pfc_action(fds, col->attr.act_badarch); @@ -372,5 +500,5 @@ fflush(fds); fclose(fds); - return rc; + return 0; } diff -Nru libseccomp-2.4.3/src/python/Makefile.in libseccomp-2.5.1/src/python/Makefile.in --- libseccomp-2.4.3/src/python/Makefile.in 2020-03-03 04:15:53.121765881 +1030 +++ libseccomp-2.5.1/src/python/Makefile.in 2020-11-17 10:17:44.900798293 +1030 @@ -176,6 +176,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -242,13 +243,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ diff -Nru libseccomp-2.4.3/src/python/libseccomp.pxd libseccomp-2.5.1/src/python/libseccomp.pxd --- libseccomp-2.4.3/src/python/libseccomp.pxd 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/python/libseccomp.pxd 2020-11-17 08:34:38.782027382 +1030 @@ -19,7 +19,8 @@ # along with this library; if not, see . # -from libc.stdint cimport uint8_t, uint32_t, uint64_t +from libc.stdint cimport int8_t, int16_t, int32_t, int64_t +from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t cdef extern from "seccomp.h": @@ -50,6 +51,7 @@ SCMP_ARCH_PPC64LE SCMP_ARCH_S390 SCMP_ARCH_S390X + SCMP_ARCH_RISCV64 cdef enum scmp_filter_attr: SCMP_FLTATR_ACT_DEFAULT @@ -58,6 +60,9 @@ SCMP_FLTATR_CTL_TSYNC SCMP_FLTATR_API_TSKIP SCMP_FLTATR_CTL_LOG + SCMP_FLTATR_CTL_SSB + SCMP_FLTATR_CTL_OPTIMIZE + SCMP_FLTATR_API_SYSRAWRC cdef enum scmp_compare: SCMP_CMP_NE @@ -74,6 +79,7 @@ SCMP_ACT_TRAP SCMP_ACT_LOG SCMP_ACT_ALLOW + SCMP_ACT_NOTIFY unsigned int SCMP_ACT_ERRNO(int errno) unsigned int SCMP_ACT_TRACE(int value) @@ -85,6 +91,29 @@ scmp_datum_t datum_a scmp_datum_t datum_b + cdef struct seccomp_data: + int nr + uint32_t arch + uint64_t instruction_pointer + uint64_t args[6] + + cdef struct seccomp_notif_sizes: + uint16_t seccomp_notif + uint16_t seccomp_notif_resp + uint16_t seccomp_data + + cdef struct seccomp_notif: + uint64_t id + uint32_t pid + uint32_t flags + seccomp_data data + + cdef struct seccomp_notif_resp: + uint64_t id + int64_t val + int32_t error + uint32_t flags + scmp_version *seccomp_version() unsigned int seccomp_api_get() @@ -129,6 +158,13 @@ unsigned int arg_cnt, scmp_arg_cmp *arg_array) + int seccomp_notify_alloc(seccomp_notif **req, seccomp_notif_resp **resp) + void seccomp_notify_free(seccomp_notif *req, seccomp_notif_resp *resp) + int seccomp_notify_receive(int fd, seccomp_notif *req) + int seccomp_notify_respond(int fd, seccomp_notif_resp *resp) + int seccomp_notify_id_valid(int fd, uint64_t id) + int seccomp_notify_fd(scmp_filter_ctx ctx) + int seccomp_export_pfc(scmp_filter_ctx ctx, int fd) int seccomp_export_bpf(scmp_filter_ctx ctx, int fd) diff -Nru libseccomp-2.4.3/src/python/seccomp.pyx libseccomp-2.5.1/src/python/seccomp.pyx --- libseccomp-2.4.3/src/python/seccomp.pyx 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/python/seccomp.pyx 2020-11-17 08:34:38.782027382 +1030 @@ -36,6 +36,7 @@ LOG - allow the syscall to be executed after the action has been logged ALLOW - allow the syscall to execute TRAP - a SIGSYS signal will be thrown + NOTIFY - a notification event will be sent via the notification API ERRNO(x) - syscall will return (x) TRACE(x) - if the process is being traced, (x) will be returned to the tracing process via PTRACE_EVENT_SECCOMP and the @@ -60,13 +61,18 @@ # create a filter object with a default KILL action f = SyscallFilter(defaction=KILL) + # add some basic syscalls which python typically wants + f.add_rule(ALLOW, "rt_sigaction") + f.add_rule(ALLOW, "rt_sigreturn") + f.add_rule(ALLOW, "exit_group") + f.add_rule(ALLOW, "brk") + # add syscall filter rules to allow certain syscalls f.add_rule(ALLOW, "open") f.add_rule(ALLOW, "close") - f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin)) - f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout)) - f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr)) - f.add_rule(ALLOW, "rt_sigreturn") + f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) + f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) + f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) # load the filter into the kernel f.load() @@ -75,7 +81,9 @@ __date__ = "3 February 2017" from cpython.version cimport PY_MAJOR_VERSION -from libc.stdint cimport uint32_t +from libc.stdint cimport int8_t, int16_t, int32_t, int64_t +from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t +from libc.stdlib cimport free import errno cimport libseccomp @@ -102,6 +110,7 @@ TRAP = libseccomp.SCMP_ACT_TRAP LOG = libseccomp.SCMP_ACT_LOG ALLOW = libseccomp.SCMP_ACT_ALLOW +NOTIFY = libseccomp.SCMP_ACT_NOTIFY def ERRNO(int errno): """The action ERRNO(x) means that the syscall will return (x). To conform to Linux syscall calling conventions, the syscall return @@ -205,6 +214,7 @@ PARISC64 - 64-bit PA-RISC PPC64 - 64-bit PowerPC PPC - 32-bit PowerPC + RISCV64 - 64-bit RISC-V """ cdef int _token @@ -228,6 +238,7 @@ PPC64LE = libseccomp.SCMP_ARCH_PPC64LE S390 = libseccomp.SCMP_ARCH_S390 S390X = libseccomp.SCMP_ARCH_S390X + RISCV64 = libseccomp.SCMP_ARCH_RISCV64 def __cinit__(self, arch=libseccomp.SCMP_ARCH_NATIVE): """ Initialize the architecture object. @@ -303,6 +314,15 @@ ACT_BADARCH - the filter's bad architecture action CTL_NNP - the filter's "no new privileges" flag CTL_NNP - the filter's thread sync flag + CTL_TSYNC - sync threads on filter load + CTL_TSKIP - allow rules with a -1 syscall number + CTL_LOG - log not-allowed actions + CTL_SSB - disable SSB mitigations + CTL_OPTIMIZE - the filter's optimization level: + 0: currently unused + 1: rules weighted by priority and complexity (DEFAULT) + 2: binary tree sorted by syscall number + API_SYSRAWRC - return the raw syscall codes """ ACT_DEFAULT = libseccomp.SCMP_FLTATR_ACT_DEFAULT ACT_BADARCH = libseccomp.SCMP_FLTATR_ACT_BADARCH @@ -310,6 +330,9 @@ CTL_TSYNC = libseccomp.SCMP_FLTATR_CTL_TSYNC API_TSKIP = libseccomp.SCMP_FLTATR_API_TSKIP CTL_LOG = libseccomp.SCMP_FLTATR_CTL_LOG + CTL_SSB = libseccomp.SCMP_FLTATR_CTL_SSB + CTL_OPTIMIZE = libseccomp.SCMP_FLTATR_CTL_OPTIMIZE + API_SYSRAWRC = libseccomp.SCMP_FLTATR_API_SYSRAWRC cdef class Arg: """ Python object representing a SyscallFilter syscall argument. @@ -344,6 +367,218 @@ """ return self._arg +cdef class Notification: + """ Python object representing a seccomp notification. + """ + cdef uint64_t _id + cdef uint32_t _pid + cdef uint32_t _flags + cdef int _syscall + cdef uint32_t _syscall_arch + cdef uint64_t _syscall_ip + cdef uint64_t _syscall_args[6] + + def __cinit__(self, id, pid, flags, syscall, arch, ip, args): + """ Initialize the notification. + + Arguments: + id - the notification ID + pid - the process ID + flags - the notification flags + syscall - the syscall number + ip - the instruction pointer + args - list of the six syscall arguments + + Description: + Create a seccomp Notification object. + """ + self._id = id + self._pid = pid + self._flags = flags + self._syscall = syscall + self._syscall_arch = arch + self._syscall_ip = ip + self._syscall_args[0] = args[0] + self._syscall_args[1] = args[1] + self._syscall_args[2] = args[2] + self._syscall_args[3] = args[3] + self._syscall_args[4] = args[4] + self._syscall_args[5] = args[5] + + @property + def id(self): + """ Get the seccomp notification ID. + + Description: + Get the seccomp notification ID. + """ + return self._id + + @property + def pid(self): + """ Get the seccomp notification process ID. + + Description: + Get the seccomp notification process ID. + """ + return self._pid + + @property + def flags(self): + """ Get the seccomp notification flags. + + Description: + Get the seccomp notification flags. + """ + return self._flags + + @property + def syscall(self): + """ Get the seccomp notification syscall. + + Description: + Get the seccomp notification syscall. + """ + return self._syscall + + @property + def syscall_arch(self): + """ Get the seccomp notification syscall architecture. + + Description: + Get the seccomp notification syscall architecture. + """ + return self._syscall_arch + + @property + def syscall_ip(self): + """ Get the seccomp notification syscall instruction pointer. + + Description: + Get the seccomp notification syscall instruction pointer. + """ + return self._syscall_ip + + @property + def syscall_args(self): + """ Get the seccomp notification syscall arguments. + + Description: + Get the seccomp notification syscall arguments in a six element list. + """ + return [self._syscall_args[0], self._syscall_args[1], + self._syscall_args[2], self._syscall_args[3], + self._syscall_args[4], self._syscall_args[5]] + +cdef class NotificationResponse: + """ Python object representing a seccomp notification response. + """ + cdef uint64_t _id + cdef int64_t _val + cdef int32_t _error + cdef uint32_t _flags + + def __cinit__(self, notify, val = 0, error = 0, flags = 0): + """ Initialize the notification response. + + Arguments: + notify - a Notification object + val - the notification response value + error - the notification response error + flags - the notification response flags + + Description: + Create a seccomp NotificationResponse object. + """ + self._id = notify.id + self._val = val + self._error = error + self._flags = flags + + @property + def id(self): + """ Get the seccomp notification response ID. + + Description: + Get the seccomp notification response ID. + """ + return self._id + + @id.setter + def id(self, value): + """ Set the seccomp notification response ID. + + Arguments: + id - the notification response ID + + Description: + Set the seccomp notification response ID. + """ + self._id = value + + @property + def val(self): + """ Get the seccomp notification response value. + + Description: + Get the seccomp notification response value. + """ + return self._val + + @val.setter + def val(self, value): + """ Set the seccomp notification response value. + + Arguments: + val - the notification response value + + Description: + Set the seccomp notification response value. + """ + self._val = value + + @property + def error(self): + """ Get the seccomp notification response error. + + Description: + Get the seccomp notification response error. + """ + return self._error + + @error.setter + def error(self, value): + """ Set the seccomp notification response error. + + Arguments: + error - the notification response error + + Description: + Set the seccomp notification response error. + """ + self._error = value + + @property + def flags(self): + """ Get the seccomp notification response flags. + + Description: + Get the seccomp notification response flags. + """ + return self._flags + + @flags.setter + def flags(self, value): + """ Set the seccomp notification response flags. + + Arguments: + flags - the notification response flags + + Description: + Set the seccomp notification response flags. + """ + self._flags = value + cdef class SyscallFilter: """ Python object representing a seccomp syscall filter. """ cdef int _defaction @@ -712,6 +947,60 @@ if rc != 0: raise RuntimeError(str.format("Library error (errno = {0})", rc)) + def receive_notify(self): + """ Receive seccomp notifications. + + Description: + Receive a seccomp notification from the system, requires the use of + the NOTIFY action. + """ + cdef libseccomp.seccomp_notif *req + + fd = libseccomp.seccomp_notify_fd(self._ctx) + if fd < 0: + raise RuntimeError("Notifications not enabled/active") + rc = libseccomp.seccomp_notify_alloc(&req, NULL) + if rc < 0: + raise RuntimeError(str.format("Library error (errno = {0})", rc)) + rc = libseccomp.seccomp_notify_receive(fd, req) + if rc < 0: + raise RuntimeError(str.format("Library error (errno = {0})", rc)) + rc = libseccomp.seccomp_notify_id_valid(fd, req.id) + if rc < 0: + raise RuntimeError(str.format("Library error (errno = {0})", rc)) + notify = Notification(req.id, req.pid, req.flags, req.data.nr, + req.data.arch, req.data.instruction_pointer, + [req.data.args[0], req.data.args[1], + req.data.args[2], req.data.args[3], + req.data.args[4], req.data.args[5]]) + free(req) + return notify + + def respond_notify(self, response): + """ Send a seccomp notification response. + + Arguments: + response - the response to send to the system + + Description: + Respond to a seccomp notification. + """ + cdef libseccomp.seccomp_notif_resp *resp + + fd = libseccomp.seccomp_notify_fd(self._ctx) + if fd < 0: + raise RuntimeError("Notifications not enabled/active") + rc = libseccomp.seccomp_notify_alloc(NULL, &resp) + if rc < 0: + raise RuntimeError(str.format("Library error (errno = {0})", rc)) + resp.id = response.id + resp.val = response.val + resp.error = response.error + resp.flags = response.flags + rc = libseccomp.seccomp_notify_respond(fd, resp) + if rc < 0: + raise RuntimeError(str.format("Library error (errno = {0})", rc)) + def export_pfc(self, file): """ Export the filter in PFC format. @@ -733,7 +1022,8 @@ Arguments: file - the output file - Output the filter in Berkley Packet Filter (BPF) to the given + Description: + Output the filter in Berkeley Packet Filter (BPF) to the given file. The output is identical to what is loaded into the Linux Kernel. """ diff -Nru libseccomp-2.4.3/src/syscalls.c libseccomp-2.5.1/src/syscalls.c --- libseccomp-2.4.3/src/syscalls.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.c 2020-11-17 08:34:38.782027382 +1030 @@ -0,0 +1,56 @@ +/** + * Enhanced Seccomp x86_64 Syscall Table + * + * Copyright (c) 2012, 2020 Red Hat + * Author: Paul Moore + * gperf support: Giuseppe Scrivano + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ +#include +#include + +#include "arch.h" +#include "syscalls.h" + +#define ARCH_DEF(NAME) \ + int NAME##_syscall_resolve_name(const char *name) \ + { \ + return syscall_resolve_name(name, OFFSET_ARCH(NAME)); \ + } \ + const char *NAME##_syscall_resolve_num(int num) \ + { \ + return syscall_resolve_num(num, OFFSET_ARCH(NAME)); \ + } \ + const struct arch_syscall_def *NAME##_syscall_iterate(unsigned int spot) \ + { \ + return syscall_iterate(spot, OFFSET_ARCH(NAME)); \ + } + +ARCH_DEF(x86_64) +ARCH_DEF(arm) +ARCH_DEF(aarch64) +ARCH_DEF(mips64n32) +ARCH_DEF(mips64) +ARCH_DEF(mips) +ARCH_DEF(parisc) +ARCH_DEF(parisc64) +ARCH_DEF(ppc64) +ARCH_DEF(ppc) +ARCH_DEF(s390) +ARCH_DEF(s390x) +ARCH_DEF(x32) +ARCH_DEF(x86) +ARCH_DEF(riscv64) diff -Nru libseccomp-2.4.3/src/syscalls.csv libseccomp-2.5.1/src/syscalls.csv --- libseccomp-2.4.3/src/syscalls.csv 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.csv 2020-11-17 08:34:38.782027382 +1030 @@ -0,0 +1,470 @@ +#syscall (v5.8.0-rc5 2020-07-14),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv64,s390,s390x +accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,PNR,PNR +accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364 +access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,33,33 +acct,51,163,163,51,89,51,158,158,51,51,51,51,89,51,51 +add_key,286,248,248,309,217,280,239,243,264,264,269,269,217,278,278 +adjtimex,124,159,159,124,171,124,154,154,124,124,124,124,171,124,124 +afs_syscall,137,183,183,PNR,PNR,137,176,176,PNR,PNR,137,137,PNR,137,137 +alarm,27,37,37,PNR,PNR,27,37,37,27,27,27,27,PNR,27,27 +arch_prctl,384,158,158,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +arm_fadvise64_64,PNR,PNR,PNR,270,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +arm_sync_file_range,PNR,PNR,PNR,341,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +bdflush,134,PNR,PNR,134,PNR,134,PNR,PNR,134,134,134,134,PNR,134,134 +bind,361,49,49,282,200,169,48,48,22,22,327,327,200,361,361 +bpf,357,321,321,386,280,355,315,319,341,341,361,361,280,351,351 +break,17,PNR,PNR,PNR,PNR,17,PNR,PNR,PNR,PNR,17,17,PNR,PNR,PNR +breakpoint,PNR,PNR,PNR,983041,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +brk,45,12,12,45,214,45,12,12,45,45,45,45,214,45,45 +cachectl,PNR,PNR,PNR,PNR,PNR,148,198,198,PNR,PNR,PNR,PNR,PNR,PNR,PNR +cacheflush,PNR,PNR,PNR,983042,PNR,147,197,197,PNR,PNR,PNR,PNR,PNR,PNR,PNR +capget,184,125,125,184,90,204,123,123,106,106,183,183,90,184,184 +capset,185,126,126,185,91,205,124,124,107,107,184,184,91,185,185 +chdir,12,80,80,12,49,12,78,78,12,12,12,12,49,12,12 +chmod,15,90,90,15,PNR,15,88,88,15,15,15,15,PNR,15,15 +chown,182,92,92,182,PNR,202,90,90,180,180,181,181,PNR,182,212 +chown32,212,PNR,PNR,212,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,212,PNR +chroot,61,161,161,61,51,61,156,156,61,61,61,61,51,61,61 +clock_adjtime,343,305,305,372,266,341,300,305,324,324,347,347,266,337,337 +clock_adjtime64,405,PNR,PNR,405,PNR,405,PNR,405,405,PNR,405,PNR,PNR,405,PNR +clock_getres,266,229,229,264,114,264,223,227,257,257,247,247,114,261,261 +clock_getres_time64,406,PNR,PNR,406,PNR,406,PNR,406,406,PNR,406,PNR,PNR,406,PNR +clock_gettime,265,228,228,263,113,263,222,226,256,256,246,246,113,260,260 +clock_gettime64,403,PNR,PNR,403,PNR,403,PNR,403,403,PNR,403,PNR,PNR,403,PNR +clock_nanosleep,267,230,230,265,115,265,224,228,258,258,248,248,115,262,262 +clock_nanosleep_time64,407,PNR,PNR,407,PNR,407,PNR,407,407,PNR,407,PNR,PNR,407,PNR +clock_settime,264,227,227,262,112,262,221,225,255,255,245,245,112,259,259 +clock_settime64,404,PNR,PNR,404,PNR,404,PNR,404,404,PNR,404,PNR,PNR,404,PNR +clone,120,56,56,120,220,120,55,55,120,120,120,120,220,120,120 +clone3,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435 +close,6,3,3,6,57,6,3,3,6,6,6,6,57,6,6 +connect,362,42,42,283,203,170,41,41,31,31,328,328,203,362,362 +copy_file_range,377,326,326,391,285,360,320,324,346,346,379,379,285,375,375 +creat,8,85,85,8,PNR,8,83,83,8,8,8,8,PNR,8,8 +create_module,127,174,PNR,PNR,PNR,127,167,167,PNR,PNR,127,127,PNR,127,127 +delete_module,129,176,176,129,106,129,169,169,129,129,129,129,106,129,129 +dup,41,32,32,41,23,41,31,31,41,41,41,41,23,41,41 +dup2,63,33,33,63,PNR,63,32,32,63,63,63,63,PNR,63,63 +dup3,330,292,292,358,24,327,286,290,312,312,316,316,24,326,326 +epoll_create,254,213,213,250,PNR,248,207,207,224,224,236,236,PNR,249,249 +epoll_create1,329,291,291,357,20,326,285,289,311,311,315,315,20,327,327 +epoll_ctl,255,233,233,251,21,249,208,208,225,225,237,237,21,250,250 +epoll_ctl_old,PNR,214,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +epoll_pwait,319,281,281,346,22,313,272,276,297,297,303,303,22,312,312 +epoll_wait,256,232,232,252,PNR,250,209,209,226,226,238,238,PNR,251,251 +epoll_wait_old,PNR,215,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +eventfd,323,284,284,351,PNR,319,278,282,304,304,307,307,PNR,318,318 +eventfd2,328,290,290,356,19,325,284,288,310,310,314,314,19,323,323 +execve,11,59,520,11,221,11,57,57,11,11,11,11,221,11,11 +execveat,358,322,545,387,281,356,316,320,342,342,362,362,281,354,354 +exit,1,60,60,1,93,1,58,58,1,1,1,1,93,1,1 +exit_group,252,231,231,248,94,246,205,205,222,222,234,234,94,248,248 +faccessat,307,269,269,334,48,300,259,263,287,287,298,298,48,300,300 +faccessat2,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439 +fadvise64,250,221,221,PNR,223,254,215,216,PNR,PNR,233,233,223,253,253 +fadvise64_64,272,PNR,PNR,PNR,PNR,PNR,PNR,PNR,236,236,254,PNR,PNR,264,PNR +fallocate,324,285,285,352,47,320,279,283,305,305,309,309,47,314,314 +fanotify_init,338,300,300,367,262,336,295,300,322,322,323,323,262,332,332 +fanotify_mark,339,301,301,368,263,337,296,301,323,323,324,324,263,333,333 +fchdir,133,81,81,133,50,133,79,79,133,133,133,133,50,133,133 +fchmod,94,91,91,94,52,94,89,89,94,94,94,94,52,94,94 +fchmodat,306,268,268,333,53,299,258,262,286,286,297,297,53,299,299 +fchown,95,93,93,95,55,95,91,91,95,95,95,95,55,95,207 +fchown32,207,PNR,PNR,207,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,207,PNR +fchownat,298,260,260,325,54,291,250,254,278,278,289,289,54,291,291 +fcntl,55,72,72,55,25,55,70,70,55,55,55,55,25,55,55 +fcntl64,221,PNR,PNR,221,PNR,220,PNR,212,202,202,204,PNR,PNR,221,PNR +fdatasync,148,75,75,148,83,152,73,73,148,148,148,148,83,148,148 +fgetxattr,231,193,193,231,10,229,185,185,243,243,214,214,10,229,229 +finit_module,350,313,313,379,273,348,307,312,333,333,353,353,273,344,344 +flistxattr,234,196,196,234,13,232,188,188,246,246,217,217,13,232,232 +flock,143,73,73,143,32,143,71,71,143,143,143,143,32,143,143 +fork,2,57,57,2,PNR,2,56,56,2,2,2,2,PNR,2,2 +fremovexattr,237,199,199,237,16,235,191,191,249,249,220,220,16,235,235 +fsconfig,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431 +fsetxattr,228,190,190,228,7,226,182,182,240,240,211,211,7,226,226 +fsmount,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432 +fsopen,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430 +fspick,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433 +fstat,108,5,5,108,80,108,5,5,28,28,108,108,80,108,108 +fstat64,197,PNR,PNR,197,PNR,215,PNR,PNR,112,112,197,PNR,PNR,197,PNR +fstatat64,300,PNR,PNR,327,PNR,293,PNR,PNR,280,280,291,PNR,PNR,293,PNR +fstatfs,100,138,138,100,44,100,135,135,100,100,100,100,44,100,100 +fstatfs64,269,PNR,PNR,267,PNR,256,PNR,218,299,299,253,253,PNR,266,266 +fsync,118,74,74,118,82,118,72,72,118,118,118,118,82,118,118 +ftime,35,PNR,PNR,PNR,PNR,35,PNR,PNR,PNR,PNR,35,35,PNR,PNR,PNR +ftruncate,93,77,77,93,46,93,75,75,93,93,93,93,46,93,93 +ftruncate64,194,PNR,PNR,194,PNR,212,PNR,PNR,200,200,194,PNR,PNR,194,PNR +futex,240,202,202,240,98,238,194,194,210,210,221,221,98,238,238 +futex_time64,422,PNR,PNR,422,PNR,422,PNR,422,422,PNR,422,PNR,PNR,422,PNR +futimesat,299,261,261,326,PNR,292,251,255,279,279,290,290,PNR,292,292 +getcpu,318,309,309,345,168,312,271,275,296,296,302,302,168,311,311 +getcwd,183,79,79,183,17,203,77,77,110,110,182,182,17,183,183 +getdents,141,78,78,141,PNR,141,76,76,141,141,141,141,PNR,141,141 +getdents64,220,217,217,217,61,219,308,299,201,201,202,202,61,220,220 +getegid,50,108,108,50,177,50,106,106,50,50,50,50,177,50,202 +getegid32,202,PNR,PNR,202,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,202,PNR +geteuid,49,107,107,49,175,49,105,105,49,49,49,49,175,49,201 +geteuid32,201,PNR,PNR,201,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,201,PNR +getgid,47,104,104,47,176,47,102,102,47,47,47,47,176,47,200 +getgid32,200,PNR,PNR,200,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,200,PNR +getgroups,80,115,115,80,158,80,113,113,80,80,80,80,158,80,205 +getgroups32,205,PNR,PNR,205,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,205,PNR +getitimer,105,36,36,105,102,105,35,35,105,105,105,105,102,105,105 +get_kernel_syms,130,177,PNR,PNR,PNR,130,170,170,PNR,PNR,130,130,PNR,130,130 +get_mempolicy,275,239,239,320,236,269,228,232,261,261,260,260,236,269,269 +getpeername,368,52,52,287,205,171,51,51,53,53,332,332,205,368,368 +getpgid,132,121,121,132,155,132,119,119,132,132,132,132,155,132,132 +getpgrp,65,111,111,65,PNR,65,109,109,65,65,65,65,PNR,65,65 +getpid,20,39,39,20,172,20,38,38,20,20,20,20,172,20,20 +getpmsg,188,181,181,PNR,PNR,208,174,174,PNR,PNR,187,187,PNR,188,188 +getppid,64,110,110,64,173,64,108,108,64,64,64,64,173,64,64 +getpriority,96,140,140,96,141,96,137,137,96,96,96,96,141,96,96 +getrandom,355,318,318,384,278,353,313,317,339,339,359,359,278,349,349 +getresgid,171,120,120,171,150,191,118,118,171,171,170,170,150,171,211 +getresgid32,211,PNR,PNR,211,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,211,PNR +getresuid,165,118,118,165,148,186,116,116,165,165,165,165,148,165,209 +getresuid32,209,PNR,PNR,209,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,209,PNR +getrlimit,76,97,97,PNR,163,76,95,95,76,76,76,76,163,76,191 +get_robust_list,312,274,531,339,100,310,269,273,290,290,299,299,100,305,305 +getrusage,77,98,98,77,165,77,96,96,77,77,77,77,165,77,77 +getsid,147,124,124,147,156,151,122,122,147,147,147,147,156,147,147 +getsockname,367,51,51,286,204,172,50,50,44,44,331,331,204,367,367 +getsockopt,365,55,542,295,209,173,54,54,182,182,340,340,209,365,365 +get_thread_area,244,211,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +gettid,224,186,186,224,178,222,178,178,206,206,207,207,178,236,236 +gettimeofday,78,96,96,78,169,78,94,94,78,78,78,78,169,78,78 +get_tls,PNR,PNR,PNR,983046,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +getuid,24,102,102,24,174,24,100,100,24,24,24,24,174,24,199 +getuid32,199,PNR,PNR,199,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,199,PNR +getxattr,229,191,191,229,8,227,183,183,241,241,212,212,8,227,227 +gtty,32,PNR,PNR,PNR,PNR,32,PNR,PNR,PNR,PNR,32,32,PNR,PNR,PNR +idle,112,PNR,PNR,PNR,PNR,112,PNR,PNR,PNR,PNR,112,112,PNR,112,112 +init_module,128,175,175,128,105,128,168,168,128,128,128,128,105,128,128 +inotify_add_watch,292,254,254,317,27,285,244,248,270,270,276,276,27,285,285 +inotify_init,291,253,253,316,PNR,284,243,247,269,269,275,275,PNR,284,284 +inotify_init1,332,294,294,360,26,329,288,292,314,314,318,318,26,324,324 +inotify_rm_watch,293,255,255,318,28,286,245,249,271,271,277,277,28,286,286 +io_cancel,249,210,210,247,3,245,204,204,219,219,231,231,3,247,247 +ioctl,54,16,514,54,29,54,15,15,54,54,54,54,29,54,54 +io_destroy,246,207,207,244,1,242,201,201,216,216,228,228,1,244,244 +io_getevents,247,208,208,245,4,243,202,202,217,217,229,229,4,245,245 +ioperm,101,173,173,PNR,PNR,101,PNR,PNR,PNR,PNR,101,101,PNR,101,PNR +io_pgetevents,385,333,333,399,292,368,328,332,350,350,388,388,292,382,382 +io_pgetevents_time64,416,PNR,PNR,416,PNR,416,PNR,416,416,PNR,416,PNR,PNR,416,PNR +iopl,110,172,172,PNR,PNR,110,PNR,PNR,PNR,PNR,110,110,PNR,PNR,PNR +ioprio_get,290,252,252,315,31,315,274,278,268,268,274,274,31,283,283 +ioprio_set,289,251,251,314,30,314,273,277,267,267,273,273,30,282,282 +io_setup,245,206,543,243,0,241,200,200,215,215,227,227,0,243,243 +io_submit,248,209,544,246,2,244,203,203,218,218,230,230,2,246,246 +io_uring_enter,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426 +io_uring_register,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427 +io_uring_setup,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425 +ipc,117,PNR,PNR,PNR,PNR,117,PNR,PNR,PNR,PNR,117,117,PNR,117,117 +kcmp,349,312,312,378,272,347,306,311,332,332,354,354,272,343,343 +kexec_file_load,PNR,320,320,401,294,PNR,PNR,PNR,355,355,382,382,294,381,381 +kexec_load,283,246,528,347,104,311,270,274,300,300,268,268,104,277,277 +keyctl,288,250,250,311,219,282,241,245,266,266,271,271,219,280,280 +kill,37,62,62,37,129,37,60,60,37,37,37,37,129,37,37 +lchown,16,94,94,16,PNR,16,92,92,16,16,16,16,PNR,16,198 +lchown32,198,PNR,PNR,198,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,198,PNR +lgetxattr,230,192,192,230,9,228,184,184,242,242,213,213,9,228,228 +link,9,86,86,9,PNR,9,84,84,9,9,9,9,PNR,9,9 +linkat,303,265,265,330,37,296,255,259,283,283,294,294,37,296,296 +listen,363,50,50,284,201,174,49,49,32,32,329,329,201,363,363 +listxattr,232,194,194,232,11,230,186,186,244,244,215,215,11,230,230 +llistxattr,233,195,195,233,12,231,187,187,245,245,216,216,12,231,231 +_llseek,140,PNR,PNR,140,PNR,140,PNR,PNR,140,140,140,140,PNR,140,PNR +lock,53,PNR,PNR,PNR,PNR,53,PNR,PNR,PNR,PNR,53,53,PNR,PNR,PNR +lookup_dcookie,253,212,212,249,18,247,206,206,223,223,235,235,18,110,110 +lremovexattr,236,198,198,236,15,234,190,190,248,248,219,219,15,234,234 +lseek,19,8,8,19,62,19,8,8,19,19,19,19,62,19,19 +lsetxattr,227,189,189,227,6,225,181,181,239,239,210,210,6,225,225 +lstat,107,6,6,107,PNR,107,6,6,84,84,107,107,PNR,107,107 +lstat64,196,PNR,PNR,196,PNR,214,PNR,PNR,198,198,196,PNR,PNR,196,PNR +madvise,219,28,28,220,233,218,27,27,119,119,205,205,233,219,219 +mbind,274,237,237,319,235,268,227,231,260,260,259,259,235,268,268 +membarrier,375,324,324,389,283,358,318,322,343,343,365,365,283,356,356 +memfd_create,356,319,319,385,279,354,314,318,340,340,360,360,279,350,350 +migrate_pages,294,256,256,400,238,287,246,250,272,272,258,258,238,287,287 +mincore,218,27,27,219,232,217,26,26,72,72,206,206,232,218,218 +mkdir,39,83,83,39,PNR,39,81,81,39,39,39,39,PNR,39,39 +mkdirat,296,258,258,323,34,289,248,252,276,276,287,287,34,289,289 +mknod,14,133,133,14,PNR,14,131,131,14,14,14,14,PNR,14,14 +mknodat,297,259,259,324,33,290,249,253,277,277,288,288,33,290,290 +mlock,150,149,149,150,228,154,146,146,150,150,150,150,228,150,150 +mlock2,376,325,325,390,284,359,319,323,345,345,378,378,284,374,374 +mlockall,152,151,151,152,230,156,148,148,152,152,152,152,230,152,152 +mmap,90,9,9,PNR,222,90,9,9,90,90,90,90,222,90,90 +mmap2,192,PNR,PNR,192,PNR,210,PNR,PNR,89,89,192,PNR,PNR,192,PNR +modify_ldt,123,154,154,PNR,PNR,123,PNR,PNR,PNR,PNR,123,123,PNR,PNR,PNR +mount,21,165,165,21,40,21,160,160,21,21,21,21,40,21,21 +move_mount,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429 +move_pages,317,279,533,344,239,308,267,271,295,295,301,301,239,310,310 +mprotect,125,10,10,125,226,125,10,10,125,125,125,125,226,125,125 +mpx,56,PNR,PNR,PNR,PNR,56,PNR,PNR,PNR,PNR,56,56,PNR,PNR,PNR +mq_getsetattr,282,245,245,279,185,276,235,239,234,234,267,267,185,276,276 +mq_notify,281,244,527,278,184,275,234,238,233,233,266,266,184,275,275 +mq_open,277,240,240,274,180,271,230,234,229,229,262,262,180,271,271 +mq_timedreceive,280,243,243,277,183,274,233,237,232,232,265,265,183,274,274 +mq_timedreceive_time64,419,PNR,PNR,419,PNR,419,PNR,419,419,PNR,419,PNR,PNR,419,PNR +mq_timedsend,279,242,242,276,182,273,232,236,231,231,264,264,182,273,273 +mq_timedsend_time64,418,PNR,PNR,418,PNR,418,PNR,418,418,PNR,418,PNR,PNR,418,PNR +mq_unlink,278,241,241,275,181,272,231,235,230,230,263,263,181,272,272 +mremap,163,25,25,163,216,167,24,24,163,163,163,163,216,163,163 +msgctl,402,71,71,304,187,402,69,69,191,191,402,402,187,402,402 +msgget,399,68,68,303,186,399,66,66,190,190,399,399,186,399,399 +msgrcv,401,70,70,302,188,401,68,68,189,189,401,401,188,401,401 +msgsnd,400,69,69,301,189,400,67,67,188,188,400,400,189,400,400 +msync,144,26,26,144,227,144,25,25,144,144,144,144,227,144,144 +multiplexer,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,201,201,PNR,PNR,PNR +munlock,151,150,150,151,229,155,147,147,151,151,151,151,229,151,151 +munlockall,153,152,152,153,231,157,149,149,153,153,153,153,231,153,153 +munmap,91,11,11,91,215,91,11,11,91,91,91,91,215,91,91 +name_to_handle_at,341,303,303,370,264,339,298,303,325,325,345,345,264,335,335 +nanosleep,162,35,35,162,101,166,34,34,162,162,162,162,101,162,162 +newfstatat,PNR,262,262,PNR,79,PNR,252,256,PNR,PNR,PNR,291,79,PNR,293 +_newselect,142,PNR,PNR,142,PNR,142,22,22,142,142,142,142,PNR,142,PNR +nfsservctl,169,180,PNR,169,42,189,173,173,PNR,PNR,168,168,42,169,169 +nice,34,PNR,PNR,34,PNR,34,PNR,PNR,34,34,34,34,PNR,34,34 +oldfstat,28,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,28,28,PNR,PNR,PNR +oldlstat,84,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,84,84,PNR,PNR,PNR +oldolduname,59,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,59,59,PNR,PNR,PNR +oldstat,18,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,18,18,PNR,PNR,PNR +olduname,109,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,109,109,PNR,PNR,PNR +open,5,2,2,5,PNR,5,2,2,5,5,5,5,PNR,5,5 +openat,295,257,257,322,56,288,247,251,275,275,286,286,56,288,288 +openat2,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437 +open_by_handle_at,342,304,304,371,265,340,299,304,326,326,346,346,265,336,336 +open_tree,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428 +pause,29,34,34,29,PNR,29,33,33,29,29,29,29,PNR,29,29 +pciconfig_iobase,PNR,PNR,PNR,271,PNR,PNR,PNR,PNR,PNR,PNR,200,200,PNR,PNR,PNR +pciconfig_read,PNR,PNR,PNR,272,PNR,PNR,PNR,PNR,PNR,PNR,198,198,PNR,PNR,PNR +pciconfig_write,PNR,PNR,PNR,273,PNR,PNR,PNR,PNR,PNR,PNR,199,199,PNR,PNR,PNR +perf_event_open,336,298,298,364,241,333,292,296,318,318,319,319,241,331,331 +personality,136,135,135,136,92,136,132,132,136,136,136,136,92,136,136 +pidfd_getfd,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438 +pidfd_open,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434 +pidfd_send_signal,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424 +pipe,42,22,22,42,PNR,42,21,21,42,42,42,42,PNR,42,42 +pipe2,331,293,293,359,59,328,287,291,313,313,317,317,59,325,325 +pivot_root,217,155,155,218,41,216,151,151,67,67,203,203,41,217,217 +pkey_alloc,381,330,330,395,289,364,324,328,352,352,384,384,289,385,385 +pkey_free,382,331,331,396,290,365,325,329,353,353,385,385,290,386,386 +pkey_mprotect,380,329,329,394,288,363,323,327,351,351,386,386,288,384,384 +poll,168,7,7,168,PNR,188,7,7,168,168,167,167,PNR,168,168 +ppoll,309,271,271,336,73,302,261,265,274,274,281,281,73,302,302 +ppoll_time64,414,PNR,PNR,414,PNR,414,PNR,414,414,PNR,414,PNR,PNR,414,PNR +prctl,172,157,157,172,167,192,153,153,172,172,171,171,167,172,172 +pread64,180,17,17,180,67,200,16,16,108,108,179,179,67,180,180 +preadv,333,295,534,361,69,330,289,293,315,315,320,320,69,328,328 +preadv2,378,327,546,392,286,361,321,325,347,347,380,380,286,376,376 +prlimit64,340,302,302,369,261,338,297,302,321,321,325,325,261,334,334 +process_vm_readv,347,310,539,376,270,345,304,309,330,330,351,351,270,340,340 +process_vm_writev,348,311,540,377,271,346,305,310,331,331,352,352,271,341,341 +prof,44,PNR,PNR,PNR,PNR,44,PNR,PNR,PNR,PNR,44,44,PNR,PNR,PNR +profil,98,PNR,PNR,PNR,PNR,98,PNR,PNR,PNR,PNR,98,98,PNR,PNR,PNR +pselect6,308,270,270,335,72,301,260,264,273,273,280,280,72,301,301 +pselect6_time64,413,PNR,PNR,413,PNR,413,PNR,413,413,PNR,413,PNR,PNR,413,PNR +ptrace,26,101,521,26,117,26,99,99,26,26,26,26,117,26,26 +putpmsg,189,182,182,PNR,PNR,209,175,175,PNR,PNR,188,188,PNR,189,189 +pwrite64,181,18,18,181,68,201,17,17,109,109,180,180,68,181,181 +pwritev,334,296,535,362,70,331,290,294,316,316,321,321,70,329,329 +pwritev2,379,328,547,393,287,362,322,326,348,348,381,381,287,377,377 +query_module,167,178,PNR,PNR,PNR,187,171,171,PNR,PNR,166,166,PNR,167,167 +quotactl,131,179,179,131,60,131,172,172,131,131,131,131,60,131,131 +read,3,0,0,3,63,3,0,0,3,3,3,3,63,3,3 +readahead,225,187,187,225,213,223,179,179,207,207,191,191,213,222,222 +readdir,89,PNR,PNR,PNR,PNR,89,PNR,PNR,PNR,PNR,89,89,PNR,89,89 +readlink,85,89,89,85,PNR,85,87,87,85,85,85,85,PNR,85,85 +readlinkat,305,267,267,332,78,298,257,261,285,285,296,296,78,298,298 +readv,145,19,515,145,65,145,18,18,145,145,145,145,65,145,145 +reboot,88,169,169,88,142,88,164,164,88,88,88,88,142,88,88 +recv,PNR,PNR,PNR,291,PNR,175,PNR,PNR,98,98,336,336,PNR,PNR,PNR +recvfrom,371,45,517,292,207,176,44,44,123,123,337,337,207,371,371 +recvmmsg,337,299,537,365,243,335,294,298,319,319,343,343,243,357,357 +recvmmsg_time64,417,PNR,PNR,417,PNR,417,PNR,417,417,PNR,417,PNR,PNR,417,PNR +recvmsg,372,47,519,297,212,177,46,46,184,184,342,342,212,372,372 +remap_file_pages,257,216,216,253,234,251,210,210,227,227,239,239,234,267,267 +removexattr,235,197,197,235,14,233,189,189,247,247,218,218,14,233,233 +rename,38,82,82,38,PNR,38,80,80,38,38,38,38,PNR,38,38 +renameat,302,264,264,329,38,295,254,258,282,282,293,293,PNR,295,295 +renameat2,353,316,316,382,276,351,311,315,337,337,357,357,276,347,347 +request_key,287,249,249,310,218,281,240,244,265,265,270,270,218,279,279 +restart_syscall,0,219,219,0,128,253,213,214,0,0,0,0,128,7,7 +riscv_flush_icache,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,259,PNR,PNR +rmdir,40,84,84,40,PNR,40,82,82,40,40,40,40,PNR,40,40 +rseq,386,334,334,398,293,367,327,331,354,354,387,387,293,383,383 +rtas,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,255,255,PNR,PNR,PNR +rt_sigaction,174,13,512,174,134,194,13,13,174,174,173,173,134,174,174 +rt_sigpending,176,127,522,176,136,196,125,125,176,176,175,175,136,176,176 +rt_sigprocmask,175,14,14,175,135,195,14,14,175,175,174,174,135,175,175 +rt_sigqueueinfo,178,129,524,178,138,198,127,127,178,178,177,177,138,178,178 +rt_sigreturn,173,15,513,173,139,193,211,211,173,173,172,172,139,173,173 +rt_sigsuspend,179,130,130,179,133,199,128,128,179,179,178,178,133,179,179 +rt_sigtimedwait,177,128,523,177,137,197,126,126,177,177,176,176,137,177,177 +rt_sigtimedwait_time64,421,PNR,PNR,421,PNR,421,PNR,421,421,PNR,421,PNR,PNR,421,PNR +rt_tgsigqueueinfo,335,297,536,363,240,332,291,295,317,317,322,322,240,330,330 +s390_guarded_storage,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,378,378 +s390_pci_mmio_read,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,353,353 +s390_pci_mmio_write,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,352,352 +s390_runtime_instr,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,342,342 +s390_sthyi,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,380,380 +sched_getaffinity,242,204,204,242,123,240,196,196,212,212,223,223,123,240,240 +sched_getattr,352,315,315,381,275,350,310,314,335,335,356,356,275,346,346 +sched_getparam,155,143,143,155,121,159,140,140,155,155,155,155,121,155,155 +sched_get_priority_max,159,146,146,159,125,163,143,143,159,159,159,159,125,159,159 +sched_get_priority_min,160,147,147,160,126,164,144,144,160,160,160,160,126,160,160 +sched_getscheduler,157,145,145,157,120,161,142,142,157,157,157,157,120,157,157 +sched_rr_get_interval,161,148,148,161,127,165,145,145,161,161,161,161,127,161,161 +sched_rr_get_interval_time64,423,PNR,PNR,423,PNR,423,PNR,423,423,PNR,423,PNR,PNR,423,PNR +sched_setaffinity,241,203,203,241,122,239,195,195,211,211,222,222,122,239,239 +sched_setattr,351,314,314,380,274,349,309,313,334,334,355,355,274,345,345 +sched_setparam,154,142,142,154,118,158,139,139,154,154,154,154,118,154,154 +sched_setscheduler,156,144,144,156,119,160,141,141,156,156,156,156,119,156,156 +sched_yield,158,24,24,158,124,162,23,23,158,158,158,158,124,158,158 +seccomp,354,317,317,383,277,352,312,316,338,338,358,358,277,348,348 +security,PNR,185,185,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +select,82,23,23,PNR,PNR,PNR,PNR,PNR,PNR,PNR,82,82,PNR,PNR,142 +semctl,394,66,66,300,191,394,64,64,187,187,394,394,191,394,394 +semget,393,64,64,299,190,393,62,62,186,186,393,393,190,393,393 +semop,PNR,65,65,298,193,PNR,63,63,185,185,PNR,PNR,193,PNR,PNR +semtimedop,PNR,220,220,312,192,PNR,214,215,228,228,PNR,392,192,PNR,392 +semtimedop_time64,420,PNR,PNR,420,PNR,420,PNR,420,420,PNR,420,PNR,PNR,420,PNR +send,PNR,PNR,PNR,289,PNR,178,PNR,PNR,58,58,334,334,PNR,PNR,PNR +sendfile,187,40,40,187,71,207,39,39,122,122,186,186,71,187,187 +sendfile64,239,PNR,PNR,239,PNR,237,PNR,219,209,209,226,PNR,PNR,223,PNR +sendmmsg,345,307,538,374,269,343,302,307,329,329,349,349,269,358,358 +sendmsg,370,46,518,296,211,179,45,45,183,183,341,341,211,370,370 +sendto,369,44,44,290,206,180,43,43,82,82,335,335,206,369,369 +setdomainname,121,171,171,121,162,121,166,166,121,121,121,121,162,121,121 +setfsgid,139,123,123,139,152,139,121,121,139,139,139,139,152,139,216 +setfsgid32,216,PNR,PNR,216,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,216,PNR +setfsuid,138,122,122,138,151,138,120,120,138,138,138,138,151,138,215 +setfsuid32,215,PNR,PNR,215,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,215,PNR +setgid,46,106,106,46,144,46,104,104,46,46,46,46,144,46,214 +setgid32,214,PNR,PNR,214,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,214,PNR +setgroups,81,116,116,81,159,81,114,114,81,81,81,81,159,81,206 +setgroups32,206,PNR,PNR,206,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,206,PNR +sethostname,74,170,170,74,161,74,165,165,74,74,74,74,161,74,74 +setitimer,104,38,38,104,103,104,36,36,104,104,104,104,103,104,104 +set_mempolicy,276,238,238,321,237,270,229,233,262,262,261,261,237,270,270 +setns,346,308,308,375,268,344,303,308,328,328,350,350,268,339,339 +setpgid,57,109,109,57,154,57,107,107,57,57,57,57,154,57,57 +setpriority,97,141,141,97,140,97,138,138,97,97,97,97,140,97,97 +setregid,71,114,114,71,143,71,112,112,71,71,71,71,143,71,204 +setregid32,204,PNR,PNR,204,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,204,PNR +setresgid,170,119,119,170,149,190,117,117,170,170,169,169,149,170,210 +setresgid32,210,PNR,PNR,210,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,210,PNR +setresuid,164,117,117,164,147,185,115,115,164,164,164,164,147,164,208 +setresuid32,208,PNR,PNR,208,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,208,PNR +setreuid,70,113,113,70,145,70,111,111,70,70,70,70,145,70,203 +setreuid32,203,PNR,PNR,203,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,203,PNR +setrlimit,75,160,160,75,164,75,155,155,75,75,75,75,164,75,75 +set_robust_list,311,273,530,338,99,309,268,272,289,289,300,300,99,304,304 +setsid,66,112,112,66,157,66,110,110,66,66,66,66,157,66,66 +setsockopt,366,54,541,294,208,181,53,53,181,181,339,339,208,366,366 +set_thread_area,243,205,PNR,PNR,PNR,283,242,246,PNR,PNR,PNR,PNR,PNR,PNR,PNR +set_tid_address,258,218,218,256,96,252,212,213,237,237,232,232,96,252,252 +settimeofday,79,164,164,79,170,79,159,159,79,79,79,79,170,79,79 +set_tls,PNR,PNR,PNR,983045,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +setuid,23,105,105,23,146,23,103,103,23,23,23,23,146,23,213 +setuid32,213,PNR,PNR,213,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,213,PNR +setxattr,226,188,188,226,5,224,180,180,238,238,209,209,5,224,224 +sgetmask,68,PNR,PNR,PNR,PNR,68,PNR,PNR,68,68,68,68,PNR,PNR,PNR +shmat,397,30,30,305,196,397,29,29,192,192,397,397,196,397,397 +shmctl,396,31,31,308,195,396,30,30,195,195,396,396,195,396,396 +shmdt,398,67,67,306,197,398,65,65,193,193,398,398,197,398,398 +shmget,395,29,29,307,194,395,28,28,194,194,395,395,194,395,395 +shutdown,373,48,48,293,210,182,47,47,117,117,338,338,210,373,373 +sigaction,67,PNR,PNR,67,PNR,67,PNR,PNR,PNR,PNR,67,67,PNR,67,67 +sigaltstack,186,131,525,186,132,206,129,129,166,166,185,185,132,186,186 +signal,48,PNR,PNR,PNR,PNR,48,PNR,PNR,48,48,48,48,PNR,48,48 +signalfd,321,282,282,349,PNR,317,276,280,302,302,305,305,PNR,316,316 +signalfd4,327,289,289,355,74,324,283,287,309,309,313,313,74,322,322 +sigpending,73,PNR,PNR,73,PNR,73,PNR,PNR,73,73,73,73,PNR,73,73 +sigprocmask,126,PNR,PNR,126,PNR,126,PNR,PNR,126,126,126,126,PNR,126,126 +sigreturn,119,PNR,PNR,119,PNR,119,PNR,PNR,PNR,PNR,119,119,PNR,119,119 +sigsuspend,72,PNR,PNR,72,PNR,72,PNR,PNR,PNR,PNR,72,72,PNR,72,72 +socket,359,41,41,281,198,183,40,40,17,17,326,326,198,359,359 +socketcall,102,PNR,PNR,PNR,PNR,102,PNR,PNR,PNR,PNR,102,102,PNR,102,102 +socketpair,360,53,53,288,199,184,52,52,56,56,333,333,199,360,360 +splice,313,275,275,340,76,304,263,267,291,291,283,283,76,306,306 +spu_create,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,279,279,PNR,PNR,PNR +spu_run,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,278,278,PNR,PNR,PNR +ssetmask,69,PNR,PNR,PNR,PNR,69,PNR,PNR,69,69,69,69,PNR,PNR,PNR +stat,106,4,4,106,PNR,106,4,4,18,18,106,106,PNR,106,106 +stat64,195,PNR,PNR,195,PNR,213,PNR,PNR,101,101,195,PNR,PNR,195,PNR +statfs,99,137,137,99,43,99,134,134,99,99,99,99,43,99,99 +statfs64,268,PNR,PNR,266,PNR,255,PNR,217,298,298,252,252,PNR,265,265 +statx,383,332,332,397,291,366,326,330,349,349,383,383,291,379,379 +stime,25,PNR,PNR,PNR,PNR,25,PNR,PNR,25,25,25,25,PNR,25,PNR +stty,31,PNR,PNR,PNR,PNR,31,PNR,PNR,PNR,PNR,31,31,PNR,PNR,PNR +subpage_prot,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,310,310,PNR,PNR,PNR +swapcontext,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,249,249,PNR,PNR,PNR +swapoff,115,168,168,115,225,115,163,163,115,115,115,115,225,115,115 +swapon,87,167,167,87,224,87,162,162,87,87,87,87,224,87,87 +switch_endian,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,363,363,PNR,PNR,PNR +symlink,83,88,88,83,PNR,83,86,86,83,83,83,83,PNR,83,83 +symlinkat,304,266,266,331,36,297,256,260,284,284,295,295,36,297,297 +sync,36,162,162,36,81,36,157,157,36,36,36,36,81,36,36 +sync_file_range,314,277,277,PNR,84,305,264,268,292,292,PNR,PNR,84,307,307 +sync_file_range2,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,308,308,PNR,PNR,PNR +syncfs,344,306,306,373,267,342,301,306,327,327,348,348,267,338,338 +syscall,PNR,PNR,PNR,PNR,PNR,0,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +_sysctl,149,156,PNR,149,PNR,153,152,152,149,149,149,149,PNR,149,149 +sys_debug_setcontext,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,256,256,PNR,PNR,PNR +sysfs,135,139,139,135,PNR,135,136,136,135,135,135,135,PNR,135,135 +sysinfo,116,99,99,116,179,116,97,97,116,116,116,116,179,116,116 +syslog,103,103,103,103,116,103,101,101,103,103,103,103,116,103,103 +sysmips,PNR,PNR,PNR,PNR,PNR,149,199,199,PNR,PNR,PNR,PNR,PNR,PNR,PNR +tee,315,276,276,342,77,306,265,269,293,293,284,284,77,308,308 +tgkill,270,234,234,268,131,266,225,229,259,259,250,250,131,241,241 +time,13,201,201,PNR,PNR,13,PNR,PNR,13,13,13,13,PNR,13,PNR +timer_create,259,222,526,257,107,257,216,220,250,250,240,240,107,254,254 +timer_delete,263,226,226,261,111,261,220,224,254,254,244,244,111,258,258 +timerfd,PNR,PNR,PNR,PNR,PNR,318,277,281,PNR,PNR,PNR,PNR,PNR,317,317 +timerfd_create,322,283,283,350,85,321,280,284,306,306,306,306,85,319,319 +timerfd_gettime,326,287,287,354,87,322,281,285,308,308,312,312,87,321,321 +timerfd_gettime64,410,PNR,PNR,410,PNR,410,PNR,410,410,PNR,410,PNR,PNR,410,PNR +timerfd_settime,325,286,286,353,86,323,282,286,307,307,311,311,86,320,320 +timerfd_settime64,411,PNR,PNR,411,PNR,411,PNR,411,411,PNR,411,PNR,PNR,411,PNR +timer_getoverrun,262,225,225,260,109,260,219,223,253,253,243,243,109,257,257 +timer_gettime,261,224,224,259,108,259,218,222,252,252,242,242,108,256,256 +timer_gettime64,408,PNR,PNR,408,PNR,408,PNR,408,408,PNR,408,PNR,PNR,408,PNR +timer_settime,260,223,223,258,110,258,217,221,251,251,241,241,110,255,255 +timer_settime64,409,PNR,PNR,409,PNR,409,PNR,409,409,PNR,409,PNR,PNR,409,PNR +times,43,100,100,43,153,43,98,98,43,43,43,43,153,43,43 +tkill,238,200,200,238,130,236,192,192,208,208,208,208,130,237,237 +truncate,92,76,76,92,45,92,74,74,92,92,92,92,45,92,92 +truncate64,193,PNR,PNR,193,PNR,211,PNR,PNR,199,199,193,PNR,PNR,193,PNR +tuxcall,PNR,184,184,PNR,PNR,PNR,PNR,PNR,PNR,PNR,225,225,PNR,PNR,PNR +ugetrlimit,191,PNR,PNR,191,PNR,PNR,PNR,PNR,PNR,PNR,190,190,PNR,191,PNR +ulimit,58,PNR,PNR,PNR,PNR,58,PNR,PNR,PNR,PNR,58,58,PNR,PNR,PNR +umask,60,95,95,60,166,60,93,93,60,60,60,60,166,60,60 +umount,22,PNR,PNR,PNR,PNR,22,PNR,PNR,PNR,PNR,22,22,PNR,22,22 +umount2,52,166,166,52,39,52,161,161,52,52,52,52,39,52,52 +uname,122,63,63,122,160,122,61,61,59,59,122,122,160,122,122 +unlink,10,87,87,10,PNR,10,85,85,10,10,10,10,PNR,10,10 +unlinkat,301,263,263,328,35,294,253,257,281,281,292,292,35,294,294 +unshare,310,272,272,337,97,303,262,266,288,288,282,282,97,303,303 +uselib,86,134,PNR,86,PNR,86,PNR,PNR,86,86,86,86,PNR,86,86 +userfaultfd,374,323,323,388,282,357,317,321,344,344,364,364,282,355,355 +usr26,PNR,PNR,PNR,983043,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +usr32,PNR,PNR,PNR,983044,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +ustat,62,136,136,62,PNR,62,133,133,62,62,62,62,PNR,62,62 +utime,30,132,132,PNR,PNR,30,130,130,30,30,30,30,PNR,30,30 +utimensat,320,280,280,348,88,316,275,279,301,301,304,304,88,315,315 +utimensat_time64,412,PNR,PNR,412,PNR,412,PNR,412,412,PNR,412,PNR,PNR,412,PNR +utimes,271,235,235,269,PNR,267,226,230,336,336,251,251,PNR,313,313 +vfork,190,58,58,190,PNR,PNR,PNR,PNR,113,113,189,189,PNR,190,190 +vhangup,111,153,153,111,58,111,150,150,111,111,111,111,58,111,111 +vm86,166,PNR,PNR,PNR,PNR,113,PNR,PNR,PNR,PNR,113,113,PNR,PNR,PNR +vm86old,113,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR +vmsplice,316,278,532,343,75,307,266,270,294,294,285,285,75,309,309 +vserver,273,236,PNR,313,PNR,277,236,240,PNR,PNR,PNR,PNR,PNR,PNR,PNR +wait4,114,61,61,114,260,114,59,59,114,114,114,114,260,114,114 +waitid,284,247,529,280,95,278,237,241,235,235,272,272,95,281,281 +waitpid,7,PNR,PNR,PNR,PNR,7,PNR,PNR,7,7,7,7,PNR,PNR,PNR +write,4,1,1,4,64,4,1,1,4,4,4,4,64,4,4 +writev,146,20,516,146,66,146,19,19,146,146,146,146,66,146,146 diff -Nru libseccomp-2.4.3/src/syscalls.h libseccomp-2.5.1/src/syscalls.h --- libseccomp-2.4.3/src/syscalls.h 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.h 2020-11-17 08:34:38.782027382 +1030 @@ -0,0 +1,62 @@ +/** + * Enhanced Seccomp x86_64 Syscall Table + * + * Copyright (c) 2012, 2020 Red Hat + * Author: Paul Moore + * gperf support: Giuseppe Scrivano + */ + +#ifndef _SYSCALLS_H +#define _SYSCALLS_H + +#include + +#include "arch-aarch64.h" +#include "arch-arm.h" +#include "arch.h" +#include "arch-mips64.h" +#include "arch-mips64n32.h" +#include "arch-mips.h" +#include "arch-parisc.h" +#include "arch-ppc64.h" +#include "arch-ppc.h" +#include "arch-s390.h" +#include "arch-s390x.h" +#include "arch-x32.h" +#include "arch-x86_64.h" +#include "arch-x86.h" +#include "arch-x86.h" +#include "arch-riscv64.h" + +/* NOTE: changes to the arch_syscall_table layout may require changes to the + * generate_syscalls_perf.sh and arch-syscall-validate scripts */ +struct arch_syscall_table { + int name; + int index; + + /* each arch listed here must be defined in syscalls.c */ + /* NOTE: see the warning above - BEWARE! */ + int x86; + int x86_64; + int x32; + int arm; + int aarch64; + int mips; + int mips64; + int mips64n32; + int parisc; + int parisc64; + int ppc; + int ppc64; + int riscv64; + int s390; + int s390x; +}; +#define OFFSET_ARCH(NAME) offsetof(struct arch_syscall_table, NAME) + +/* defined in syscalls.perf.template */ +int syscall_resolve_name(const char *name, int offset); +const char *syscall_resolve_num(int num, int offset); +const struct arch_syscall_def *syscall_iterate(unsigned int spot, int offset); + +#endif diff -Nru libseccomp-2.4.3/src/syscalls.perf libseccomp-2.5.1/src/syscalls.perf --- libseccomp-2.4.3/src/syscalls.perf 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.perf 2020-11-17 10:17:50.428846347 +1030 @@ -0,0 +1,550 @@ +%{ +/** + * Copyright (c) 2012 Red Hat + * Copyright (c) 2020 Red Hat + * Authors: Paul Moore + * Giuseppe Scrivano + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include "syscalls.h" + +%} +struct arch_syscall_table; + +%% +accept,0,__PNR_accept,43,43,285,202,168,42,42,35,35,330,330,202,__PNR_accept,__PNR_accept +accept4,1,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364 +access,2,33,21,21,33,__PNR_access,33,20,20,33,33,33,33,__PNR_access,33,33 +acct,3,51,163,163,51,89,51,158,158,51,51,51,51,89,51,51 +add_key,4,286,248,248,309,217,280,239,243,264,264,269,269,217,278,278 +adjtimex,5,124,159,159,124,171,124,154,154,124,124,124,124,171,124,124 +afs_syscall,6,137,183,183,__PNR_afs_syscall,__PNR_afs_syscall,137,176,176,__PNR_afs_syscall,__PNR_afs_syscall,137,137,__PNR_afs_syscall,137,137 +alarm,7,27,37,37,__PNR_alarm,__PNR_alarm,27,37,37,27,27,27,27,__PNR_alarm,27,27 +arch_prctl,8,384,158,158,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl +arm_fadvise64_64,9,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,270,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64 +arm_sync_file_range,10,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,341,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range +bdflush,11,134,__PNR_bdflush,__PNR_bdflush,134,__PNR_bdflush,134,__PNR_bdflush,__PNR_bdflush,134,134,134,134,__PNR_bdflush,134,134 +bind,12,361,49,49,282,200,169,48,48,22,22,327,327,200,361,361 +bpf,13,357,321,321,386,280,355,315,319,341,341,361,361,280,351,351 +break,14,17,__PNR_break,__PNR_break,__PNR_break,__PNR_break,17,__PNR_break,__PNR_break,__PNR_break,__PNR_break,17,17,__PNR_break,__PNR_break,__PNR_break +breakpoint,15,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,983041,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint +brk,16,45,12,12,45,214,45,12,12,45,45,45,45,214,45,45 +cachectl,17,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,148,198,198,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl +cacheflush,18,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,983042,__PNR_cacheflush,147,197,197,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush +capget,19,184,125,125,184,90,204,123,123,106,106,183,183,90,184,184 +capset,20,185,126,126,185,91,205,124,124,107,107,184,184,91,185,185 +chdir,21,12,80,80,12,49,12,78,78,12,12,12,12,49,12,12 +chmod,22,15,90,90,15,__PNR_chmod,15,88,88,15,15,15,15,__PNR_chmod,15,15 +chown,23,182,92,92,182,__PNR_chown,202,90,90,180,180,181,181,__PNR_chown,182,212 +chown32,24,212,__PNR_chown32,__PNR_chown32,212,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,212,__PNR_chown32 +chroot,25,61,161,161,61,51,61,156,156,61,61,61,61,51,61,61 +clock_adjtime,26,343,305,305,372,266,341,300,305,324,324,347,347,266,337,337 +clock_adjtime64,27,405,__PNR_clock_adjtime64,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,405,405,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64 +clock_getres,28,266,229,229,264,114,264,223,227,257,257,247,247,114,261,261 +clock_getres_time64,29,406,__PNR_clock_getres_time64,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,406,406,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64 +clock_gettime,30,265,228,228,263,113,263,222,226,256,256,246,246,113,260,260 +clock_gettime64,31,403,__PNR_clock_gettime64,__PNR_clock_gettime64,403,__PNR_clock_gettime64,403,__PNR_clock_gettime64,403,403,__PNR_clock_gettime64,403,__PNR_clock_gettime64,__PNR_clock_gettime64,403,__PNR_clock_gettime64 +clock_nanosleep,32,267,230,230,265,115,265,224,228,258,258,248,248,115,262,262 +clock_nanosleep_time64,33,407,__PNR_clock_nanosleep_time64,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,407,407,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64 +clock_settime,34,264,227,227,262,112,262,221,225,255,255,245,245,112,259,259 +clock_settime64,35,404,__PNR_clock_settime64,__PNR_clock_settime64,404,__PNR_clock_settime64,404,__PNR_clock_settime64,404,404,__PNR_clock_settime64,404,__PNR_clock_settime64,__PNR_clock_settime64,404,__PNR_clock_settime64 +clone,36,120,56,56,120,220,120,55,55,120,120,120,120,220,120,120 +clone3,37,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435 +close,38,6,3,3,6,57,6,3,3,6,6,6,6,57,6,6 +connect,39,362,42,42,283,203,170,41,41,31,31,328,328,203,362,362 +copy_file_range,40,377,326,326,391,285,360,320,324,346,346,379,379,285,375,375 +creat,41,8,85,85,8,__PNR_creat,8,83,83,8,8,8,8,__PNR_creat,8,8 +create_module,42,127,174,__PNR_create_module,__PNR_create_module,__PNR_create_module,127,167,167,__PNR_create_module,__PNR_create_module,127,127,__PNR_create_module,127,127 +delete_module,43,129,176,176,129,106,129,169,169,129,129,129,129,106,129,129 +dup,44,41,32,32,41,23,41,31,31,41,41,41,41,23,41,41 +dup2,45,63,33,33,63,__PNR_dup2,63,32,32,63,63,63,63,__PNR_dup2,63,63 +dup3,46,330,292,292,358,24,327,286,290,312,312,316,316,24,326,326 +epoll_create,47,254,213,213,250,__PNR_epoll_create,248,207,207,224,224,236,236,__PNR_epoll_create,249,249 +epoll_create1,48,329,291,291,357,20,326,285,289,311,311,315,315,20,327,327 +epoll_ctl,49,255,233,233,251,21,249,208,208,225,225,237,237,21,250,250 +epoll_ctl_old,50,__PNR_epoll_ctl_old,214,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old +epoll_pwait,51,319,281,281,346,22,313,272,276,297,297,303,303,22,312,312 +epoll_wait,52,256,232,232,252,__PNR_epoll_wait,250,209,209,226,226,238,238,__PNR_epoll_wait,251,251 +epoll_wait_old,53,__PNR_epoll_wait_old,215,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old +eventfd,54,323,284,284,351,__PNR_eventfd,319,278,282,304,304,307,307,__PNR_eventfd,318,318 +eventfd2,55,328,290,290,356,19,325,284,288,310,310,314,314,19,323,323 +execve,56,11,59,520,11,221,11,57,57,11,11,11,11,221,11,11 +execveat,57,358,322,545,387,281,356,316,320,342,342,362,362,281,354,354 +exit,58,1,60,60,1,93,1,58,58,1,1,1,1,93,1,1 +exit_group,59,252,231,231,248,94,246,205,205,222,222,234,234,94,248,248 +faccessat,60,307,269,269,334,48,300,259,263,287,287,298,298,48,300,300 +faccessat2,61,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439 +fadvise64,62,250,221,221,__PNR_fadvise64,223,254,215,216,__PNR_fadvise64,__PNR_fadvise64,233,233,223,253,253 +fadvise64_64,63,272,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,236,236,254,__PNR_fadvise64_64,__PNR_fadvise64_64,264,__PNR_fadvise64_64 +fallocate,64,324,285,285,352,47,320,279,283,305,305,309,309,47,314,314 +fanotify_init,65,338,300,300,367,262,336,295,300,322,322,323,323,262,332,332 +fanotify_mark,66,339,301,301,368,263,337,296,301,323,323,324,324,263,333,333 +fchdir,67,133,81,81,133,50,133,79,79,133,133,133,133,50,133,133 +fchmod,68,94,91,91,94,52,94,89,89,94,94,94,94,52,94,94 +fchmodat,69,306,268,268,333,53,299,258,262,286,286,297,297,53,299,299 +fchown,70,95,93,93,95,55,95,91,91,95,95,95,95,55,95,207 +fchown32,71,207,__PNR_fchown32,__PNR_fchown32,207,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,207,__PNR_fchown32 +fchownat,72,298,260,260,325,54,291,250,254,278,278,289,289,54,291,291 +fcntl,73,55,72,72,55,25,55,70,70,55,55,55,55,25,55,55 +fcntl64,74,221,__PNR_fcntl64,__PNR_fcntl64,221,__PNR_fcntl64,220,__PNR_fcntl64,212,202,202,204,__PNR_fcntl64,__PNR_fcntl64,221,__PNR_fcntl64 +fdatasync,75,148,75,75,148,83,152,73,73,148,148,148,148,83,148,148 +fgetxattr,76,231,193,193,231,10,229,185,185,243,243,214,214,10,229,229 +finit_module,77,350,313,313,379,273,348,307,312,333,333,353,353,273,344,344 +flistxattr,78,234,196,196,234,13,232,188,188,246,246,217,217,13,232,232 +flock,79,143,73,73,143,32,143,71,71,143,143,143,143,32,143,143 +fork,80,2,57,57,2,__PNR_fork,2,56,56,2,2,2,2,__PNR_fork,2,2 +fremovexattr,81,237,199,199,237,16,235,191,191,249,249,220,220,16,235,235 +fsconfig,82,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431 +fsetxattr,83,228,190,190,228,7,226,182,182,240,240,211,211,7,226,226 +fsmount,84,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432 +fsopen,85,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430 +fspick,86,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433 +fstat,87,108,5,5,108,80,108,5,5,28,28,108,108,80,108,108 +fstat64,88,197,__PNR_fstat64,__PNR_fstat64,197,__PNR_fstat64,215,__PNR_fstat64,__PNR_fstat64,112,112,197,__PNR_fstat64,__PNR_fstat64,197,__PNR_fstat64 +fstatat64,89,300,__PNR_fstatat64,__PNR_fstatat64,327,__PNR_fstatat64,293,__PNR_fstatat64,__PNR_fstatat64,280,280,291,__PNR_fstatat64,__PNR_fstatat64,293,__PNR_fstatat64 +fstatfs,90,100,138,138,100,44,100,135,135,100,100,100,100,44,100,100 +fstatfs64,91,269,__PNR_fstatfs64,__PNR_fstatfs64,267,__PNR_fstatfs64,256,__PNR_fstatfs64,218,299,299,253,253,__PNR_fstatfs64,266,266 +fsync,92,118,74,74,118,82,118,72,72,118,118,118,118,82,118,118 +ftime,93,35,__PNR_ftime,__PNR_ftime,__PNR_ftime,__PNR_ftime,35,__PNR_ftime,__PNR_ftime,__PNR_ftime,__PNR_ftime,35,35,__PNR_ftime,__PNR_ftime,__PNR_ftime +ftruncate,94,93,77,77,93,46,93,75,75,93,93,93,93,46,93,93 +ftruncate64,95,194,__PNR_ftruncate64,__PNR_ftruncate64,194,__PNR_ftruncate64,212,__PNR_ftruncate64,__PNR_ftruncate64,200,200,194,__PNR_ftruncate64,__PNR_ftruncate64,194,__PNR_ftruncate64 +futex,96,240,202,202,240,98,238,194,194,210,210,221,221,98,238,238 +futex_time64,97,422,__PNR_futex_time64,__PNR_futex_time64,422,__PNR_futex_time64,422,__PNR_futex_time64,422,422,__PNR_futex_time64,422,__PNR_futex_time64,__PNR_futex_time64,422,__PNR_futex_time64 +futimesat,98,299,261,261,326,__PNR_futimesat,292,251,255,279,279,290,290,__PNR_futimesat,292,292 +getcpu,99,318,309,309,345,168,312,271,275,296,296,302,302,168,311,311 +getcwd,100,183,79,79,183,17,203,77,77,110,110,182,182,17,183,183 +getdents,101,141,78,78,141,__PNR_getdents,141,76,76,141,141,141,141,__PNR_getdents,141,141 +getdents64,102,220,217,217,217,61,219,308,299,201,201,202,202,61,220,220 +getegid,103,50,108,108,50,177,50,106,106,50,50,50,50,177,50,202 +getegid32,104,202,__PNR_getegid32,__PNR_getegid32,202,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,202,__PNR_getegid32 +geteuid,105,49,107,107,49,175,49,105,105,49,49,49,49,175,49,201 +geteuid32,106,201,__PNR_geteuid32,__PNR_geteuid32,201,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,201,__PNR_geteuid32 +getgid,107,47,104,104,47,176,47,102,102,47,47,47,47,176,47,200 +getgid32,108,200,__PNR_getgid32,__PNR_getgid32,200,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,200,__PNR_getgid32 +getgroups,109,80,115,115,80,158,80,113,113,80,80,80,80,158,80,205 +getgroups32,110,205,__PNR_getgroups32,__PNR_getgroups32,205,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,205,__PNR_getgroups32 +getitimer,111,105,36,36,105,102,105,35,35,105,105,105,105,102,105,105 +get_kernel_syms,112,130,177,__PNR_get_kernel_syms,__PNR_get_kernel_syms,__PNR_get_kernel_syms,130,170,170,__PNR_get_kernel_syms,__PNR_get_kernel_syms,130,130,__PNR_get_kernel_syms,130,130 +get_mempolicy,113,275,239,239,320,236,269,228,232,261,261,260,260,236,269,269 +getpeername,114,368,52,52,287,205,171,51,51,53,53,332,332,205,368,368 +getpgid,115,132,121,121,132,155,132,119,119,132,132,132,132,155,132,132 +getpgrp,116,65,111,111,65,__PNR_getpgrp,65,109,109,65,65,65,65,__PNR_getpgrp,65,65 +getpid,117,20,39,39,20,172,20,38,38,20,20,20,20,172,20,20 +getpmsg,118,188,181,181,__PNR_getpmsg,__PNR_getpmsg,208,174,174,__PNR_getpmsg,__PNR_getpmsg,187,187,__PNR_getpmsg,188,188 +getppid,119,64,110,110,64,173,64,108,108,64,64,64,64,173,64,64 +getpriority,120,96,140,140,96,141,96,137,137,96,96,96,96,141,96,96 +getrandom,121,355,318,318,384,278,353,313,317,339,339,359,359,278,349,349 +getresgid,122,171,120,120,171,150,191,118,118,171,171,170,170,150,171,211 +getresgid32,123,211,__PNR_getresgid32,__PNR_getresgid32,211,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,211,__PNR_getresgid32 +getresuid,124,165,118,118,165,148,186,116,116,165,165,165,165,148,165,209 +getresuid32,125,209,__PNR_getresuid32,__PNR_getresuid32,209,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,209,__PNR_getresuid32 +getrlimit,126,76,97,97,__PNR_getrlimit,163,76,95,95,76,76,76,76,163,76,191 +get_robust_list,127,312,274,531,339,100,310,269,273,290,290,299,299,100,305,305 +getrusage,128,77,98,98,77,165,77,96,96,77,77,77,77,165,77,77 +getsid,129,147,124,124,147,156,151,122,122,147,147,147,147,156,147,147 +getsockname,130,367,51,51,286,204,172,50,50,44,44,331,331,204,367,367 +getsockopt,131,365,55,542,295,209,173,54,54,182,182,340,340,209,365,365 +get_thread_area,132,244,211,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area +gettid,133,224,186,186,224,178,222,178,178,206,206,207,207,178,236,236 +gettimeofday,134,78,96,96,78,169,78,94,94,78,78,78,78,169,78,78 +get_tls,135,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,983046,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls +getuid,136,24,102,102,24,174,24,100,100,24,24,24,24,174,24,199 +getuid32,137,199,__PNR_getuid32,__PNR_getuid32,199,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,199,__PNR_getuid32 +getxattr,138,229,191,191,229,8,227,183,183,241,241,212,212,8,227,227 +gtty,139,32,__PNR_gtty,__PNR_gtty,__PNR_gtty,__PNR_gtty,32,__PNR_gtty,__PNR_gtty,__PNR_gtty,__PNR_gtty,32,32,__PNR_gtty,__PNR_gtty,__PNR_gtty +idle,140,112,__PNR_idle,__PNR_idle,__PNR_idle,__PNR_idle,112,__PNR_idle,__PNR_idle,__PNR_idle,__PNR_idle,112,112,__PNR_idle,112,112 +init_module,141,128,175,175,128,105,128,168,168,128,128,128,128,105,128,128 +inotify_add_watch,142,292,254,254,317,27,285,244,248,270,270,276,276,27,285,285 +inotify_init,143,291,253,253,316,__PNR_inotify_init,284,243,247,269,269,275,275,__PNR_inotify_init,284,284 +inotify_init1,144,332,294,294,360,26,329,288,292,314,314,318,318,26,324,324 +inotify_rm_watch,145,293,255,255,318,28,286,245,249,271,271,277,277,28,286,286 +io_cancel,146,249,210,210,247,3,245,204,204,219,219,231,231,3,247,247 +ioctl,147,54,16,514,54,29,54,15,15,54,54,54,54,29,54,54 +io_destroy,148,246,207,207,244,1,242,201,201,216,216,228,228,1,244,244 +io_getevents,149,247,208,208,245,4,243,202,202,217,217,229,229,4,245,245 +ioperm,150,101,173,173,__PNR_ioperm,__PNR_ioperm,101,__PNR_ioperm,__PNR_ioperm,__PNR_ioperm,__PNR_ioperm,101,101,__PNR_ioperm,101,__PNR_ioperm +io_pgetevents,151,385,333,333,399,292,368,328,332,350,350,388,388,292,382,382 +io_pgetevents_time64,152,416,__PNR_io_pgetevents_time64,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,416,416,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64 +iopl,153,110,172,172,__PNR_iopl,__PNR_iopl,110,__PNR_iopl,__PNR_iopl,__PNR_iopl,__PNR_iopl,110,110,__PNR_iopl,__PNR_iopl,__PNR_iopl +ioprio_get,154,290,252,252,315,31,315,274,278,268,268,274,274,31,283,283 +ioprio_set,155,289,251,251,314,30,314,273,277,267,267,273,273,30,282,282 +io_setup,156,245,206,543,243,0,241,200,200,215,215,227,227,0,243,243 +io_submit,157,248,209,544,246,2,244,203,203,218,218,230,230,2,246,246 +io_uring_enter,158,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426 +io_uring_register,159,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427 +io_uring_setup,160,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425 +ipc,161,117,__PNR_ipc,__PNR_ipc,__PNR_ipc,__PNR_ipc,117,__PNR_ipc,__PNR_ipc,__PNR_ipc,__PNR_ipc,117,117,__PNR_ipc,117,117 +kcmp,162,349,312,312,378,272,347,306,311,332,332,354,354,272,343,343 +kexec_file_load,163,__PNR_kexec_file_load,320,320,401,294,__PNR_kexec_file_load,__PNR_kexec_file_load,__PNR_kexec_file_load,355,355,382,382,294,381,381 +kexec_load,164,283,246,528,347,104,311,270,274,300,300,268,268,104,277,277 +keyctl,165,288,250,250,311,219,282,241,245,266,266,271,271,219,280,280 +kill,166,37,62,62,37,129,37,60,60,37,37,37,37,129,37,37 +lchown,167,16,94,94,16,__PNR_lchown,16,92,92,16,16,16,16,__PNR_lchown,16,198 +lchown32,168,198,__PNR_lchown32,__PNR_lchown32,198,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,198,__PNR_lchown32 +lgetxattr,169,230,192,192,230,9,228,184,184,242,242,213,213,9,228,228 +link,170,9,86,86,9,__PNR_link,9,84,84,9,9,9,9,__PNR_link,9,9 +linkat,171,303,265,265,330,37,296,255,259,283,283,294,294,37,296,296 +listen,172,363,50,50,284,201,174,49,49,32,32,329,329,201,363,363 +listxattr,173,232,194,194,232,11,230,186,186,244,244,215,215,11,230,230 +llistxattr,174,233,195,195,233,12,231,187,187,245,245,216,216,12,231,231 +_llseek,175,140,__PNR__llseek,__PNR__llseek,140,__PNR__llseek,140,__PNR__llseek,__PNR__llseek,140,140,140,140,__PNR__llseek,140,__PNR__llseek +lock,176,53,__PNR_lock,__PNR_lock,__PNR_lock,__PNR_lock,53,__PNR_lock,__PNR_lock,__PNR_lock,__PNR_lock,53,53,__PNR_lock,__PNR_lock,__PNR_lock +lookup_dcookie,177,253,212,212,249,18,247,206,206,223,223,235,235,18,110,110 +lremovexattr,178,236,198,198,236,15,234,190,190,248,248,219,219,15,234,234 +lseek,179,19,8,8,19,62,19,8,8,19,19,19,19,62,19,19 +lsetxattr,180,227,189,189,227,6,225,181,181,239,239,210,210,6,225,225 +lstat,181,107,6,6,107,__PNR_lstat,107,6,6,84,84,107,107,__PNR_lstat,107,107 +lstat64,182,196,__PNR_lstat64,__PNR_lstat64,196,__PNR_lstat64,214,__PNR_lstat64,__PNR_lstat64,198,198,196,__PNR_lstat64,__PNR_lstat64,196,__PNR_lstat64 +madvise,183,219,28,28,220,233,218,27,27,119,119,205,205,233,219,219 +mbind,184,274,237,237,319,235,268,227,231,260,260,259,259,235,268,268 +membarrier,185,375,324,324,389,283,358,318,322,343,343,365,365,283,356,356 +memfd_create,186,356,319,319,385,279,354,314,318,340,340,360,360,279,350,350 +migrate_pages,187,294,256,256,400,238,287,246,250,272,272,258,258,238,287,287 +mincore,188,218,27,27,219,232,217,26,26,72,72,206,206,232,218,218 +mkdir,189,39,83,83,39,__PNR_mkdir,39,81,81,39,39,39,39,__PNR_mkdir,39,39 +mkdirat,190,296,258,258,323,34,289,248,252,276,276,287,287,34,289,289 +mknod,191,14,133,133,14,__PNR_mknod,14,131,131,14,14,14,14,__PNR_mknod,14,14 +mknodat,192,297,259,259,324,33,290,249,253,277,277,288,288,33,290,290 +mlock,193,150,149,149,150,228,154,146,146,150,150,150,150,228,150,150 +mlock2,194,376,325,325,390,284,359,319,323,345,345,378,378,284,374,374 +mlockall,195,152,151,151,152,230,156,148,148,152,152,152,152,230,152,152 +mmap,196,90,9,9,__PNR_mmap,222,90,9,9,90,90,90,90,222,90,90 +mmap2,197,192,__PNR_mmap2,__PNR_mmap2,192,__PNR_mmap2,210,__PNR_mmap2,__PNR_mmap2,89,89,192,__PNR_mmap2,__PNR_mmap2,192,__PNR_mmap2 +modify_ldt,198,123,154,154,__PNR_modify_ldt,__PNR_modify_ldt,123,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt,123,123,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt +mount,199,21,165,165,21,40,21,160,160,21,21,21,21,40,21,21 +move_mount,200,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429 +move_pages,201,317,279,533,344,239,308,267,271,295,295,301,301,239,310,310 +mprotect,202,125,10,10,125,226,125,10,10,125,125,125,125,226,125,125 +mpx,203,56,__PNR_mpx,__PNR_mpx,__PNR_mpx,__PNR_mpx,56,__PNR_mpx,__PNR_mpx,__PNR_mpx,__PNR_mpx,56,56,__PNR_mpx,__PNR_mpx,__PNR_mpx +mq_getsetattr,204,282,245,245,279,185,276,235,239,234,234,267,267,185,276,276 +mq_notify,205,281,244,527,278,184,275,234,238,233,233,266,266,184,275,275 +mq_open,206,277,240,240,274,180,271,230,234,229,229,262,262,180,271,271 +mq_timedreceive,207,280,243,243,277,183,274,233,237,232,232,265,265,183,274,274 +mq_timedreceive_time64,208,419,__PNR_mq_timedreceive_time64,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,419,419,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64 +mq_timedsend,209,279,242,242,276,182,273,232,236,231,231,264,264,182,273,273 +mq_timedsend_time64,210,418,__PNR_mq_timedsend_time64,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,418,418,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64 +mq_unlink,211,278,241,241,275,181,272,231,235,230,230,263,263,181,272,272 +mremap,212,163,25,25,163,216,167,24,24,163,163,163,163,216,163,163 +msgctl,213,402,71,71,304,187,402,69,69,191,191,402,402,187,402,402 +msgget,214,399,68,68,303,186,399,66,66,190,190,399,399,186,399,399 +msgrcv,215,401,70,70,302,188,401,68,68,189,189,401,401,188,401,401 +msgsnd,216,400,69,69,301,189,400,67,67,188,188,400,400,189,400,400 +msync,217,144,26,26,144,227,144,25,25,144,144,144,144,227,144,144 +multiplexer,218,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,201,201,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer +munlock,219,151,150,150,151,229,155,147,147,151,151,151,151,229,151,151 +munlockall,220,153,152,152,153,231,157,149,149,153,153,153,153,231,153,153 +munmap,221,91,11,11,91,215,91,11,11,91,91,91,91,215,91,91 +name_to_handle_at,222,341,303,303,370,264,339,298,303,325,325,345,345,264,335,335 +nanosleep,223,162,35,35,162,101,166,34,34,162,162,162,162,101,162,162 +newfstatat,224,__PNR_newfstatat,262,262,__PNR_newfstatat,79,__PNR_newfstatat,252,256,__PNR_newfstatat,__PNR_newfstatat,__PNR_newfstatat,291,79,__PNR_newfstatat,293 +_newselect,225,142,__PNR__newselect,__PNR__newselect,142,__PNR__newselect,142,22,22,142,142,142,142,__PNR__newselect,142,__PNR__newselect +nfsservctl,226,169,180,__PNR_nfsservctl,169,42,189,173,173,__PNR_nfsservctl,__PNR_nfsservctl,168,168,42,169,169 +nice,227,34,__PNR_nice,__PNR_nice,34,__PNR_nice,34,__PNR_nice,__PNR_nice,34,34,34,34,__PNR_nice,34,34 +oldfstat,228,28,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,28,28,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat +oldlstat,229,84,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,84,84,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat +oldolduname,230,59,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,59,59,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname +oldstat,231,18,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,18,18,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat +olduname,232,109,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,109,109,__PNR_olduname,__PNR_olduname,__PNR_olduname +open,233,5,2,2,5,__PNR_open,5,2,2,5,5,5,5,__PNR_open,5,5 +openat,234,295,257,257,322,56,288,247,251,275,275,286,286,56,288,288 +openat2,235,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437 +open_by_handle_at,236,342,304,304,371,265,340,299,304,326,326,346,346,265,336,336 +open_tree,237,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428 +pause,238,29,34,34,29,__PNR_pause,29,33,33,29,29,29,29,__PNR_pause,29,29 +pciconfig_iobase,239,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,271,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,200,200,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase +pciconfig_read,240,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,272,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,198,198,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read +pciconfig_write,241,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,273,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,199,199,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write +perf_event_open,242,336,298,298,364,241,333,292,296,318,318,319,319,241,331,331 +personality,243,136,135,135,136,92,136,132,132,136,136,136,136,92,136,136 +pidfd_getfd,244,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438 +pidfd_open,245,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434 +pidfd_send_signal,246,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424 +pipe,247,42,22,22,42,__PNR_pipe,42,21,21,42,42,42,42,__PNR_pipe,42,42 +pipe2,248,331,293,293,359,59,328,287,291,313,313,317,317,59,325,325 +pivot_root,249,217,155,155,218,41,216,151,151,67,67,203,203,41,217,217 +pkey_alloc,250,381,330,330,395,289,364,324,328,352,352,384,384,289,385,385 +pkey_free,251,382,331,331,396,290,365,325,329,353,353,385,385,290,386,386 +pkey_mprotect,252,380,329,329,394,288,363,323,327,351,351,386,386,288,384,384 +poll,253,168,7,7,168,__PNR_poll,188,7,7,168,168,167,167,__PNR_poll,168,168 +ppoll,254,309,271,271,336,73,302,261,265,274,274,281,281,73,302,302 +ppoll_time64,255,414,__PNR_ppoll_time64,__PNR_ppoll_time64,414,__PNR_ppoll_time64,414,__PNR_ppoll_time64,414,414,__PNR_ppoll_time64,414,__PNR_ppoll_time64,__PNR_ppoll_time64,414,__PNR_ppoll_time64 +prctl,256,172,157,157,172,167,192,153,153,172,172,171,171,167,172,172 +pread64,257,180,17,17,180,67,200,16,16,108,108,179,179,67,180,180 +preadv,258,333,295,534,361,69,330,289,293,315,315,320,320,69,328,328 +preadv2,259,378,327,546,392,286,361,321,325,347,347,380,380,286,376,376 +prlimit64,260,340,302,302,369,261,338,297,302,321,321,325,325,261,334,334 +process_vm_readv,261,347,310,539,376,270,345,304,309,330,330,351,351,270,340,340 +process_vm_writev,262,348,311,540,377,271,346,305,310,331,331,352,352,271,341,341 +prof,263,44,__PNR_prof,__PNR_prof,__PNR_prof,__PNR_prof,44,__PNR_prof,__PNR_prof,__PNR_prof,__PNR_prof,44,44,__PNR_prof,__PNR_prof,__PNR_prof +profil,264,98,__PNR_profil,__PNR_profil,__PNR_profil,__PNR_profil,98,__PNR_profil,__PNR_profil,__PNR_profil,__PNR_profil,98,98,__PNR_profil,__PNR_profil,__PNR_profil +pselect6,265,308,270,270,335,72,301,260,264,273,273,280,280,72,301,301 +pselect6_time64,266,413,__PNR_pselect6_time64,__PNR_pselect6_time64,413,__PNR_pselect6_time64,413,__PNR_pselect6_time64,413,413,__PNR_pselect6_time64,413,__PNR_pselect6_time64,__PNR_pselect6_time64,413,__PNR_pselect6_time64 +ptrace,267,26,101,521,26,117,26,99,99,26,26,26,26,117,26,26 +putpmsg,268,189,182,182,__PNR_putpmsg,__PNR_putpmsg,209,175,175,__PNR_putpmsg,__PNR_putpmsg,188,188,__PNR_putpmsg,189,189 +pwrite64,269,181,18,18,181,68,201,17,17,109,109,180,180,68,181,181 +pwritev,270,334,296,535,362,70,331,290,294,316,316,321,321,70,329,329 +pwritev2,271,379,328,547,393,287,362,322,326,348,348,381,381,287,377,377 +query_module,272,167,178,__PNR_query_module,__PNR_query_module,__PNR_query_module,187,171,171,__PNR_query_module,__PNR_query_module,166,166,__PNR_query_module,167,167 +quotactl,273,131,179,179,131,60,131,172,172,131,131,131,131,60,131,131 +read,274,3,0,0,3,63,3,0,0,3,3,3,3,63,3,3 +readahead,275,225,187,187,225,213,223,179,179,207,207,191,191,213,222,222 +readdir,276,89,__PNR_readdir,__PNR_readdir,__PNR_readdir,__PNR_readdir,89,__PNR_readdir,__PNR_readdir,__PNR_readdir,__PNR_readdir,89,89,__PNR_readdir,89,89 +readlink,277,85,89,89,85,__PNR_readlink,85,87,87,85,85,85,85,__PNR_readlink,85,85 +readlinkat,278,305,267,267,332,78,298,257,261,285,285,296,296,78,298,298 +readv,279,145,19,515,145,65,145,18,18,145,145,145,145,65,145,145 +reboot,280,88,169,169,88,142,88,164,164,88,88,88,88,142,88,88 +recv,281,__PNR_recv,__PNR_recv,__PNR_recv,291,__PNR_recv,175,__PNR_recv,__PNR_recv,98,98,336,336,__PNR_recv,__PNR_recv,__PNR_recv +recvfrom,282,371,45,517,292,207,176,44,44,123,123,337,337,207,371,371 +recvmmsg,283,337,299,537,365,243,335,294,298,319,319,343,343,243,357,357 +recvmmsg_time64,284,417,__PNR_recvmmsg_time64,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,417,417,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64 +recvmsg,285,372,47,519,297,212,177,46,46,184,184,342,342,212,372,372 +remap_file_pages,286,257,216,216,253,234,251,210,210,227,227,239,239,234,267,267 +removexattr,287,235,197,197,235,14,233,189,189,247,247,218,218,14,233,233 +rename,288,38,82,82,38,__PNR_rename,38,80,80,38,38,38,38,__PNR_rename,38,38 +renameat,289,302,264,264,329,38,295,254,258,282,282,293,293,__PNR_renameat,295,295 +renameat2,290,353,316,316,382,276,351,311,315,337,337,357,357,276,347,347 +request_key,291,287,249,249,310,218,281,240,244,265,265,270,270,218,279,279 +restart_syscall,292,0,219,219,0,128,253,213,214,0,0,0,0,128,7,7 +riscv_flush_icache,293,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,259,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache +rmdir,294,40,84,84,40,__PNR_rmdir,40,82,82,40,40,40,40,__PNR_rmdir,40,40 +rseq,295,386,334,334,398,293,367,327,331,354,354,387,387,293,383,383 +rtas,296,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,255,255,__PNR_rtas,__PNR_rtas,__PNR_rtas +rt_sigaction,297,174,13,512,174,134,194,13,13,174,174,173,173,134,174,174 +rt_sigpending,298,176,127,522,176,136,196,125,125,176,176,175,175,136,176,176 +rt_sigprocmask,299,175,14,14,175,135,195,14,14,175,175,174,174,135,175,175 +rt_sigqueueinfo,300,178,129,524,178,138,198,127,127,178,178,177,177,138,178,178 +rt_sigreturn,301,173,15,513,173,139,193,211,211,173,173,172,172,139,173,173 +rt_sigsuspend,302,179,130,130,179,133,199,128,128,179,179,178,178,133,179,179 +rt_sigtimedwait,303,177,128,523,177,137,197,126,126,177,177,176,176,137,177,177 +rt_sigtimedwait_time64,304,421,__PNR_rt_sigtimedwait_time64,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,421,421,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64 +rt_tgsigqueueinfo,305,335,297,536,363,240,332,291,295,317,317,322,322,240,330,330 +s390_guarded_storage,306,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,378,378 +s390_pci_mmio_read,307,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,353,353 +s390_pci_mmio_write,308,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,352,352 +s390_runtime_instr,309,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,342,342 +s390_sthyi,310,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,380,380 +sched_getaffinity,311,242,204,204,242,123,240,196,196,212,212,223,223,123,240,240 +sched_getattr,312,352,315,315,381,275,350,310,314,335,335,356,356,275,346,346 +sched_getparam,313,155,143,143,155,121,159,140,140,155,155,155,155,121,155,155 +sched_get_priority_max,314,159,146,146,159,125,163,143,143,159,159,159,159,125,159,159 +sched_get_priority_min,315,160,147,147,160,126,164,144,144,160,160,160,160,126,160,160 +sched_getscheduler,316,157,145,145,157,120,161,142,142,157,157,157,157,120,157,157 +sched_rr_get_interval,317,161,148,148,161,127,165,145,145,161,161,161,161,127,161,161 +sched_rr_get_interval_time64,318,423,__PNR_sched_rr_get_interval_time64,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,423,423,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64 +sched_setaffinity,319,241,203,203,241,122,239,195,195,211,211,222,222,122,239,239 +sched_setattr,320,351,314,314,380,274,349,309,313,334,334,355,355,274,345,345 +sched_setparam,321,154,142,142,154,118,158,139,139,154,154,154,154,118,154,154 +sched_setscheduler,322,156,144,144,156,119,160,141,141,156,156,156,156,119,156,156 +sched_yield,323,158,24,24,158,124,162,23,23,158,158,158,158,124,158,158 +seccomp,324,354,317,317,383,277,352,312,316,338,338,358,358,277,348,348 +security,325,__PNR_security,185,185,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security +select,326,82,23,23,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,82,82,__PNR_select,__PNR_select,142 +semctl,327,394,66,66,300,191,394,64,64,187,187,394,394,191,394,394 +semget,328,393,64,64,299,190,393,62,62,186,186,393,393,190,393,393 +semop,329,__PNR_semop,65,65,298,193,__PNR_semop,63,63,185,185,__PNR_semop,__PNR_semop,193,__PNR_semop,__PNR_semop +semtimedop,330,__PNR_semtimedop,220,220,312,192,__PNR_semtimedop,214,215,228,228,__PNR_semtimedop,392,192,__PNR_semtimedop,392 +semtimedop_time64,331,420,__PNR_semtimedop_time64,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,420,420,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64 +send,332,__PNR_send,__PNR_send,__PNR_send,289,__PNR_send,178,__PNR_send,__PNR_send,58,58,334,334,__PNR_send,__PNR_send,__PNR_send +sendfile,333,187,40,40,187,71,207,39,39,122,122,186,186,71,187,187 +sendfile64,334,239,__PNR_sendfile64,__PNR_sendfile64,239,__PNR_sendfile64,237,__PNR_sendfile64,219,209,209,226,__PNR_sendfile64,__PNR_sendfile64,223,__PNR_sendfile64 +sendmmsg,335,345,307,538,374,269,343,302,307,329,329,349,349,269,358,358 +sendmsg,336,370,46,518,296,211,179,45,45,183,183,341,341,211,370,370 +sendto,337,369,44,44,290,206,180,43,43,82,82,335,335,206,369,369 +setdomainname,338,121,171,171,121,162,121,166,166,121,121,121,121,162,121,121 +setfsgid,339,139,123,123,139,152,139,121,121,139,139,139,139,152,139,216 +setfsgid32,340,216,__PNR_setfsgid32,__PNR_setfsgid32,216,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,216,__PNR_setfsgid32 +setfsuid,341,138,122,122,138,151,138,120,120,138,138,138,138,151,138,215 +setfsuid32,342,215,__PNR_setfsuid32,__PNR_setfsuid32,215,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,215,__PNR_setfsuid32 +setgid,343,46,106,106,46,144,46,104,104,46,46,46,46,144,46,214 +setgid32,344,214,__PNR_setgid32,__PNR_setgid32,214,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,214,__PNR_setgid32 +setgroups,345,81,116,116,81,159,81,114,114,81,81,81,81,159,81,206 +setgroups32,346,206,__PNR_setgroups32,__PNR_setgroups32,206,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,206,__PNR_setgroups32 +sethostname,347,74,170,170,74,161,74,165,165,74,74,74,74,161,74,74 +setitimer,348,104,38,38,104,103,104,36,36,104,104,104,104,103,104,104 +set_mempolicy,349,276,238,238,321,237,270,229,233,262,262,261,261,237,270,270 +setns,350,346,308,308,375,268,344,303,308,328,328,350,350,268,339,339 +setpgid,351,57,109,109,57,154,57,107,107,57,57,57,57,154,57,57 +setpriority,352,97,141,141,97,140,97,138,138,97,97,97,97,140,97,97 +setregid,353,71,114,114,71,143,71,112,112,71,71,71,71,143,71,204 +setregid32,354,204,__PNR_setregid32,__PNR_setregid32,204,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,204,__PNR_setregid32 +setresgid,355,170,119,119,170,149,190,117,117,170,170,169,169,149,170,210 +setresgid32,356,210,__PNR_setresgid32,__PNR_setresgid32,210,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,210,__PNR_setresgid32 +setresuid,357,164,117,117,164,147,185,115,115,164,164,164,164,147,164,208 +setresuid32,358,208,__PNR_setresuid32,__PNR_setresuid32,208,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,208,__PNR_setresuid32 +setreuid,359,70,113,113,70,145,70,111,111,70,70,70,70,145,70,203 +setreuid32,360,203,__PNR_setreuid32,__PNR_setreuid32,203,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,203,__PNR_setreuid32 +setrlimit,361,75,160,160,75,164,75,155,155,75,75,75,75,164,75,75 +set_robust_list,362,311,273,530,338,99,309,268,272,289,289,300,300,99,304,304 +setsid,363,66,112,112,66,157,66,110,110,66,66,66,66,157,66,66 +setsockopt,364,366,54,541,294,208,181,53,53,181,181,339,339,208,366,366 +set_thread_area,365,243,205,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,283,242,246,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area +set_tid_address,366,258,218,218,256,96,252,212,213,237,237,232,232,96,252,252 +settimeofday,367,79,164,164,79,170,79,159,159,79,79,79,79,170,79,79 +set_tls,368,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,983045,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls +setuid,369,23,105,105,23,146,23,103,103,23,23,23,23,146,23,213 +setuid32,370,213,__PNR_setuid32,__PNR_setuid32,213,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,213,__PNR_setuid32 +setxattr,371,226,188,188,226,5,224,180,180,238,238,209,209,5,224,224 +sgetmask,372,68,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask,68,__PNR_sgetmask,__PNR_sgetmask,68,68,68,68,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask +shmat,373,397,30,30,305,196,397,29,29,192,192,397,397,196,397,397 +shmctl,374,396,31,31,308,195,396,30,30,195,195,396,396,195,396,396 +shmdt,375,398,67,67,306,197,398,65,65,193,193,398,398,197,398,398 +shmget,376,395,29,29,307,194,395,28,28,194,194,395,395,194,395,395 +shutdown,377,373,48,48,293,210,182,47,47,117,117,338,338,210,373,373 +sigaction,378,67,__PNR_sigaction,__PNR_sigaction,67,__PNR_sigaction,67,__PNR_sigaction,__PNR_sigaction,__PNR_sigaction,__PNR_sigaction,67,67,__PNR_sigaction,67,67 +sigaltstack,379,186,131,525,186,132,206,129,129,166,166,185,185,132,186,186 +signal,380,48,__PNR_signal,__PNR_signal,__PNR_signal,__PNR_signal,48,__PNR_signal,__PNR_signal,48,48,48,48,__PNR_signal,48,48 +signalfd,381,321,282,282,349,__PNR_signalfd,317,276,280,302,302,305,305,__PNR_signalfd,316,316 +signalfd4,382,327,289,289,355,74,324,283,287,309,309,313,313,74,322,322 +sigpending,383,73,__PNR_sigpending,__PNR_sigpending,73,__PNR_sigpending,73,__PNR_sigpending,__PNR_sigpending,73,73,73,73,__PNR_sigpending,73,73 +sigprocmask,384,126,__PNR_sigprocmask,__PNR_sigprocmask,126,__PNR_sigprocmask,126,__PNR_sigprocmask,__PNR_sigprocmask,126,126,126,126,__PNR_sigprocmask,126,126 +sigreturn,385,119,__PNR_sigreturn,__PNR_sigreturn,119,__PNR_sigreturn,119,__PNR_sigreturn,__PNR_sigreturn,__PNR_sigreturn,__PNR_sigreturn,119,119,__PNR_sigreturn,119,119 +sigsuspend,386,72,__PNR_sigsuspend,__PNR_sigsuspend,72,__PNR_sigsuspend,72,__PNR_sigsuspend,__PNR_sigsuspend,__PNR_sigsuspend,__PNR_sigsuspend,72,72,__PNR_sigsuspend,72,72 +socket,387,359,41,41,281,198,183,40,40,17,17,326,326,198,359,359 +socketcall,388,102,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,102,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,102,102,__PNR_socketcall,102,102 +socketpair,389,360,53,53,288,199,184,52,52,56,56,333,333,199,360,360 +splice,390,313,275,275,340,76,304,263,267,291,291,283,283,76,306,306 +spu_create,391,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,279,279,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create +spu_run,392,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,278,278,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run +ssetmask,393,69,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask,69,__PNR_ssetmask,__PNR_ssetmask,69,69,69,69,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask +stat,394,106,4,4,106,__PNR_stat,106,4,4,18,18,106,106,__PNR_stat,106,106 +stat64,395,195,__PNR_stat64,__PNR_stat64,195,__PNR_stat64,213,__PNR_stat64,__PNR_stat64,101,101,195,__PNR_stat64,__PNR_stat64,195,__PNR_stat64 +statfs,396,99,137,137,99,43,99,134,134,99,99,99,99,43,99,99 +statfs64,397,268,__PNR_statfs64,__PNR_statfs64,266,__PNR_statfs64,255,__PNR_statfs64,217,298,298,252,252,__PNR_statfs64,265,265 +statx,398,383,332,332,397,291,366,326,330,349,349,383,383,291,379,379 +stime,399,25,__PNR_stime,__PNR_stime,__PNR_stime,__PNR_stime,25,__PNR_stime,__PNR_stime,25,25,25,25,__PNR_stime,25,__PNR_stime +stty,400,31,__PNR_stty,__PNR_stty,__PNR_stty,__PNR_stty,31,__PNR_stty,__PNR_stty,__PNR_stty,__PNR_stty,31,31,__PNR_stty,__PNR_stty,__PNR_stty +subpage_prot,401,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,310,310,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot +swapcontext,402,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,249,249,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext +swapoff,403,115,168,168,115,225,115,163,163,115,115,115,115,225,115,115 +swapon,404,87,167,167,87,224,87,162,162,87,87,87,87,224,87,87 +switch_endian,405,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,363,363,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian +symlink,406,83,88,88,83,__PNR_symlink,83,86,86,83,83,83,83,__PNR_symlink,83,83 +symlinkat,407,304,266,266,331,36,297,256,260,284,284,295,295,36,297,297 +sync,408,36,162,162,36,81,36,157,157,36,36,36,36,81,36,36 +sync_file_range,409,314,277,277,__PNR_sync_file_range,84,305,264,268,292,292,__PNR_sync_file_range,__PNR_sync_file_range,84,307,307 +sync_file_range2,410,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,308,308,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2 +syncfs,411,344,306,306,373,267,342,301,306,327,327,348,348,267,338,338 +syscall,412,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,0,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall +_sysctl,413,149,156,__PNR__sysctl,149,__PNR__sysctl,153,152,152,149,149,149,149,__PNR__sysctl,149,149 +sys_debug_setcontext,414,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,256,256,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext +sysfs,415,135,139,139,135,__PNR_sysfs,135,136,136,135,135,135,135,__PNR_sysfs,135,135 +sysinfo,416,116,99,99,116,179,116,97,97,116,116,116,116,179,116,116 +syslog,417,103,103,103,103,116,103,101,101,103,103,103,103,116,103,103 +sysmips,418,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,149,199,199,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips +tee,419,315,276,276,342,77,306,265,269,293,293,284,284,77,308,308 +tgkill,420,270,234,234,268,131,266,225,229,259,259,250,250,131,241,241 +time,421,13,201,201,__PNR_time,__PNR_time,13,__PNR_time,__PNR_time,13,13,13,13,__PNR_time,13,__PNR_time +timer_create,422,259,222,526,257,107,257,216,220,250,250,240,240,107,254,254 +timer_delete,423,263,226,226,261,111,261,220,224,254,254,244,244,111,258,258 +timerfd,424,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,318,277,281,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,317,317 +timerfd_create,425,322,283,283,350,85,321,280,284,306,306,306,306,85,319,319 +timerfd_gettime,426,326,287,287,354,87,322,281,285,308,308,312,312,87,321,321 +timerfd_gettime64,427,410,__PNR_timerfd_gettime64,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,410,410,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64 +timerfd_settime,428,325,286,286,353,86,323,282,286,307,307,311,311,86,320,320 +timerfd_settime64,429,411,__PNR_timerfd_settime64,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,411,411,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64 +timer_getoverrun,430,262,225,225,260,109,260,219,223,253,253,243,243,109,257,257 +timer_gettime,431,261,224,224,259,108,259,218,222,252,252,242,242,108,256,256 +timer_gettime64,432,408,__PNR_timer_gettime64,__PNR_timer_gettime64,408,__PNR_timer_gettime64,408,__PNR_timer_gettime64,408,408,__PNR_timer_gettime64,408,__PNR_timer_gettime64,__PNR_timer_gettime64,408,__PNR_timer_gettime64 +timer_settime,433,260,223,223,258,110,258,217,221,251,251,241,241,110,255,255 +timer_settime64,434,409,__PNR_timer_settime64,__PNR_timer_settime64,409,__PNR_timer_settime64,409,__PNR_timer_settime64,409,409,__PNR_timer_settime64,409,__PNR_timer_settime64,__PNR_timer_settime64,409,__PNR_timer_settime64 +times,435,43,100,100,43,153,43,98,98,43,43,43,43,153,43,43 +tkill,436,238,200,200,238,130,236,192,192,208,208,208,208,130,237,237 +truncate,437,92,76,76,92,45,92,74,74,92,92,92,92,45,92,92 +truncate64,438,193,__PNR_truncate64,__PNR_truncate64,193,__PNR_truncate64,211,__PNR_truncate64,__PNR_truncate64,199,199,193,__PNR_truncate64,__PNR_truncate64,193,__PNR_truncate64 +tuxcall,439,__PNR_tuxcall,184,184,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,225,225,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall +ugetrlimit,440,191,__PNR_ugetrlimit,__PNR_ugetrlimit,191,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,190,190,__PNR_ugetrlimit,191,__PNR_ugetrlimit +ulimit,441,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,58,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit +umask,442,60,95,95,60,166,60,93,93,60,60,60,60,166,60,60 +umount,443,22,__PNR_umount,__PNR_umount,__PNR_umount,__PNR_umount,22,__PNR_umount,__PNR_umount,__PNR_umount,__PNR_umount,22,22,__PNR_umount,22,22 +umount2,444,52,166,166,52,39,52,161,161,52,52,52,52,39,52,52 +uname,445,122,63,63,122,160,122,61,61,59,59,122,122,160,122,122 +unlink,446,10,87,87,10,__PNR_unlink,10,85,85,10,10,10,10,__PNR_unlink,10,10 +unlinkat,447,301,263,263,328,35,294,253,257,281,281,292,292,35,294,294 +unshare,448,310,272,272,337,97,303,262,266,288,288,282,282,97,303,303 +uselib,449,86,134,__PNR_uselib,86,__PNR_uselib,86,__PNR_uselib,__PNR_uselib,86,86,86,86,__PNR_uselib,86,86 +userfaultfd,450,374,323,323,388,282,357,317,321,344,344,364,364,282,355,355 +usr26,451,__PNR_usr26,__PNR_usr26,__PNR_usr26,983043,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26 +usr32,452,__PNR_usr32,__PNR_usr32,__PNR_usr32,983044,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32 +ustat,453,62,136,136,62,__PNR_ustat,62,133,133,62,62,62,62,__PNR_ustat,62,62 +utime,454,30,132,132,__PNR_utime,__PNR_utime,30,130,130,30,30,30,30,__PNR_utime,30,30 +utimensat,455,320,280,280,348,88,316,275,279,301,301,304,304,88,315,315 +utimensat_time64,456,412,__PNR_utimensat_time64,__PNR_utimensat_time64,412,__PNR_utimensat_time64,412,__PNR_utimensat_time64,412,412,__PNR_utimensat_time64,412,__PNR_utimensat_time64,__PNR_utimensat_time64,412,__PNR_utimensat_time64 +utimes,457,271,235,235,269,__PNR_utimes,267,226,230,336,336,251,251,__PNR_utimes,313,313 +vfork,458,190,58,58,190,__PNR_vfork,__PNR_vfork,__PNR_vfork,__PNR_vfork,113,113,189,189,__PNR_vfork,190,190 +vhangup,459,111,153,153,111,58,111,150,150,111,111,111,111,58,111,111 +vm86,460,166,__PNR_vm86,__PNR_vm86,__PNR_vm86,__PNR_vm86,113,__PNR_vm86,__PNR_vm86,__PNR_vm86,__PNR_vm86,113,113,__PNR_vm86,__PNR_vm86,__PNR_vm86 +vm86old,461,113,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old +vmsplice,462,316,278,532,343,75,307,266,270,294,294,285,285,75,309,309 +vserver,463,273,236,__PNR_vserver,313,__PNR_vserver,277,236,240,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver +wait4,464,114,61,61,114,260,114,59,59,114,114,114,114,260,114,114 +waitid,465,284,247,529,280,95,278,237,241,235,235,272,272,95,281,281 +waitpid,466,7,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid,7,__PNR_waitpid,__PNR_waitpid,7,7,7,7,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid +write,467,4,1,1,4,64,4,1,1,4,4,4,4,64,4,4 +writev,468,146,20,516,146,66,146,19,19,146,146,146,146,66,146,146 +%% + +static int syscall_get_offset_value(const struct arch_syscall_table *s, + int offset) +{ + return *(int *)((char *)s + offset); +} + +int syscall_resolve_name(const char *name, int offset) +{ + const struct arch_syscall_table *s; + + s = in_word_set(name, strlen(name)); + if (s == NULL) + return __NR_SCMP_ERROR; + + return syscall_get_offset_value(s, offset); +} + +const char *syscall_resolve_num(int num, int offset) +{ + unsigned int iter; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (syscall_get_offset_value(&wordlist[iter], offset) == num) + return (stringpool + wordlist[iter].name); + } + + return NULL; +} + +const struct arch_syscall_def *syscall_iterate(unsigned int spot, int offset) +{ + unsigned int iter; + /* this is thread-unsafe, only use for testing */ + static struct arch_syscall_def arch_def; + + arch_def.name = NULL; + arch_def.num = __NR_SCMP_ERROR; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (wordlist[iter].index == spot) { + arch_def.name = stringpool + wordlist[iter].name; + arch_def.num = syscall_get_offset_value(&wordlist[iter], + offset); + return &arch_def; + } + } + + return &arch_def; +} diff -Nru libseccomp-2.4.3/src/syscalls.perf.c libseccomp-2.5.1/src/syscalls.perf.c --- libseccomp-2.4.3/src/syscalls.perf.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.perf.c 2020-11-17 10:17:51.915859272 +1030 @@ -0,0 +1,3514 @@ +/* ANSI-C code produced by gperf version 3.1 */ +/* Command-line: gperf -m 100 --null-strings --pic -tCEG -T -S1 syscalls.perf */ +/* Computed positions: -k'1-2,4-9,$' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 1 "syscalls.perf" + +/** + * Copyright (c) 2012 Red Hat + * Copyright (c) 2020 Red Hat + * Authors: Paul Moore + * Giuseppe Scrivano + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include "syscalls.h" + +enum + { + TOTAL_KEYWORDS = 469, + MIN_WORD_LENGTH = 3, + MAX_WORD_LENGTH = 28, + MIN_HASH_VALUE = 31, + MAX_HASH_VALUE = 1640 + }; + +/* maximum key range = 1610, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (register const char *str, register size_t len) +{ + static const unsigned short asso_values[] = + { + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 19, + 260, 39, 345, 1641, 45, 8, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 131, 451, 22, 390, 85, + 9, 10, 9, 9, 509, 16, 180, 234, 26, 103, + 20, 53, 29, 348, 183, 8, 8, 11, 295, 452, + 373, 319, 64, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, 1641, + 1641, 1641, 1641, 1641, 1641, 1641, 1641 + }; + register unsigned int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[8]]; + /*FALLTHROUGH*/ + case 8: + hval += asso_values[(unsigned char)str[7]]; + /*FALLTHROUGH*/ + case 7: + hval += asso_values[(unsigned char)str[6]]; + /*FALLTHROUGH*/ + case 6: + hval += asso_values[(unsigned char)str[5]]; + /*FALLTHROUGH*/ + case 5: + hval += asso_values[(unsigned char)str[4]]; + /*FALLTHROUGH*/ + case 4: + hval += asso_values[(unsigned char)str[3]+1]; + /*FALLTHROUGH*/ + case 3: + case 2: + hval += asso_values[(unsigned char)str[1]]; + /*FALLTHROUGH*/ + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +struct stringpool_t + { + char stringpool_str0[sizeof("tee")]; + char stringpool_str1[sizeof("stat")]; + char stringpool_str2[sizeof("send")]; + char stringpool_str3[sizeof("time")]; + char stringpool_str4[sizeof("idle")]; + char stringpool_str5[sizeof("dup")]; + char stringpool_str6[sizeof("times")]; + char stringpool_str7[sizeof("statfs")]; + char stringpool_str8[sizeof("nice")]; + char stringpool_str9[sizeof("stime")]; + char stringpool_str10[sizeof("ftime")]; + char stringpool_str11[sizeof("utime")]; + char stringpool_str12[sizeof("setsid")]; + char stringpool_str13[sizeof("getsid")]; + char stringpool_str14[sizeof("pipe")]; + char stringpool_str15[sizeof("gettid")]; + char stringpool_str16[sizeof("utimes")]; + char stringpool_str17[sizeof("uname")]; + char stringpool_str18[sizeof("getegid")]; + char stringpool_str19[sizeof("geteuid")]; + char stringpool_str20[sizeof("pause")]; + char stringpool_str21[sizeof("getcpu")]; + char stringpool_str22[sizeof("setfsgid")]; + char stringpool_str23[sizeof("setregid")]; + char stringpool_str24[sizeof("setfsuid")]; + char stringpool_str25[sizeof("setreuid")]; + char stringpool_str26[sizeof("getdents")]; + char stringpool_str27[sizeof("setns")]; + char stringpool_str28[sizeof("semctl")]; + char stringpool_str29[sizeof("ulimit")]; + char stringpool_str30[sizeof("setresgid")]; + char stringpool_str31[sizeof("getresgid")]; + char stringpool_str32[sizeof("setresuid")]; + char stringpool_str33[sizeof("getresuid")]; + char stringpool_str34[sizeof("fsmount")]; + char stringpool_str35[sizeof("getrusage")]; + char stringpool_str36[sizeof("sendfile")]; + char stringpool_str37[sizeof("listen")]; + char stringpool_str38[sizeof("semop")]; + char stringpool_str39[sizeof("linkat")]; + char stringpool_str40[sizeof("faccessat")]; + char stringpool_str41[sizeof("fsconfig")]; + char stringpool_str42[sizeof("socket")]; + char stringpool_str43[sizeof("userfaultfd")]; + char stringpool_str44[sizeof("utimensat")]; + char stringpool_str45[sizeof("newfstatat")]; + char stringpool_str46[sizeof("sigsuspend")]; + char stringpool_str47[sizeof("acct")]; + char stringpool_str48[sizeof("ipc")]; + char stringpool_str49[sizeof("select")]; + char stringpool_str50[sizeof("tuxcall")]; + char stringpool_str51[sizeof("ioctl")]; + char stringpool_str52[sizeof("oldstat")]; + char stringpool_str53[sizeof("close")]; + char stringpool_str54[sizeof("access")]; + char stringpool_str55[sizeof("capset")]; + char stringpool_str56[sizeof("sendto")]; + char stringpool_str57[sizeof("oldfstat")]; + char stringpool_str58[sizeof("usr26")]; + char stringpool_str59[sizeof("signal")]; + char stringpool_str60[sizeof("open")]; + char stringpool_str61[sizeof("signalfd")]; + char stringpool_str62[sizeof("fcntl")]; + char stringpool_str63[sizeof("msgsnd")]; + char stringpool_str64[sizeof("sendmsg")]; + char stringpool_str65[sizeof("sethostname")]; + char stringpool_str66[sizeof("accept")]; + char stringpool_str67[sizeof("io_setup")]; + char stringpool_str68[sizeof("openat")]; + char stringpool_str69[sizeof("msgctl")]; + char stringpool_str70[sizeof("clone")]; + char stringpool_str71[sizeof("fchmod")]; + char stringpool_str72[sizeof("nanosleep")]; + char stringpool_str73[sizeof("iopl")]; + char stringpool_str74[sizeof("rtas")]; + char stringpool_str75[sizeof("setrlimit")]; + char stringpool_str76[sizeof("getrlimit")]; + char stringpool_str77[sizeof("poll")]; + char stringpool_str78[sizeof("read")]; + char stringpool_str79[sizeof("oldolduname")]; + char stringpool_str80[sizeof("ppoll")]; + char stringpool_str81[sizeof("munmap")]; + char stringpool_str82[sizeof("fchmodat")]; + char stringpool_str83[sizeof("mount")]; + char stringpool_str84[sizeof("prof")]; + char stringpool_str85[sizeof("pidfd_getfd")]; + char stringpool_str86[sizeof("oldlstat")]; + char stringpool_str87[sizeof("fsync")]; + char stringpool_str88[sizeof("seccomp")]; + char stringpool_str89[sizeof("timerfd")]; + char stringpool_str90[sizeof("pciconfig_read")]; + char stringpool_str91[sizeof("pciconfig_write")]; + char stringpool_str92[sizeof("pciconfig_iobase")]; + char stringpool_str93[sizeof("clone3")]; + char stringpool_str94[sizeof("semtimedop")]; + char stringpool_str95[sizeof("setdomainname")]; + char stringpool_str96[sizeof("alarm")]; + char stringpool_str97[sizeof("sendmmsg")]; + char stringpool_str98[sizeof("rt_sigsuspend")]; + char stringpool_str99[sizeof("socketcall")]; + char stringpool_str100[sizeof("pidfd_send_signal")]; + char stringpool_str101[sizeof("io_cancel")]; + char stringpool_str102[sizeof("unshare")]; + char stringpool_str103[sizeof("prctl")]; + char stringpool_str104[sizeof("tgkill")]; + char stringpool_str105[sizeof("cachectl")]; + char stringpool_str106[sizeof("mprotect")]; + char stringpool_str107[sizeof("sigreturn")]; + char stringpool_str108[sizeof("profil")]; + char stringpool_str109[sizeof("reboot")]; + char stringpool_str110[sizeof("_sysctl")]; + char stringpool_str111[sizeof("rt_sigpending")]; + char stringpool_str112[sizeof("link")]; + char stringpool_str113[sizeof("connect")]; + char stringpool_str114[sizeof("sched_get_priority_min")]; + char stringpool_str115[sizeof("ioprio_set")]; + char stringpool_str116[sizeof("ioprio_get")]; + char stringpool_str117[sizeof("pidfd_open")]; + char stringpool_str118[sizeof("keyctl")]; + char stringpool_str119[sizeof("dup2")]; + char stringpool_str120[sizeof("fork")]; + char stringpool_str121[sizeof("splice")]; + char stringpool_str122[sizeof("fallocate")]; + char stringpool_str123[sizeof("msync")]; + char stringpool_str124[sizeof("pselect6")]; + char stringpool_str125[sizeof("lock")]; + char stringpool_str126[sizeof("getrandom")]; + char stringpool_str127[sizeof("migrate_pages")]; + char stringpool_str128[sizeof("setresgid32")]; + char stringpool_str129[sizeof("getresgid32")]; + char stringpool_str130[sizeof("setresuid32")]; + char stringpool_str131[sizeof("getresuid32")]; + char stringpool_str132[sizeof("setuid")]; + char stringpool_str133[sizeof("getuid")]; + char stringpool_str134[sizeof("delete_module")]; + char stringpool_str135[sizeof("sysfs")]; + char stringpool_str136[sizeof("socketpair")]; + char stringpool_str137[sizeof("faccessat2")]; + char stringpool_str138[sizeof("syncfs")]; + char stringpool_str139[sizeof("futimesat")]; + char stringpool_str140[sizeof("rt_sigaction")]; + char stringpool_str141[sizeof("rt_sigtimedwait")]; + char stringpool_str142[sizeof("init_module")]; + char stringpool_str143[sizeof("setfsgid32")]; + char stringpool_str144[sizeof("setregid32")]; + char stringpool_str145[sizeof("setfsuid32")]; + char stringpool_str146[sizeof("setreuid32")]; + char stringpool_str147[sizeof("kill")]; + char stringpool_str148[sizeof("move_pages")]; + char stringpool_str149[sizeof("sched_setparam")]; + char stringpool_str150[sizeof("sched_getparam")]; + char stringpool_str151[sizeof("truncate")]; + char stringpool_str152[sizeof("mknod")]; + char stringpool_str153[sizeof("mincore")]; + char stringpool_str154[sizeof("mremap")]; + char stringpool_str155[sizeof("ugetrlimit")]; + char stringpool_str156[sizeof("lookup_dcookie")]; + char stringpool_str157[sizeof("timer_settime")]; + char stringpool_str158[sizeof("timer_gettime")]; + char stringpool_str159[sizeof("timerfd_settime")]; + char stringpool_str160[sizeof("timerfd_gettime")]; + char stringpool_str161[sizeof("eventfd")]; + char stringpool_str162[sizeof("tkill")]; + char stringpool_str163[sizeof("stty")]; + char stringpool_str164[sizeof("gtty")]; + char stringpool_str165[sizeof("exit")]; + char stringpool_str166[sizeof("getpid")]; + char stringpool_str167[sizeof("dup3")]; + char stringpool_str168[sizeof("timer_getoverrun")]; + char stringpool_str169[sizeof("timer_delete")]; + char stringpool_str170[sizeof("sysmips")]; + char stringpool_str171[sizeof("setpgid")]; + char stringpool_str172[sizeof("getpgid")]; + char stringpool_str173[sizeof("copy_file_range")]; + char stringpool_str174[sizeof("mknodat")]; + char stringpool_str175[sizeof("fsopen")]; + char stringpool_str176[sizeof("sync")]; + char stringpool_str177[sizeof("fstat")]; + char stringpool_str178[sizeof("bind")]; + char stringpool_str179[sizeof("ustat")]; + char stringpool_str180[sizeof("bpf")]; + char stringpool_str181[sizeof("getppid")]; + char stringpool_str182[sizeof("epoll_ctl_old")]; + char stringpool_str183[sizeof("syscall")]; + char stringpool_str184[sizeof("lstat")]; + char stringpool_str185[sizeof("fstatfs")]; + char stringpool_str186[sizeof("umount")]; + char stringpool_str187[sizeof("s390_guarded_storage")]; + char stringpool_str188[sizeof("epoll_ctl")]; + char stringpool_str189[sizeof("vm86")]; + char stringpool_str190[sizeof("rt_sigreturn")]; + char stringpool_str191[sizeof("getsockname")]; + char stringpool_str192[sizeof("sched_setattr")]; + char stringpool_str193[sizeof("sched_getattr")]; + char stringpool_str194[sizeof("sigpending")]; + char stringpool_str195[sizeof("utimensat_time64")]; + char stringpool_str196[sizeof("sched_setscheduler")]; + char stringpool_str197[sizeof("sched_getscheduler")]; + char stringpool_str198[sizeof("ioperm")]; + char stringpool_str199[sizeof("timerfd_create")]; + char stringpool_str200[sizeof("getdents64")]; + char stringpool_str201[sizeof("ftruncate")]; + char stringpool_str202[sizeof("mlockall")]; + char stringpool_str203[sizeof("s390_pci_mmio_read")]; + char stringpool_str204[sizeof("s390_pci_mmio_write")]; + char stringpool_str205[sizeof("sendfile64")]; + char stringpool_str206[sizeof("fchdir")]; + char stringpool_str207[sizeof("open_tree")]; + char stringpool_str208[sizeof("setsockopt")]; + char stringpool_str209[sizeof("getsockopt")]; + char stringpool_str210[sizeof("move_mount")]; + char stringpool_str211[sizeof("getpmsg")]; + char stringpool_str212[sizeof("getcwd")]; + char stringpool_str213[sizeof("syslog")]; + char stringpool_str214[sizeof("mpx")]; + char stringpool_str215[sizeof("vm86old")]; + char stringpool_str216[sizeof("unlinkat")]; + char stringpool_str217[sizeof("personality")]; + char stringpool_str218[sizeof("lseek")]; + char stringpool_str219[sizeof("flock")]; + char stringpool_str220[sizeof("pivot_root")]; + char stringpool_str221[sizeof("putpmsg")]; + char stringpool_str222[sizeof("waitid")]; + char stringpool_str223[sizeof("set_tls")]; + char stringpool_str224[sizeof("get_tls")]; + char stringpool_str225[sizeof("finit_module")]; + char stringpool_str226[sizeof("clock_getres")]; + char stringpool_str227[sizeof("clock_settime")]; + char stringpool_str228[sizeof("clock_gettime")]; + char stringpool_str229[sizeof("ptrace")]; + char stringpool_str230[sizeof("readlinkat")]; + char stringpool_str231[sizeof("kexec_file_load")]; + char stringpool_str232[sizeof("quotactl")]; + char stringpool_str233[sizeof("olduname")]; + char stringpool_str234[sizeof("shmdt")]; + char stringpool_str235[sizeof("perf_event_open")]; + char stringpool_str236[sizeof("settimeofday")]; + char stringpool_str237[sizeof("gettimeofday")]; + char stringpool_str238[sizeof("sync_file_range")]; + char stringpool_str239[sizeof("waitpid")]; + char stringpool_str240[sizeof("inotify_init")]; + char stringpool_str241[sizeof("semget")]; + char stringpool_str242[sizeof("memfd_create")]; + char stringpool_str243[sizeof("fanotify_init")]; + char stringpool_str244[sizeof("mq_open")]; + char stringpool_str245[sizeof("setgid")]; + char stringpool_str246[sizeof("getgid")]; + char stringpool_str247[sizeof("mbind")]; + char stringpool_str248[sizeof("inotify_init1")]; + char stringpool_str249[sizeof("fdatasync")]; + char stringpool_str250[sizeof("pipe2")]; + char stringpool_str251[sizeof("semtimedop_time64")]; + char stringpool_str252[sizeof("mmap")]; + char stringpool_str253[sizeof("subpage_prot")]; + char stringpool_str254[sizeof("kexec_load")]; + char stringpool_str255[sizeof("clock_nanosleep")]; + char stringpool_str256[sizeof("shmctl")]; + char stringpool_str257[sizeof("umask")]; + char stringpool_str258[sizeof("restart_syscall")]; + char stringpool_str259[sizeof("epoll_create")]; + char stringpool_str260[sizeof("readdir")]; + char stringpool_str261[sizeof("sched_setaffinity")]; + char stringpool_str262[sizeof("sched_getaffinity")]; + char stringpool_str263[sizeof("sched_yield")]; + char stringpool_str264[sizeof("epoll_create1")]; + char stringpool_str265[sizeof("mlock")]; + char stringpool_str266[sizeof("s390_runtime_instr")]; + char stringpool_str267[sizeof("fchown")]; + char stringpool_str268[sizeof("io_submit")]; + char stringpool_str269[sizeof("getpgrp")]; + char stringpool_str270[sizeof("sigaction")]; + char stringpool_str271[sizeof("madvise")]; + char stringpool_str272[sizeof("mq_timedsend")]; + char stringpool_str273[sizeof("getegid32")]; + char stringpool_str274[sizeof("geteuid32")]; + char stringpool_str275[sizeof("getpeername")]; + char stringpool_str276[sizeof("ssetmask")]; + char stringpool_str277[sizeof("sgetmask")]; + char stringpool_str278[sizeof("lchown")]; + char stringpool_str279[sizeof("fchownat")]; + char stringpool_str280[sizeof("chmod")]; + char stringpool_str281[sizeof("timer_create")]; + char stringpool_str282[sizeof("capget")]; + char stringpool_str283[sizeof("sysinfo")]; + char stringpool_str284[sizeof("msgget")]; + char stringpool_str285[sizeof("nfsservctl")]; + char stringpool_str286[sizeof("flistxattr")]; + char stringpool_str287[sizeof("_llseek")]; + char stringpool_str288[sizeof("rt_sigqueueinfo")]; + char stringpool_str289[sizeof("rt_tgsigqueueinfo")]; + char stringpool_str290[sizeof("sched_get_priority_max")]; + char stringpool_str291[sizeof("io_destroy")]; + char stringpool_str292[sizeof("write")]; + char stringpool_str293[sizeof("llistxattr")]; + char stringpool_str294[sizeof("munlockall")]; + char stringpool_str295[sizeof("set_tid_address")]; + char stringpool_str296[sizeof("creat")]; + char stringpool_str297[sizeof("pkey_alloc")]; + char stringpool_str298[sizeof("_newselect")]; + char stringpool_str299[sizeof("pkey_free")]; + char stringpool_str300[sizeof("openat2")]; + char stringpool_str301[sizeof("arch_prctl")]; + char stringpool_str302[sizeof("chroot")]; + char stringpool_str303[sizeof("kcmp")]; + char stringpool_str304[sizeof("unlink")]; + char stringpool_str305[sizeof("cacheflush")]; + char stringpool_str306[sizeof("riscv_flush_icache")]; + char stringpool_str307[sizeof("setitimer")]; + char stringpool_str308[sizeof("getitimer")]; + char stringpool_str309[sizeof("rename")]; + char stringpool_str310[sizeof("execve")]; + char stringpool_str311[sizeof("rt_sigtimedwait_time64")]; + char stringpool_str312[sizeof("clock_adjtime")]; + char stringpool_str313[sizeof("rseq")]; + char stringpool_str314[sizeof("spu_run")]; + char stringpool_str315[sizeof("sigaltstack")]; + char stringpool_str316[sizeof("timer_settime64")]; + char stringpool_str317[sizeof("timer_gettime64")]; + char stringpool_str318[sizeof("timerfd_settime64")]; + char stringpool_str319[sizeof("timerfd_gettime64")]; + char stringpool_str320[sizeof("rt_sigprocmask")]; + char stringpool_str321[sizeof("readlink")]; + char stringpool_str322[sizeof("renameat")]; + char stringpool_str323[sizeof("execveat")]; + char stringpool_str324[sizeof("mkdirat")]; + char stringpool_str325[sizeof("symlinkat")]; + char stringpool_str326[sizeof("setxattr")]; + char stringpool_str327[sizeof("getxattr")]; + char stringpool_str328[sizeof("fspick")]; + char stringpool_str329[sizeof("io_uring_setup")]; + char stringpool_str330[sizeof("stat64")]; + char stringpool_str331[sizeof("truncate64")]; + char stringpool_str332[sizeof("io_pgetevents")]; + char stringpool_str333[sizeof("multiplexer")]; + char stringpool_str334[sizeof("statx")]; + char stringpool_str335[sizeof("pselect6_time64")]; + char stringpool_str336[sizeof("futex")]; + char stringpool_str337[sizeof("recvmsg")]; + char stringpool_str338[sizeof("vfork")]; + char stringpool_str339[sizeof("sched_rr_get_interval")]; + char stringpool_str340[sizeof("statfs64")]; + char stringpool_str341[sizeof("fanotify_mark")]; + char stringpool_str342[sizeof("readahead")]; + char stringpool_str343[sizeof("readv")]; + char stringpool_str344[sizeof("msgrcv")]; + char stringpool_str345[sizeof("ppoll_time64")]; + char stringpool_str346[sizeof("sync_file_range2")]; + char stringpool_str347[sizeof("membarrier")]; + char stringpool_str348[sizeof("epoll_wait")]; + char stringpool_str349[sizeof("mq_timedreceive")]; + char stringpool_str350[sizeof("brk")]; + char stringpool_str351[sizeof("epoll_wait_old")]; + char stringpool_str352[sizeof("ftruncate64")]; + char stringpool_str353[sizeof("fsetxattr")]; + char stringpool_str354[sizeof("fgetxattr")]; + char stringpool_str355[sizeof("spu_create")]; + char stringpool_str356[sizeof("remap_file_pages")]; + char stringpool_str357[sizeof("exit_group")]; + char stringpool_str358[sizeof("epoll_pwait")]; + char stringpool_str359[sizeof("setgroups")]; + char stringpool_str360[sizeof("getgroups")]; + char stringpool_str361[sizeof("munlock")]; + char stringpool_str362[sizeof("lsetxattr")]; + char stringpool_str363[sizeof("lgetxattr")]; + char stringpool_str364[sizeof("rmdir")]; + char stringpool_str365[sizeof("listxattr")]; + char stringpool_str366[sizeof("signalfd4")]; + char stringpool_str367[sizeof("pkey_mprotect")]; + char stringpool_str368[sizeof("modify_ldt")]; + char stringpool_str369[sizeof("accept4")]; + char stringpool_str370[sizeof("clock_settime64")]; + char stringpool_str371[sizeof("clock_gettime64")]; + char stringpool_str372[sizeof("fcntl64")]; + char stringpool_str373[sizeof("clock_getres_time64")]; + char stringpool_str374[sizeof("recvmmsg")]; + char stringpool_str375[sizeof("mkdir")]; + char stringpool_str376[sizeof("usr32")]; + char stringpool_str377[sizeof("swapoff")]; + char stringpool_str378[sizeof("mlock2")]; + char stringpool_str379[sizeof("vmsplice")]; + char stringpool_str380[sizeof("setuid32")]; + char stringpool_str381[sizeof("getuid32")]; + char stringpool_str382[sizeof("swapon")]; + char stringpool_str383[sizeof("name_to_handle_at")]; + char stringpool_str384[sizeof("eventfd2")]; + char stringpool_str385[sizeof("clock_nanosleep_time64")]; + char stringpool_str386[sizeof("io_uring_enter")]; + char stringpool_str387[sizeof("io_uring_register")]; + char stringpool_str388[sizeof("uselib")]; + char stringpool_str389[sizeof("adjtimex")]; + char stringpool_str390[sizeof("shmat")]; + char stringpool_str391[sizeof("io_getevents")]; + char stringpool_str392[sizeof("symlink")]; + char stringpool_str393[sizeof("vhangup")]; + char stringpool_str394[sizeof("recv")]; + char stringpool_str395[sizeof("get_kernel_syms")]; + char stringpool_str396[sizeof("afs_syscall")]; + char stringpool_str397[sizeof("umount2")]; + char stringpool_str398[sizeof("mq_timedsend_time64")]; + char stringpool_str399[sizeof("process_vm_readv")]; + char stringpool_str400[sizeof("process_vm_writev")]; + char stringpool_str401[sizeof("create_module")]; + char stringpool_str402[sizeof("vserver")]; + char stringpool_str403[sizeof("swapcontext")]; + char stringpool_str404[sizeof("query_module")]; + char stringpool_str405[sizeof("chown")]; + char stringpool_str406[sizeof("futex_time64")]; + char stringpool_str407[sizeof("clock_adjtime64")]; + char stringpool_str408[sizeof("shmget")]; + char stringpool_str409[sizeof("sigprocmask")]; + char stringpool_str410[sizeof("s390_sthyi")]; + char stringpool_str411[sizeof("inotify_add_watch")]; + char stringpool_str412[sizeof("mmap2")]; + char stringpool_str413[sizeof("setgroups32")]; + char stringpool_str414[sizeof("getgroups32")]; + char stringpool_str415[sizeof("shutdown")]; + char stringpool_str416[sizeof("set_mempolicy")]; + char stringpool_str417[sizeof("get_mempolicy")]; + char stringpool_str418[sizeof("recvfrom")]; + char stringpool_str419[sizeof("sched_rr_get_interval_time64")]; + char stringpool_str420[sizeof("io_pgetevents_time64")]; + char stringpool_str421[sizeof("setgid32")]; + char stringpool_str422[sizeof("getgid32")]; + char stringpool_str423[sizeof("removexattr")]; + char stringpool_str424[sizeof("set_robust_list")]; + char stringpool_str425[sizeof("get_robust_list")]; + char stringpool_str426[sizeof("chdir")]; + char stringpool_str427[sizeof("setpriority")]; + char stringpool_str428[sizeof("getpriority")]; + char stringpool_str429[sizeof("mq_timedreceive_time64")]; + char stringpool_str430[sizeof("fstat64")]; + char stringpool_str431[sizeof("fremovexattr")]; + char stringpool_str432[sizeof("fchown32")]; + char stringpool_str433[sizeof("security")]; + char stringpool_str434[sizeof("lstat64")]; + char stringpool_str435[sizeof("fstatfs64")]; + char stringpool_str436[sizeof("lremovexattr")]; + char stringpool_str437[sizeof("lchown32")]; + char stringpool_str438[sizeof("wait4")]; + char stringpool_str439[sizeof("fstatat64")]; + char stringpool_str440[sizeof("mq_getsetattr")]; + char stringpool_str441[sizeof("preadv")]; + char stringpool_str442[sizeof("request_key")]; + char stringpool_str443[sizeof("inotify_rm_watch")]; + char stringpool_str444[sizeof("sys_debug_setcontext")]; + char stringpool_str445[sizeof("mq_notify")]; + char stringpool_str446[sizeof("set_thread_area")]; + char stringpool_str447[sizeof("get_thread_area")]; + char stringpool_str448[sizeof("arm_sync_file_range")]; + char stringpool_str449[sizeof("writev")]; + char stringpool_str450[sizeof("renameat2")]; + char stringpool_str451[sizeof("switch_endian")]; + char stringpool_str452[sizeof("fadvise64")]; + char stringpool_str453[sizeof("prlimit64")]; + char stringpool_str454[sizeof("fadvise64_64")]; + char stringpool_str455[sizeof("pwritev")]; + char stringpool_str456[sizeof("mq_unlink")]; + char stringpool_str457[sizeof("breakpoint")]; + char stringpool_str458[sizeof("pread64")]; + char stringpool_str459[sizeof("recvmmsg_time64")]; + char stringpool_str460[sizeof("arm_fadvise64_64")]; + char stringpool_str461[sizeof("add_key")]; + char stringpool_str462[sizeof("pwrite64")]; + char stringpool_str463[sizeof("preadv2")]; + char stringpool_str464[sizeof("break")]; + char stringpool_str465[sizeof("pwritev2")]; + char stringpool_str466[sizeof("bdflush")]; + char stringpool_str467[sizeof("chown32")]; + char stringpool_str468[sizeof("open_by_handle_at")]; + }; +static const struct stringpool_t stringpool_contents = + { + "tee", + "stat", + "send", + "time", + "idle", + "dup", + "times", + "statfs", + "nice", + "stime", + "ftime", + "utime", + "setsid", + "getsid", + "pipe", + "gettid", + "utimes", + "uname", + "getegid", + "geteuid", + "pause", + "getcpu", + "setfsgid", + "setregid", + "setfsuid", + "setreuid", + "getdents", + "setns", + "semctl", + "ulimit", + "setresgid", + "getresgid", + "setresuid", + "getresuid", + "fsmount", + "getrusage", + "sendfile", + "listen", + "semop", + "linkat", + "faccessat", + "fsconfig", + "socket", + "userfaultfd", + "utimensat", + "newfstatat", + "sigsuspend", + "acct", + "ipc", + "select", + "tuxcall", + "ioctl", + "oldstat", + "close", + "access", + "capset", + "sendto", + "oldfstat", + "usr26", + "signal", + "open", + "signalfd", + "fcntl", + "msgsnd", + "sendmsg", + "sethostname", + "accept", + "io_setup", + "openat", + "msgctl", + "clone", + "fchmod", + "nanosleep", + "iopl", + "rtas", + "setrlimit", + "getrlimit", + "poll", + "read", + "oldolduname", + "ppoll", + "munmap", + "fchmodat", + "mount", + "prof", + "pidfd_getfd", + "oldlstat", + "fsync", + "seccomp", + "timerfd", + "pciconfig_read", + "pciconfig_write", + "pciconfig_iobase", + "clone3", + "semtimedop", + "setdomainname", + "alarm", + "sendmmsg", + "rt_sigsuspend", + "socketcall", + "pidfd_send_signal", + "io_cancel", + "unshare", + "prctl", + "tgkill", + "cachectl", + "mprotect", + "sigreturn", + "profil", + "reboot", + "_sysctl", + "rt_sigpending", + "link", + "connect", + "sched_get_priority_min", + "ioprio_set", + "ioprio_get", + "pidfd_open", + "keyctl", + "dup2", + "fork", + "splice", + "fallocate", + "msync", + "pselect6", + "lock", + "getrandom", + "migrate_pages", + "setresgid32", + "getresgid32", + "setresuid32", + "getresuid32", + "setuid", + "getuid", + "delete_module", + "sysfs", + "socketpair", + "faccessat2", + "syncfs", + "futimesat", + "rt_sigaction", + "rt_sigtimedwait", + "init_module", + "setfsgid32", + "setregid32", + "setfsuid32", + "setreuid32", + "kill", + "move_pages", + "sched_setparam", + "sched_getparam", + "truncate", + "mknod", + "mincore", + "mremap", + "ugetrlimit", + "lookup_dcookie", + "timer_settime", + "timer_gettime", + "timerfd_settime", + "timerfd_gettime", + "eventfd", + "tkill", + "stty", + "gtty", + "exit", + "getpid", + "dup3", + "timer_getoverrun", + "timer_delete", + "sysmips", + "setpgid", + "getpgid", + "copy_file_range", + "mknodat", + "fsopen", + "sync", + "fstat", + "bind", + "ustat", + "bpf", + "getppid", + "epoll_ctl_old", + "syscall", + "lstat", + "fstatfs", + "umount", + "s390_guarded_storage", + "epoll_ctl", + "vm86", + "rt_sigreturn", + "getsockname", + "sched_setattr", + "sched_getattr", + "sigpending", + "utimensat_time64", + "sched_setscheduler", + "sched_getscheduler", + "ioperm", + "timerfd_create", + "getdents64", + "ftruncate", + "mlockall", + "s390_pci_mmio_read", + "s390_pci_mmio_write", + "sendfile64", + "fchdir", + "open_tree", + "setsockopt", + "getsockopt", + "move_mount", + "getpmsg", + "getcwd", + "syslog", + "mpx", + "vm86old", + "unlinkat", + "personality", + "lseek", + "flock", + "pivot_root", + "putpmsg", + "waitid", + "set_tls", + "get_tls", + "finit_module", + "clock_getres", + "clock_settime", + "clock_gettime", + "ptrace", + "readlinkat", + "kexec_file_load", + "quotactl", + "olduname", + "shmdt", + "perf_event_open", + "settimeofday", + "gettimeofday", + "sync_file_range", + "waitpid", + "inotify_init", + "semget", + "memfd_create", + "fanotify_init", + "mq_open", + "setgid", + "getgid", + "mbind", + "inotify_init1", + "fdatasync", + "pipe2", + "semtimedop_time64", + "mmap", + "subpage_prot", + "kexec_load", + "clock_nanosleep", + "shmctl", + "umask", + "restart_syscall", + "epoll_create", + "readdir", + "sched_setaffinity", + "sched_getaffinity", + "sched_yield", + "epoll_create1", + "mlock", + "s390_runtime_instr", + "fchown", + "io_submit", + "getpgrp", + "sigaction", + "madvise", + "mq_timedsend", + "getegid32", + "geteuid32", + "getpeername", + "ssetmask", + "sgetmask", + "lchown", + "fchownat", + "chmod", + "timer_create", + "capget", + "sysinfo", + "msgget", + "nfsservctl", + "flistxattr", + "_llseek", + "rt_sigqueueinfo", + "rt_tgsigqueueinfo", + "sched_get_priority_max", + "io_destroy", + "write", + "llistxattr", + "munlockall", + "set_tid_address", + "creat", + "pkey_alloc", + "_newselect", + "pkey_free", + "openat2", + "arch_prctl", + "chroot", + "kcmp", + "unlink", + "cacheflush", + "riscv_flush_icache", + "setitimer", + "getitimer", + "rename", + "execve", + "rt_sigtimedwait_time64", + "clock_adjtime", + "rseq", + "spu_run", + "sigaltstack", + "timer_settime64", + "timer_gettime64", + "timerfd_settime64", + "timerfd_gettime64", + "rt_sigprocmask", + "readlink", + "renameat", + "execveat", + "mkdirat", + "symlinkat", + "setxattr", + "getxattr", + "fspick", + "io_uring_setup", + "stat64", + "truncate64", + "io_pgetevents", + "multiplexer", + "statx", + "pselect6_time64", + "futex", + "recvmsg", + "vfork", + "sched_rr_get_interval", + "statfs64", + "fanotify_mark", + "readahead", + "readv", + "msgrcv", + "ppoll_time64", + "sync_file_range2", + "membarrier", + "epoll_wait", + "mq_timedreceive", + "brk", + "epoll_wait_old", + "ftruncate64", + "fsetxattr", + "fgetxattr", + "spu_create", + "remap_file_pages", + "exit_group", + "epoll_pwait", + "setgroups", + "getgroups", + "munlock", + "lsetxattr", + "lgetxattr", + "rmdir", + "listxattr", + "signalfd4", + "pkey_mprotect", + "modify_ldt", + "accept4", + "clock_settime64", + "clock_gettime64", + "fcntl64", + "clock_getres_time64", + "recvmmsg", + "mkdir", + "usr32", + "swapoff", + "mlock2", + "vmsplice", + "setuid32", + "getuid32", + "swapon", + "name_to_handle_at", + "eventfd2", + "clock_nanosleep_time64", + "io_uring_enter", + "io_uring_register", + "uselib", + "adjtimex", + "shmat", + "io_getevents", + "symlink", + "vhangup", + "recv", + "get_kernel_syms", + "afs_syscall", + "umount2", + "mq_timedsend_time64", + "process_vm_readv", + "process_vm_writev", + "create_module", + "vserver", + "swapcontext", + "query_module", + "chown", + "futex_time64", + "clock_adjtime64", + "shmget", + "sigprocmask", + "s390_sthyi", + "inotify_add_watch", + "mmap2", + "setgroups32", + "getgroups32", + "shutdown", + "set_mempolicy", + "get_mempolicy", + "recvfrom", + "sched_rr_get_interval_time64", + "io_pgetevents_time64", + "setgid32", + "getgid32", + "removexattr", + "set_robust_list", + "get_robust_list", + "chdir", + "setpriority", + "getpriority", + "mq_timedreceive_time64", + "fstat64", + "fremovexattr", + "fchown32", + "security", + "lstat64", + "fstatfs64", + "lremovexattr", + "lchown32", + "wait4", + "fstatat64", + "mq_getsetattr", + "preadv", + "request_key", + "inotify_rm_watch", + "sys_debug_setcontext", + "mq_notify", + "set_thread_area", + "get_thread_area", + "arm_sync_file_range", + "writev", + "renameat2", + "switch_endian", + "fadvise64", + "prlimit64", + "fadvise64_64", + "pwritev", + "mq_unlink", + "breakpoint", + "pread64", + "recvmmsg_time64", + "arm_fadvise64_64", + "add_key", + "pwrite64", + "preadv2", + "break", + "pwritev2", + "bdflush", + "chown32", + "open_by_handle_at" + }; +#define stringpool ((const char *) &stringpool_contents) + +static const struct arch_syscall_table wordlist[] = + { +#line 450 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str0,419,315,276,276,342,77,306,265,269,293,293,284,284,77,308,308}, +#line 425 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str1,394,106,4,4,106,__PNR_stat,106,4,4,18,18,106,106,__PNR_stat,106,106}, +#line 363 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str2,332,__PNR_send,__PNR_send,__PNR_send,289,__PNR_send,178,__PNR_send,__PNR_send,58,58,334,334,__PNR_send,__PNR_send,__PNR_send}, +#line 452 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str3,421,13,201,201,__PNR_time,__PNR_time,13,__PNR_time,__PNR_time,13,13,13,13,__PNR_time,13,__PNR_time}, +#line 171 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str4,140,112,__PNR_idle,__PNR_idle,__PNR_idle,__PNR_idle,112,__PNR_idle,__PNR_idle,__PNR_idle,__PNR_idle,112,112,__PNR_idle,112,112}, +#line 75 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5,44,41,32,32,41,23,41,31,31,41,41,41,41,23,41,41}, +#line 466 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6,435,43,100,100,43,153,43,98,98,43,43,43,43,153,43,43}, +#line 427 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7,396,99,137,137,99,43,99,134,134,99,99,99,99,43,99,99}, +#line 258 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8,227,34,__PNR_nice,__PNR_nice,34,__PNR_nice,34,__PNR_nice,__PNR_nice,34,34,34,34,__PNR_nice,34,34}, +#line 430 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9,399,25,__PNR_stime,__PNR_stime,__PNR_stime,__PNR_stime,25,__PNR_stime,__PNR_stime,25,25,25,25,__PNR_stime,25,__PNR_stime}, +#line 124 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10,93,35,__PNR_ftime,__PNR_ftime,__PNR_ftime,__PNR_ftime,35,__PNR_ftime,__PNR_ftime,__PNR_ftime,__PNR_ftime,35,35,__PNR_ftime,__PNR_ftime,__PNR_ftime}, +#line 485 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11,454,30,132,132,__PNR_utime,__PNR_utime,30,130,130,30,30,30,30,__PNR_utime,30,30}, +#line 394 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12,363,66,112,112,66,157,66,110,110,66,66,66,66,157,66,66}, +#line 160 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13,129,147,124,124,147,156,151,122,122,147,147,147,147,156,147,147}, +#line 278 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14,247,42,22,22,42,__PNR_pipe,42,21,21,42,42,42,42,__PNR_pipe,42,42}, +#line 164 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15,133,224,186,186,224,178,222,178,178,206,206,207,207,178,236,236}, +#line 488 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16,457,271,235,235,269,__PNR_utimes,267,226,230,336,336,251,251,__PNR_utimes,313,313}, +#line 476 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17,445,122,63,63,122,160,122,61,61,59,59,122,122,160,122,122}, +#line 134 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18,103,50,108,108,50,177,50,106,106,50,50,50,50,177,50,202}, +#line 136 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19,105,49,107,107,49,175,49,105,105,49,49,49,49,175,49,201}, +#line 269 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20,238,29,34,34,29,__PNR_pause,29,33,33,29,29,29,29,__PNR_pause,29,29}, +#line 130 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21,99,318,309,309,345,168,312,271,275,296,296,302,302,168,311,311}, +#line 370 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22,339,139,123,123,139,152,139,121,121,139,139,139,139,152,139,216}, +#line 384 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23,353,71,114,114,71,143,71,112,112,71,71,71,71,143,71,204}, +#line 372 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24,341,138,122,122,138,151,138,120,120,138,138,138,138,151,138,215}, +#line 390 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25,359,70,113,113,70,145,70,111,111,70,70,70,70,145,70,203}, +#line 132 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26,101,141,78,78,141,__PNR_getdents,141,76,76,141,141,141,141,__PNR_getdents,141,141}, +#line 381 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27,350,346,308,308,375,268,344,303,308,328,328,350,350,268,339,339}, +#line 358 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28,327,394,66,66,300,191,394,64,64,187,187,394,394,191,394,394}, +#line 472 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29,441,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit,58,58,__PNR_ulimit,__PNR_ulimit,__PNR_ulimit}, +#line 386 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30,355,170,119,119,170,149,190,117,117,170,170,169,169,149,170,210}, +#line 153 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31,122,171,120,120,171,150,191,118,118,171,171,170,170,150,171,211}, +#line 388 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32,357,164,117,117,164,147,185,115,115,164,164,164,164,147,164,208}, +#line 155 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33,124,165,118,118,165,148,186,116,116,165,165,165,165,148,165,209}, +#line 115 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34,84,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432}, +#line 159 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35,128,77,98,98,77,165,77,96,96,77,77,77,77,165,77,77}, +#line 364 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36,333,187,40,40,187,71,207,39,39,122,122,186,186,71,187,187}, +#line 203 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37,172,363,50,50,284,201,174,49,49,32,32,329,329,201,363,363}, +#line 360 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38,329,__PNR_semop,65,65,298,193,__PNR_semop,63,63,185,185,__PNR_semop,__PNR_semop,193,__PNR_semop,__PNR_semop}, +#line 202 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39,171,303,265,265,330,37,296,255,259,283,283,294,294,37,296,296}, +#line 91 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40,60,307,269,269,334,48,300,259,263,287,287,298,298,48,300,300}, +#line 113 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41,82,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431}, +#line 418 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42,387,359,41,41,281,198,183,40,40,17,17,326,326,198,359,359}, +#line 481 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43,450,374,323,323,388,282,357,317,321,344,344,364,364,282,355,355}, +#line 486 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44,455,320,280,280,348,88,316,275,279,301,301,304,304,88,315,315}, +#line 255 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45,224,__PNR_newfstatat,262,262,__PNR_newfstatat,79,__PNR_newfstatat,252,256,__PNR_newfstatat,__PNR_newfstatat,__PNR_newfstatat,291,79,__PNR_newfstatat,293}, +#line 417 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46,386,72,__PNR_sigsuspend,__PNR_sigsuspend,72,__PNR_sigsuspend,72,__PNR_sigsuspend,__PNR_sigsuspend,__PNR_sigsuspend,__PNR_sigsuspend,72,72,__PNR_sigsuspend,72,72}, +#line 34 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47,3,51,163,163,51,89,51,158,158,51,51,51,51,89,51,51}, +#line 192 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48,161,117,__PNR_ipc,__PNR_ipc,__PNR_ipc,__PNR_ipc,117,__PNR_ipc,__PNR_ipc,__PNR_ipc,__PNR_ipc,117,117,__PNR_ipc,117,117}, +#line 357 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49,326,82,23,23,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,__PNR_select,82,82,__PNR_select,__PNR_select,142}, +#line 470 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str50,439,__PNR_tuxcall,184,184,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall,225,225,__PNR_tuxcall,__PNR_tuxcall,__PNR_tuxcall}, +#line 178 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str51,147,54,16,514,54,29,54,15,15,54,54,54,54,29,54,54}, +#line 262 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str52,231,18,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat,18,18,__PNR_oldstat,__PNR_oldstat,__PNR_oldstat}, +#line 69 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str53,38,6,3,3,6,57,6,3,3,6,6,6,6,57,6,6}, +#line 33 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str54,2,33,21,21,33,__PNR_access,33,20,20,33,33,33,33,__PNR_access,33,33}, +#line 51 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str55,20,185,126,126,185,91,205,124,124,107,107,184,184,91,185,185}, +#line 368 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str56,337,369,44,44,290,206,180,43,43,82,82,335,335,206,369,369}, +#line 259 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str57,228,28,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat,28,28,__PNR_oldfstat,__PNR_oldfstat,__PNR_oldfstat}, +#line 482 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str58,451,__PNR_usr26,__PNR_usr26,__PNR_usr26,983043,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26,__PNR_usr26}, +#line 411 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str59,380,48,__PNR_signal,__PNR_signal,__PNR_signal,__PNR_signal,48,__PNR_signal,__PNR_signal,48,48,48,48,__PNR_signal,48,48}, +#line 264 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str60,233,5,2,2,5,__PNR_open,5,2,2,5,5,5,5,__PNR_open,5,5}, +#line 412 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str61,381,321,282,282,349,__PNR_signalfd,317,276,280,302,302,305,305,__PNR_signalfd,316,316}, +#line 104 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str62,73,55,72,72,55,25,55,70,70,55,55,55,55,25,55,55}, +#line 247 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str63,216,400,69,69,301,189,400,67,67,188,188,400,400,189,400,400}, +#line 367 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64,336,370,46,518,296,211,179,45,45,183,183,341,341,211,370,370}, +#line 378 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str65,347,74,170,170,74,161,74,165,165,74,74,74,74,161,74,74}, +#line 31 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str66,0,__PNR_accept,43,43,285,202,168,42,42,35,35,330,330,202,__PNR_accept,__PNR_accept}, +#line 187 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str67,156,245,206,543,243,0,241,200,200,215,215,227,227,0,243,243}, +#line 265 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str68,234,295,257,257,322,56,288,247,251,275,275,286,286,56,288,288}, +#line 244 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str69,213,402,71,71,304,187,402,69,69,191,191,402,402,187,402,402}, +#line 67 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str70,36,120,56,56,120,220,120,55,55,120,120,120,120,220,120,120}, +#line 99 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str71,68,94,91,91,94,52,94,89,89,94,94,94,94,52,94,94}, +#line 254 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str72,223,162,35,35,162,101,166,34,34,162,162,162,162,101,162,162}, +#line 184 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str73,153,110,172,172,__PNR_iopl,__PNR_iopl,110,__PNR_iopl,__PNR_iopl,__PNR_iopl,__PNR_iopl,110,110,__PNR_iopl,__PNR_iopl,__PNR_iopl}, +#line 327 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str74,296,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,__PNR_rtas,255,255,__PNR_rtas,__PNR_rtas,__PNR_rtas}, +#line 392 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str75,361,75,160,160,75,164,75,155,155,75,75,75,75,164,75,75}, +#line 157 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str76,126,76,97,97,__PNR_getrlimit,163,76,95,95,76,76,76,76,163,76,191}, +#line 284 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str77,253,168,7,7,168,__PNR_poll,188,7,7,168,168,167,167,__PNR_poll,168,168}, +#line 305 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str78,274,3,0,0,3,63,3,0,0,3,3,3,3,63,3,3}, +#line 261 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str79,230,59,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname,59,59,__PNR_oldolduname,__PNR_oldolduname,__PNR_oldolduname}, +#line 285 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str80,254,309,271,271,336,73,302,261,265,274,274,281,281,73,302,302}, +#line 252 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str81,221,91,11,11,91,215,91,11,11,91,91,91,91,215,91,91}, +#line 100 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str82,69,306,268,268,333,53,299,258,262,286,286,297,297,53,299,299}, +#line 230 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str83,199,21,165,165,21,40,21,160,160,21,21,21,21,40,21,21}, +#line 294 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str84,263,44,__PNR_prof,__PNR_prof,__PNR_prof,__PNR_prof,44,__PNR_prof,__PNR_prof,__PNR_prof,__PNR_prof,44,44,__PNR_prof,__PNR_prof,__PNR_prof}, +#line 275 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str85,244,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438}, +#line 260 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str86,229,84,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat,84,84,__PNR_oldlstat,__PNR_oldlstat,__PNR_oldlstat}, +#line 123 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str87,92,118,74,74,118,82,118,72,72,118,118,118,118,82,118,118}, +#line 355 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str88,324,354,317,317,383,277,352,312,316,338,338,358,358,277,348,348}, +#line 455 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str89,424,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,318,277,281,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,__PNR_timerfd,317,317}, +#line 271 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str90,240,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,272,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read,198,198,__PNR_pciconfig_read,__PNR_pciconfig_read,__PNR_pciconfig_read}, +#line 272 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str91,241,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,273,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write,199,199,__PNR_pciconfig_write,__PNR_pciconfig_write,__PNR_pciconfig_write}, +#line 270 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str92,239,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,271,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,200,200,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase,__PNR_pciconfig_iobase}, +#line 68 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str93,37,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435}, +#line 361 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str94,330,__PNR_semtimedop,220,220,312,192,__PNR_semtimedop,214,215,228,228,__PNR_semtimedop,392,192,__PNR_semtimedop,392}, +#line 369 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str95,338,121,171,171,121,162,121,166,166,121,121,121,121,162,121,121}, +#line 38 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str96,7,27,37,37,__PNR_alarm,__PNR_alarm,27,37,37,27,27,27,27,__PNR_alarm,27,27}, +#line 366 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str97,335,345,307,538,374,269,343,302,307,329,329,349,349,269,358,358}, +#line 333 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str98,302,179,130,130,179,133,199,128,128,179,179,178,178,133,179,179}, +#line 419 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str99,388,102,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,102,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,__PNR_socketcall,102,102,__PNR_socketcall,102,102}, +#line 277 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str100,246,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424}, +#line 177 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str101,146,249,210,210,247,3,245,204,204,219,219,231,231,3,247,247}, +#line 479 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str102,448,310,272,272,337,97,303,262,266,288,288,282,282,97,303,303}, +#line 287 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str103,256,172,157,157,172,167,192,153,153,172,172,171,171,167,172,172}, +#line 451 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str104,420,270,234,234,268,131,266,225,229,259,259,250,250,131,241,241}, +#line 48 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str105,17,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,148,198,198,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl,__PNR_cachectl}, +#line 233 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str106,202,125,10,10,125,226,125,10,10,125,125,125,125,226,125,125}, +#line 416 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str107,385,119,__PNR_sigreturn,__PNR_sigreturn,119,__PNR_sigreturn,119,__PNR_sigreturn,__PNR_sigreturn,__PNR_sigreturn,__PNR_sigreturn,119,119,__PNR_sigreturn,119,119}, +#line 295 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str108,264,98,__PNR_profil,__PNR_profil,__PNR_profil,__PNR_profil,98,__PNR_profil,__PNR_profil,__PNR_profil,__PNR_profil,98,98,__PNR_profil,__PNR_profil,__PNR_profil}, +#line 311 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str109,280,88,169,169,88,142,88,164,164,88,88,88,88,142,88,88}, +#line 444 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str110,413,149,156,__PNR__sysctl,149,__PNR__sysctl,153,152,152,149,149,149,149,__PNR__sysctl,149,149}, +#line 329 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str111,298,176,127,522,176,136,196,125,125,176,176,175,175,136,176,176}, +#line 201 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str112,170,9,86,86,9,__PNR_link,9,84,84,9,9,9,9,__PNR_link,9,9}, +#line 70 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str113,39,362,42,42,283,203,170,41,41,31,31,328,328,203,362,362}, +#line 346 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str114,315,160,147,147,160,126,164,144,144,160,160,160,160,126,160,160}, +#line 186 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str115,155,289,251,251,314,30,314,273,277,267,267,273,273,30,282,282}, +#line 185 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str116,154,290,252,252,315,31,315,274,278,268,268,274,274,31,283,283}, +#line 276 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str117,245,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434}, +#line 196 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str118,165,288,250,250,311,219,282,241,245,266,266,271,271,219,280,280}, +#line 76 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str119,45,63,33,33,63,__PNR_dup2,63,32,32,63,63,63,63,__PNR_dup2,63,63}, +#line 111 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str120,80,2,57,57,2,__PNR_fork,2,56,56,2,2,2,2,__PNR_fork,2,2}, +#line 421 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str121,390,313,275,275,340,76,304,263,267,291,291,283,283,76,306,306}, +#line 95 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str122,64,324,285,285,352,47,320,279,283,305,305,309,309,47,314,314}, +#line 248 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str123,217,144,26,26,144,227,144,25,25,144,144,144,144,227,144,144}, +#line 296 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str124,265,308,270,270,335,72,301,260,264,273,273,280,280,72,301,301}, +#line 207 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str125,176,53,__PNR_lock,__PNR_lock,__PNR_lock,__PNR_lock,53,__PNR_lock,__PNR_lock,__PNR_lock,__PNR_lock,53,53,__PNR_lock,__PNR_lock,__PNR_lock}, +#line 152 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str126,121,355,318,318,384,278,353,313,317,339,339,359,359,278,349,349}, +#line 218 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str127,187,294,256,256,400,238,287,246,250,272,272,258,258,238,287,287}, +#line 387 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str128,356,210,__PNR_setresgid32,__PNR_setresgid32,210,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,__PNR_setresgid32,210,__PNR_setresgid32}, +#line 154 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str129,123,211,__PNR_getresgid32,__PNR_getresgid32,211,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,__PNR_getresgid32,211,__PNR_getresgid32}, +#line 389 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str130,358,208,__PNR_setresuid32,__PNR_setresuid32,208,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,__PNR_setresuid32,208,__PNR_setresuid32}, +#line 156 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str131,125,209,__PNR_getresuid32,__PNR_getresuid32,209,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,__PNR_getresuid32,209,__PNR_getresuid32}, +#line 400 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str132,369,23,105,105,23,146,23,103,103,23,23,23,23,146,23,213}, +#line 167 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str133,136,24,102,102,24,174,24,100,100,24,24,24,24,174,24,199}, +#line 74 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str134,43,129,176,176,129,106,129,169,169,129,129,129,129,106,129,129}, +#line 446 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str135,415,135,139,139,135,__PNR_sysfs,135,136,136,135,135,135,135,__PNR_sysfs,135,135}, +#line 420 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str136,389,360,53,53,288,199,184,52,52,56,56,333,333,199,360,360}, +#line 92 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str137,61,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439}, +#line 442 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str138,411,344,306,306,373,267,342,301,306,327,327,348,348,267,338,338}, +#line 129 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str139,98,299,261,261,326,__PNR_futimesat,292,251,255,279,279,290,290,__PNR_futimesat,292,292}, +#line 328 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str140,297,174,13,512,174,134,194,13,13,174,174,173,173,134,174,174}, +#line 334 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str141,303,177,128,523,177,137,197,126,126,177,177,176,176,137,177,177}, +#line 172 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str142,141,128,175,175,128,105,128,168,168,128,128,128,128,105,128,128}, +#line 371 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str143,340,216,__PNR_setfsgid32,__PNR_setfsgid32,216,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,__PNR_setfsgid32,216,__PNR_setfsgid32}, +#line 385 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str144,354,204,__PNR_setregid32,__PNR_setregid32,204,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,__PNR_setregid32,204,__PNR_setregid32}, +#line 373 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str145,342,215,__PNR_setfsuid32,__PNR_setfsuid32,215,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,__PNR_setfsuid32,215,__PNR_setfsuid32}, +#line 391 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str146,360,203,__PNR_setreuid32,__PNR_setreuid32,203,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,__PNR_setreuid32,203,__PNR_setreuid32}, +#line 197 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str147,166,37,62,62,37,129,37,60,60,37,37,37,37,129,37,37}, +#line 232 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str148,201,317,279,533,344,239,308,267,271,295,295,301,301,239,310,310}, +#line 352 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str149,321,154,142,142,154,118,158,139,139,154,154,154,154,118,154,154}, +#line 344 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str150,313,155,143,143,155,121,159,140,140,155,155,155,155,121,155,155}, +#line 468 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str151,437,92,76,76,92,45,92,74,74,92,92,92,92,45,92,92}, +#line 222 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str152,191,14,133,133,14,__PNR_mknod,14,131,131,14,14,14,14,__PNR_mknod,14,14}, +#line 219 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str153,188,218,27,27,219,232,217,26,26,72,72,206,206,232,218,218}, +#line 243 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str154,212,163,25,25,163,216,167,24,24,163,163,163,163,216,163,163}, +#line 471 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str155,440,191,__PNR_ugetrlimit,__PNR_ugetrlimit,191,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,__PNR_ugetrlimit,190,190,__PNR_ugetrlimit,191,__PNR_ugetrlimit}, +#line 208 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str156,177,253,212,212,249,18,247,206,206,223,223,235,235,18,110,110}, +#line 464 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str157,433,260,223,223,258,110,258,217,221,251,251,241,241,110,255,255}, +#line 462 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str158,431,261,224,224,259,108,259,218,222,252,252,242,242,108,256,256}, +#line 459 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str159,428,325,286,286,353,86,323,282,286,307,307,311,311,86,320,320}, +#line 457 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str160,426,326,287,287,354,87,322,281,285,308,308,312,312,87,321,321}, +#line 85 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str161,54,323,284,284,351,__PNR_eventfd,319,278,282,304,304,307,307,__PNR_eventfd,318,318}, +#line 467 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str162,436,238,200,200,238,130,236,192,192,208,208,208,208,130,237,237}, +#line 431 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str163,400,31,__PNR_stty,__PNR_stty,__PNR_stty,__PNR_stty,31,__PNR_stty,__PNR_stty,__PNR_stty,__PNR_stty,31,31,__PNR_stty,__PNR_stty,__PNR_stty}, +#line 170 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str164,139,32,__PNR_gtty,__PNR_gtty,__PNR_gtty,__PNR_gtty,32,__PNR_gtty,__PNR_gtty,__PNR_gtty,__PNR_gtty,32,32,__PNR_gtty,__PNR_gtty,__PNR_gtty}, +#line 89 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str165,58,1,60,60,1,93,1,58,58,1,1,1,1,93,1,1}, +#line 148 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str166,117,20,39,39,20,172,20,38,38,20,20,20,20,172,20,20}, +#line 77 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str167,46,330,292,292,358,24,327,286,290,312,312,316,316,24,326,326}, +#line 461 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str168,430,262,225,225,260,109,260,219,223,253,253,243,243,109,257,257}, +#line 454 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str169,423,263,226,226,261,111,261,220,224,254,254,244,244,111,258,258}, +#line 449 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str170,418,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,149,199,199,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips,__PNR_sysmips}, +#line 382 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str171,351,57,109,109,57,154,57,107,107,57,57,57,57,154,57,57}, +#line 146 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str172,115,132,121,121,132,155,132,119,119,132,132,132,132,155,132,132}, +#line 71 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str173,40,377,326,326,391,285,360,320,324,346,346,379,379,285,375,375}, +#line 223 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str174,192,297,259,259,324,33,290,249,253,277,277,288,288,33,290,290}, +#line 116 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str175,85,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430}, +#line 439 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str176,408,36,162,162,36,81,36,157,157,36,36,36,36,81,36,36}, +#line 118 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str177,87,108,5,5,108,80,108,5,5,28,28,108,108,80,108,108}, +#line 43 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str178,12,361,49,49,282,200,169,48,48,22,22,327,327,200,361,361}, +#line 484 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str179,453,62,136,136,62,__PNR_ustat,62,133,133,62,62,62,62,__PNR_ustat,62,62}, +#line 44 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str180,13,357,321,321,386,280,355,315,319,341,341,361,361,280,351,351}, +#line 150 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str181,119,64,110,110,64,173,64,108,108,64,64,64,64,173,64,64}, +#line 81 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str182,50,__PNR_epoll_ctl_old,214,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old,__PNR_epoll_ctl_old}, +#line 443 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str183,412,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,0,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall,__PNR_syscall}, +#line 212 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str184,181,107,6,6,107,__PNR_lstat,107,6,6,84,84,107,107,__PNR_lstat,107,107}, +#line 121 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str185,90,100,138,138,100,44,100,135,135,100,100,100,100,44,100,100}, +#line 474 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str186,443,22,__PNR_umount,__PNR_umount,__PNR_umount,__PNR_umount,22,__PNR_umount,__PNR_umount,__PNR_umount,__PNR_umount,22,22,__PNR_umount,22,22}, +#line 337 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str187,306,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,__PNR_s390_guarded_storage,378,378}, +#line 80 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str188,49,255,233,233,251,21,249,208,208,225,225,237,237,21,250,250}, +#line 491 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str189,460,166,__PNR_vm86,__PNR_vm86,__PNR_vm86,__PNR_vm86,113,__PNR_vm86,__PNR_vm86,__PNR_vm86,__PNR_vm86,113,113,__PNR_vm86,__PNR_vm86,__PNR_vm86}, +#line 332 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str190,301,173,15,513,173,139,193,211,211,173,173,172,172,139,173,173}, +#line 161 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str191,130,367,51,51,286,204,172,50,50,44,44,331,331,204,367,367}, +#line 351 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str192,320,351,314,314,380,274,349,309,313,334,334,355,355,274,345,345}, +#line 343 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str193,312,352,315,315,381,275,350,310,314,335,335,356,356,275,346,346}, +#line 414 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str194,383,73,__PNR_sigpending,__PNR_sigpending,73,__PNR_sigpending,73,__PNR_sigpending,__PNR_sigpending,73,73,73,73,__PNR_sigpending,73,73}, +#line 487 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str195,456,412,__PNR_utimensat_time64,__PNR_utimensat_time64,412,__PNR_utimensat_time64,412,__PNR_utimensat_time64,412,412,__PNR_utimensat_time64,412,__PNR_utimensat_time64,__PNR_utimensat_time64,412,__PNR_utimensat_time64}, +#line 353 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str196,322,156,144,144,156,119,160,141,141,156,156,156,156,119,156,156}, +#line 347 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str197,316,157,145,145,157,120,161,142,142,157,157,157,157,120,157,157}, +#line 181 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str198,150,101,173,173,__PNR_ioperm,__PNR_ioperm,101,__PNR_ioperm,__PNR_ioperm,__PNR_ioperm,__PNR_ioperm,101,101,__PNR_ioperm,101,__PNR_ioperm}, +#line 456 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str199,425,322,283,283,350,85,321,280,284,306,306,306,306,85,319,319}, +#line 133 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str200,102,220,217,217,217,61,219,308,299,201,201,202,202,61,220,220}, +#line 125 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str201,94,93,77,77,93,46,93,75,75,93,93,93,93,46,93,93}, +#line 226 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str202,195,152,151,151,152,230,156,148,148,152,152,152,152,230,152,152}, +#line 338 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str203,307,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,__PNR_s390_pci_mmio_read,353,353}, +#line 339 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str204,308,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,__PNR_s390_pci_mmio_write,352,352}, +#line 365 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str205,334,239,__PNR_sendfile64,__PNR_sendfile64,239,__PNR_sendfile64,237,__PNR_sendfile64,219,209,209,226,__PNR_sendfile64,__PNR_sendfile64,223,__PNR_sendfile64}, +#line 98 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str206,67,133,81,81,133,50,133,79,79,133,133,133,133,50,133,133}, +#line 268 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str207,237,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428}, +#line 395 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str208,364,366,54,541,294,208,181,53,53,181,181,339,339,208,366,366}, +#line 162 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str209,131,365,55,542,295,209,173,54,54,182,182,340,340,209,365,365}, +#line 231 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str210,200,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429}, +#line 149 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str211,118,188,181,181,__PNR_getpmsg,__PNR_getpmsg,208,174,174,__PNR_getpmsg,__PNR_getpmsg,187,187,__PNR_getpmsg,188,188}, +#line 131 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str212,100,183,79,79,183,17,203,77,77,110,110,182,182,17,183,183}, +#line 448 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str213,417,103,103,103,103,116,103,101,101,103,103,103,103,116,103,103}, +#line 234 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str214,203,56,__PNR_mpx,__PNR_mpx,__PNR_mpx,__PNR_mpx,56,__PNR_mpx,__PNR_mpx,__PNR_mpx,__PNR_mpx,56,56,__PNR_mpx,__PNR_mpx,__PNR_mpx}, +#line 492 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str215,461,113,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old,__PNR_vm86old}, +#line 478 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str216,447,301,263,263,328,35,294,253,257,281,281,292,292,35,294,294}, +#line 274 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str217,243,136,135,135,136,92,136,132,132,136,136,136,136,92,136,136}, +#line 210 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str218,179,19,8,8,19,62,19,8,8,19,19,19,19,62,19,19}, +#line 110 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str219,79,143,73,73,143,32,143,71,71,143,143,143,143,32,143,143}, +#line 280 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str220,249,217,155,155,218,41,216,151,151,67,67,203,203,41,217,217}, +#line 299 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str221,268,189,182,182,__PNR_putpmsg,__PNR_putpmsg,209,175,175,__PNR_putpmsg,__PNR_putpmsg,188,188,__PNR_putpmsg,189,189}, +#line 496 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str222,465,284,247,529,280,95,278,237,241,235,235,272,272,95,281,281}, +#line 399 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str223,368,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,983045,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls,__PNR_set_tls}, +#line 166 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str224,135,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,983046,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls,__PNR_get_tls}, +#line 108 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str225,77,350,313,313,379,273,348,307,312,333,333,353,353,273,344,344}, +#line 59 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str226,28,266,229,229,264,114,264,223,227,257,257,247,247,114,261,261}, +#line 65 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str227,34,264,227,227,262,112,262,221,225,255,255,245,245,112,259,259}, +#line 61 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str228,30,265,228,228,263,113,263,222,226,256,256,246,246,113,260,260}, +#line 298 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str229,267,26,101,521,26,117,26,99,99,26,26,26,26,117,26,26}, +#line 309 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str230,278,305,267,267,332,78,298,257,261,285,285,296,296,78,298,298}, +#line 194 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str231,163,__PNR_kexec_file_load,320,320,401,294,__PNR_kexec_file_load,__PNR_kexec_file_load,__PNR_kexec_file_load,355,355,382,382,294,381,381}, +#line 304 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str232,273,131,179,179,131,60,131,172,172,131,131,131,131,60,131,131}, +#line 263 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str233,232,109,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,__PNR_olduname,109,109,__PNR_olduname,__PNR_olduname,__PNR_olduname}, +#line 406 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str234,375,398,67,67,306,197,398,65,65,193,193,398,398,197,398,398}, +#line 273 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str235,242,336,298,298,364,241,333,292,296,318,318,319,319,241,331,331}, +#line 398 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str236,367,79,164,164,79,170,79,159,159,79,79,79,79,170,79,79}, +#line 165 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str237,134,78,96,96,78,169,78,94,94,78,78,78,78,169,78,78}, +#line 440 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str238,409,314,277,277,__PNR_sync_file_range,84,305,264,268,292,292,__PNR_sync_file_range,__PNR_sync_file_range,84,307,307}, +#line 497 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str239,466,7,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid,7,__PNR_waitpid,__PNR_waitpid,7,7,7,7,__PNR_waitpid,__PNR_waitpid,__PNR_waitpid}, +#line 174 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str240,143,291,253,253,316,__PNR_inotify_init,284,243,247,269,269,275,275,__PNR_inotify_init,284,284}, +#line 359 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str241,328,393,64,64,299,190,393,62,62,186,186,393,393,190,393,393}, +#line 217 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str242,186,356,319,319,385,279,354,314,318,340,340,360,360,279,350,350}, +#line 96 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str243,65,338,300,300,367,262,336,295,300,322,322,323,323,262,332,332}, +#line 237 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str244,206,277,240,240,274,180,271,230,234,229,229,262,262,180,271,271}, +#line 374 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str245,343,46,106,106,46,144,46,104,104,46,46,46,46,144,46,214}, +#line 138 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str246,107,47,104,104,47,176,47,102,102,47,47,47,47,176,47,200}, +#line 215 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str247,184,274,237,237,319,235,268,227,231,260,260,259,259,235,268,268}, +#line 175 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str248,144,332,294,294,360,26,329,288,292,314,314,318,318,26,324,324}, +#line 106 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str249,75,148,75,75,148,83,152,73,73,148,148,148,148,83,148,148}, +#line 279 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str250,248,331,293,293,359,59,328,287,291,313,313,317,317,59,325,325}, +#line 362 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str251,331,420,__PNR_semtimedop_time64,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,420,420,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64,__PNR_semtimedop_time64,420,__PNR_semtimedop_time64}, +#line 227 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str252,196,90,9,9,__PNR_mmap,222,90,9,9,90,90,90,90,222,90,90}, +#line 432 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str253,401,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot,310,310,__PNR_subpage_prot,__PNR_subpage_prot,__PNR_subpage_prot}, +#line 195 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str254,164,283,246,528,347,104,311,270,274,300,300,268,268,104,277,277}, +#line 63 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str255,32,267,230,230,265,115,265,224,228,258,258,248,248,115,262,262}, +#line 405 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str256,374,396,31,31,308,195,396,30,30,195,195,396,396,195,396,396}, +#line 473 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str257,442,60,95,95,60,166,60,93,93,60,60,60,60,166,60,60}, +#line 323 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str258,292,0,219,219,0,128,253,213,214,0,0,0,0,128,7,7}, +#line 78 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str259,47,254,213,213,250,__PNR_epoll_create,248,207,207,224,224,236,236,__PNR_epoll_create,249,249}, +#line 307 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str260,276,89,__PNR_readdir,__PNR_readdir,__PNR_readdir,__PNR_readdir,89,__PNR_readdir,__PNR_readdir,__PNR_readdir,__PNR_readdir,89,89,__PNR_readdir,89,89}, +#line 350 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str261,319,241,203,203,241,122,239,195,195,211,211,222,222,122,239,239}, +#line 342 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str262,311,242,204,204,242,123,240,196,196,212,212,223,223,123,240,240}, +#line 354 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str263,323,158,24,24,158,124,162,23,23,158,158,158,158,124,158,158}, +#line 79 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str264,48,329,291,291,357,20,326,285,289,311,311,315,315,20,327,327}, +#line 224 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str265,193,150,149,149,150,228,154,146,146,150,150,150,150,228,150,150}, +#line 340 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str266,309,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,__PNR_s390_runtime_instr,342,342}, +#line 101 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str267,70,95,93,93,95,55,95,91,91,95,95,95,95,55,95,207}, +#line 188 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str268,157,248,209,544,246,2,244,203,203,218,218,230,230,2,246,246}, +#line 147 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str269,116,65,111,111,65,__PNR_getpgrp,65,109,109,65,65,65,65,__PNR_getpgrp,65,65}, +#line 409 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str270,378,67,__PNR_sigaction,__PNR_sigaction,67,__PNR_sigaction,67,__PNR_sigaction,__PNR_sigaction,__PNR_sigaction,__PNR_sigaction,67,67,__PNR_sigaction,67,67}, +#line 214 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str271,183,219,28,28,220,233,218,27,27,119,119,205,205,233,219,219}, +#line 240 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str272,209,279,242,242,276,182,273,232,236,231,231,264,264,182,273,273}, +#line 135 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str273,104,202,__PNR_getegid32,__PNR_getegid32,202,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,__PNR_getegid32,202,__PNR_getegid32}, +#line 137 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str274,106,201,__PNR_geteuid32,__PNR_geteuid32,201,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,__PNR_geteuid32,201,__PNR_geteuid32}, +#line 145 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str275,114,368,52,52,287,205,171,51,51,53,53,332,332,205,368,368}, +#line 424 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str276,393,69,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask,69,__PNR_ssetmask,__PNR_ssetmask,69,69,69,69,__PNR_ssetmask,__PNR_ssetmask,__PNR_ssetmask}, +#line 403 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str277,372,68,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask,68,__PNR_sgetmask,__PNR_sgetmask,68,68,68,68,__PNR_sgetmask,__PNR_sgetmask,__PNR_sgetmask}, +#line 198 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str278,167,16,94,94,16,__PNR_lchown,16,92,92,16,16,16,16,__PNR_lchown,16,198}, +#line 103 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str279,72,298,260,260,325,54,291,250,254,278,278,289,289,54,291,291}, +#line 53 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str280,22,15,90,90,15,__PNR_chmod,15,88,88,15,15,15,15,__PNR_chmod,15,15}, +#line 453 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str281,422,259,222,526,257,107,257,216,220,250,250,240,240,107,254,254}, +#line 50 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str282,19,184,125,125,184,90,204,123,123,106,106,183,183,90,184,184}, +#line 447 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str283,416,116,99,99,116,179,116,97,97,116,116,116,116,179,116,116}, +#line 245 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str284,214,399,68,68,303,186,399,66,66,190,190,399,399,186,399,399}, +#line 257 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str285,226,169,180,__PNR_nfsservctl,169,42,189,173,173,__PNR_nfsservctl,__PNR_nfsservctl,168,168,42,169,169}, +#line 109 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str286,78,234,196,196,234,13,232,188,188,246,246,217,217,13,232,232}, +#line 206 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str287,175,140,__PNR__llseek,__PNR__llseek,140,__PNR__llseek,140,__PNR__llseek,__PNR__llseek,140,140,140,140,__PNR__llseek,140,__PNR__llseek}, +#line 331 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str288,300,178,129,524,178,138,198,127,127,178,178,177,177,138,178,178}, +#line 336 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str289,305,335,297,536,363,240,332,291,295,317,317,322,322,240,330,330}, +#line 345 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str290,314,159,146,146,159,125,163,143,143,159,159,159,159,125,159,159}, +#line 179 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str291,148,246,207,207,244,1,242,201,201,216,216,228,228,1,244,244}, +#line 498 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str292,467,4,1,1,4,64,4,1,1,4,4,4,4,64,4,4}, +#line 205 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str293,174,233,195,195,233,12,231,187,187,245,245,216,216,12,231,231}, +#line 251 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str294,220,153,152,152,153,231,157,149,149,153,153,153,153,231,153,153}, +#line 397 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str295,366,258,218,218,256,96,252,212,213,237,237,232,232,96,252,252}, +#line 72 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str296,41,8,85,85,8,__PNR_creat,8,83,83,8,8,8,8,__PNR_creat,8,8}, +#line 281 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str297,250,381,330,330,395,289,364,324,328,352,352,384,384,289,385,385}, +#line 256 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str298,225,142,__PNR__newselect,__PNR__newselect,142,__PNR__newselect,142,22,22,142,142,142,142,__PNR__newselect,142,__PNR__newselect}, +#line 282 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str299,251,382,331,331,396,290,365,325,329,353,353,385,385,290,386,386}, +#line 266 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str300,235,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437}, +#line 39 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str301,8,384,158,158,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl,__PNR_arch_prctl}, +#line 56 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str302,25,61,161,161,61,51,61,156,156,61,61,61,61,51,61,61}, +#line 193 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str303,162,349,312,312,378,272,347,306,311,332,332,354,354,272,343,343}, +#line 477 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str304,446,10,87,87,10,__PNR_unlink,10,85,85,10,10,10,10,__PNR_unlink,10,10}, +#line 49 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str305,18,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,983042,__PNR_cacheflush,147,197,197,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush,__PNR_cacheflush}, +#line 324 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str306,293,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache,259,__PNR_riscv_flush_icache,__PNR_riscv_flush_icache}, +#line 379 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str307,348,104,38,38,104,103,104,36,36,104,104,104,104,103,104,104}, +#line 142 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str308,111,105,36,36,105,102,105,35,35,105,105,105,105,102,105,105}, +#line 319 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str309,288,38,82,82,38,__PNR_rename,38,80,80,38,38,38,38,__PNR_rename,38,38}, +#line 87 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str310,56,11,59,520,11,221,11,57,57,11,11,11,11,221,11,11}, +#line 335 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str311,304,421,__PNR_rt_sigtimedwait_time64,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,421,421,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64,__PNR_rt_sigtimedwait_time64,421,__PNR_rt_sigtimedwait_time64}, +#line 57 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str312,26,343,305,305,372,266,341,300,305,324,324,347,347,266,337,337}, +#line 326 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str313,295,386,334,334,398,293,367,327,331,354,354,387,387,293,383,383}, +#line 423 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str314,392,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run,278,278,__PNR_spu_run,__PNR_spu_run,__PNR_spu_run}, +#line 410 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str315,379,186,131,525,186,132,206,129,129,166,166,185,185,132,186,186}, +#line 465 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str316,434,409,__PNR_timer_settime64,__PNR_timer_settime64,409,__PNR_timer_settime64,409,__PNR_timer_settime64,409,409,__PNR_timer_settime64,409,__PNR_timer_settime64,__PNR_timer_settime64,409,__PNR_timer_settime64}, +#line 463 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str317,432,408,__PNR_timer_gettime64,__PNR_timer_gettime64,408,__PNR_timer_gettime64,408,__PNR_timer_gettime64,408,408,__PNR_timer_gettime64,408,__PNR_timer_gettime64,__PNR_timer_gettime64,408,__PNR_timer_gettime64}, +#line 460 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str318,429,411,__PNR_timerfd_settime64,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,411,411,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64,__PNR_timerfd_settime64,411,__PNR_timerfd_settime64}, +#line 458 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str319,427,410,__PNR_timerfd_gettime64,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,410,410,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64,__PNR_timerfd_gettime64,410,__PNR_timerfd_gettime64}, +#line 330 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str320,299,175,14,14,175,135,195,14,14,175,175,174,174,135,175,175}, +#line 308 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str321,277,85,89,89,85,__PNR_readlink,85,87,87,85,85,85,85,__PNR_readlink,85,85}, +#line 320 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str322,289,302,264,264,329,38,295,254,258,282,282,293,293,__PNR_renameat,295,295}, +#line 88 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str323,57,358,322,545,387,281,356,316,320,342,342,362,362,281,354,354}, +#line 221 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str324,190,296,258,258,323,34,289,248,252,276,276,287,287,34,289,289}, +#line 438 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str325,407,304,266,266,331,36,297,256,260,284,284,295,295,36,297,297}, +#line 402 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str326,371,226,188,188,226,5,224,180,180,238,238,209,209,5,224,224}, +#line 169 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str327,138,229,191,191,229,8,227,183,183,241,241,212,212,8,227,227}, +#line 117 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str328,86,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433}, +#line 191 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str329,160,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425}, +#line 426 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str330,395,195,__PNR_stat64,__PNR_stat64,195,__PNR_stat64,213,__PNR_stat64,__PNR_stat64,101,101,195,__PNR_stat64,__PNR_stat64,195,__PNR_stat64}, +#line 469 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str331,438,193,__PNR_truncate64,__PNR_truncate64,193,__PNR_truncate64,211,__PNR_truncate64,__PNR_truncate64,199,199,193,__PNR_truncate64,__PNR_truncate64,193,__PNR_truncate64}, +#line 182 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str332,151,385,333,333,399,292,368,328,332,350,350,388,388,292,382,382}, +#line 249 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str333,218,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer,201,201,__PNR_multiplexer,__PNR_multiplexer,__PNR_multiplexer}, +#line 429 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str334,398,383,332,332,397,291,366,326,330,349,349,383,383,291,379,379}, +#line 297 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str335,266,413,__PNR_pselect6_time64,__PNR_pselect6_time64,413,__PNR_pselect6_time64,413,__PNR_pselect6_time64,413,413,__PNR_pselect6_time64,413,__PNR_pselect6_time64,__PNR_pselect6_time64,413,__PNR_pselect6_time64}, +#line 127 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str336,96,240,202,202,240,98,238,194,194,210,210,221,221,98,238,238}, +#line 316 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str337,285,372,47,519,297,212,177,46,46,184,184,342,342,212,372,372}, +#line 489 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str338,458,190,58,58,190,__PNR_vfork,__PNR_vfork,__PNR_vfork,__PNR_vfork,113,113,189,189,__PNR_vfork,190,190}, +#line 348 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str339,317,161,148,148,161,127,165,145,145,161,161,161,161,127,161,161}, +#line 428 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str340,397,268,__PNR_statfs64,__PNR_statfs64,266,__PNR_statfs64,255,__PNR_statfs64,217,298,298,252,252,__PNR_statfs64,265,265}, +#line 97 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str341,66,339,301,301,368,263,337,296,301,323,323,324,324,263,333,333}, +#line 306 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str342,275,225,187,187,225,213,223,179,179,207,207,191,191,213,222,222}, +#line 310 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str343,279,145,19,515,145,65,145,18,18,145,145,145,145,65,145,145}, +#line 246 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str344,215,401,70,70,302,188,401,68,68,189,189,401,401,188,401,401}, +#line 286 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str345,255,414,__PNR_ppoll_time64,__PNR_ppoll_time64,414,__PNR_ppoll_time64,414,__PNR_ppoll_time64,414,414,__PNR_ppoll_time64,414,__PNR_ppoll_time64,__PNR_ppoll_time64,414,__PNR_ppoll_time64}, +#line 441 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str346,410,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2,308,308,__PNR_sync_file_range2,__PNR_sync_file_range2,__PNR_sync_file_range2}, +#line 216 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str347,185,375,324,324,389,283,358,318,322,343,343,365,365,283,356,356}, +#line 83 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str348,52,256,232,232,252,__PNR_epoll_wait,250,209,209,226,226,238,238,__PNR_epoll_wait,251,251}, +#line 238 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str349,207,280,243,243,277,183,274,233,237,232,232,265,265,183,274,274}, +#line 47 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str350,16,45,12,12,45,214,45,12,12,45,45,45,45,214,45,45}, +#line 84 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str351,53,__PNR_epoll_wait_old,215,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old,__PNR_epoll_wait_old}, +#line 126 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str352,95,194,__PNR_ftruncate64,__PNR_ftruncate64,194,__PNR_ftruncate64,212,__PNR_ftruncate64,__PNR_ftruncate64,200,200,194,__PNR_ftruncate64,__PNR_ftruncate64,194,__PNR_ftruncate64}, +#line 114 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str353,83,228,190,190,228,7,226,182,182,240,240,211,211,7,226,226}, +#line 107 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str354,76,231,193,193,231,10,229,185,185,243,243,214,214,10,229,229}, +#line 422 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str355,391,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create,279,279,__PNR_spu_create,__PNR_spu_create,__PNR_spu_create}, +#line 317 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str356,286,257,216,216,253,234,251,210,210,227,227,239,239,234,267,267}, +#line 90 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str357,59,252,231,231,248,94,246,205,205,222,222,234,234,94,248,248}, +#line 82 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str358,51,319,281,281,346,22,313,272,276,297,297,303,303,22,312,312}, +#line 376 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str359,345,81,116,116,81,159,81,114,114,81,81,81,81,159,81,206}, +#line 140 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str360,109,80,115,115,80,158,80,113,113,80,80,80,80,158,80,205}, +#line 250 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str361,219,151,150,150,151,229,155,147,147,151,151,151,151,229,151,151}, +#line 211 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str362,180,227,189,189,227,6,225,181,181,239,239,210,210,6,225,225}, +#line 200 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str363,169,230,192,192,230,9,228,184,184,242,242,213,213,9,228,228}, +#line 325 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str364,294,40,84,84,40,__PNR_rmdir,40,82,82,40,40,40,40,__PNR_rmdir,40,40}, +#line 204 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str365,173,232,194,194,232,11,230,186,186,244,244,215,215,11,230,230}, +#line 413 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str366,382,327,289,289,355,74,324,283,287,309,309,313,313,74,322,322}, +#line 283 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str367,252,380,329,329,394,288,363,323,327,351,351,386,386,288,384,384}, +#line 229 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str368,198,123,154,154,__PNR_modify_ldt,__PNR_modify_ldt,123,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt,123,123,__PNR_modify_ldt,__PNR_modify_ldt,__PNR_modify_ldt}, +#line 32 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str369,1,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364}, +#line 66 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str370,35,404,__PNR_clock_settime64,__PNR_clock_settime64,404,__PNR_clock_settime64,404,__PNR_clock_settime64,404,404,__PNR_clock_settime64,404,__PNR_clock_settime64,__PNR_clock_settime64,404,__PNR_clock_settime64}, +#line 62 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str371,31,403,__PNR_clock_gettime64,__PNR_clock_gettime64,403,__PNR_clock_gettime64,403,__PNR_clock_gettime64,403,403,__PNR_clock_gettime64,403,__PNR_clock_gettime64,__PNR_clock_gettime64,403,__PNR_clock_gettime64}, +#line 105 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str372,74,221,__PNR_fcntl64,__PNR_fcntl64,221,__PNR_fcntl64,220,__PNR_fcntl64,212,202,202,204,__PNR_fcntl64,__PNR_fcntl64,221,__PNR_fcntl64}, +#line 60 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str373,29,406,__PNR_clock_getres_time64,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,406,406,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64,__PNR_clock_getres_time64,406,__PNR_clock_getres_time64}, +#line 314 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str374,283,337,299,537,365,243,335,294,298,319,319,343,343,243,357,357}, +#line 220 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str375,189,39,83,83,39,__PNR_mkdir,39,81,81,39,39,39,39,__PNR_mkdir,39,39}, +#line 483 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str376,452,__PNR_usr32,__PNR_usr32,__PNR_usr32,983044,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32,__PNR_usr32}, +#line 434 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str377,403,115,168,168,115,225,115,163,163,115,115,115,115,225,115,115}, +#line 225 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str378,194,376,325,325,390,284,359,319,323,345,345,378,378,284,374,374}, +#line 493 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str379,462,316,278,532,343,75,307,266,270,294,294,285,285,75,309,309}, +#line 401 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str380,370,213,__PNR_setuid32,__PNR_setuid32,213,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,__PNR_setuid32,213,__PNR_setuid32}, +#line 168 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str381,137,199,__PNR_getuid32,__PNR_getuid32,199,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,__PNR_getuid32,199,__PNR_getuid32}, +#line 435 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str382,404,87,167,167,87,224,87,162,162,87,87,87,87,224,87,87}, +#line 253 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str383,222,341,303,303,370,264,339,298,303,325,325,345,345,264,335,335}, +#line 86 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str384,55,328,290,290,356,19,325,284,288,310,310,314,314,19,323,323}, +#line 64 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str385,33,407,__PNR_clock_nanosleep_time64,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,407,407,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64,__PNR_clock_nanosleep_time64,407,__PNR_clock_nanosleep_time64}, +#line 189 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str386,158,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426}, +#line 190 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str387,159,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427}, +#line 480 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str388,449,86,134,__PNR_uselib,86,__PNR_uselib,86,__PNR_uselib,__PNR_uselib,86,86,86,86,__PNR_uselib,86,86}, +#line 36 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str389,5,124,159,159,124,171,124,154,154,124,124,124,124,171,124,124}, +#line 404 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str390,373,397,30,30,305,196,397,29,29,192,192,397,397,196,397,397}, +#line 180 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str391,149,247,208,208,245,4,243,202,202,217,217,229,229,4,245,245}, +#line 437 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str392,406,83,88,88,83,__PNR_symlink,83,86,86,83,83,83,83,__PNR_symlink,83,83}, +#line 490 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str393,459,111,153,153,111,58,111,150,150,111,111,111,111,58,111,111}, +#line 312 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str394,281,__PNR_recv,__PNR_recv,__PNR_recv,291,__PNR_recv,175,__PNR_recv,__PNR_recv,98,98,336,336,__PNR_recv,__PNR_recv,__PNR_recv}, +#line 143 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str395,112,130,177,__PNR_get_kernel_syms,__PNR_get_kernel_syms,__PNR_get_kernel_syms,130,170,170,__PNR_get_kernel_syms,__PNR_get_kernel_syms,130,130,__PNR_get_kernel_syms,130,130}, +#line 37 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str396,6,137,183,183,__PNR_afs_syscall,__PNR_afs_syscall,137,176,176,__PNR_afs_syscall,__PNR_afs_syscall,137,137,__PNR_afs_syscall,137,137}, +#line 475 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str397,444,52,166,166,52,39,52,161,161,52,52,52,52,39,52,52}, +#line 241 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str398,210,418,__PNR_mq_timedsend_time64,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,418,418,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64,__PNR_mq_timedsend_time64,418,__PNR_mq_timedsend_time64}, +#line 292 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str399,261,347,310,539,376,270,345,304,309,330,330,351,351,270,340,340}, +#line 293 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str400,262,348,311,540,377,271,346,305,310,331,331,352,352,271,341,341}, +#line 73 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str401,42,127,174,__PNR_create_module,__PNR_create_module,__PNR_create_module,127,167,167,__PNR_create_module,__PNR_create_module,127,127,__PNR_create_module,127,127}, +#line 494 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str402,463,273,236,__PNR_vserver,313,__PNR_vserver,277,236,240,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver,__PNR_vserver}, +#line 433 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str403,402,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext,249,249,__PNR_swapcontext,__PNR_swapcontext,__PNR_swapcontext}, +#line 303 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str404,272,167,178,__PNR_query_module,__PNR_query_module,__PNR_query_module,187,171,171,__PNR_query_module,__PNR_query_module,166,166,__PNR_query_module,167,167}, +#line 54 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str405,23,182,92,92,182,__PNR_chown,202,90,90,180,180,181,181,__PNR_chown,182,212}, +#line 128 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str406,97,422,__PNR_futex_time64,__PNR_futex_time64,422,__PNR_futex_time64,422,__PNR_futex_time64,422,422,__PNR_futex_time64,422,__PNR_futex_time64,__PNR_futex_time64,422,__PNR_futex_time64}, +#line 58 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str407,27,405,__PNR_clock_adjtime64,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,405,405,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64,__PNR_clock_adjtime64,405,__PNR_clock_adjtime64}, +#line 407 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str408,376,395,29,29,307,194,395,28,28,194,194,395,395,194,395,395}, +#line 415 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str409,384,126,__PNR_sigprocmask,__PNR_sigprocmask,126,__PNR_sigprocmask,126,__PNR_sigprocmask,__PNR_sigprocmask,126,126,126,126,__PNR_sigprocmask,126,126}, +#line 341 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str410,310,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,__PNR_s390_sthyi,380,380}, +#line 173 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str411,142,292,254,254,317,27,285,244,248,270,270,276,276,27,285,285}, +#line 228 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str412,197,192,__PNR_mmap2,__PNR_mmap2,192,__PNR_mmap2,210,__PNR_mmap2,__PNR_mmap2,89,89,192,__PNR_mmap2,__PNR_mmap2,192,__PNR_mmap2}, +#line 377 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str413,346,206,__PNR_setgroups32,__PNR_setgroups32,206,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,__PNR_setgroups32,206,__PNR_setgroups32}, +#line 141 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str414,110,205,__PNR_getgroups32,__PNR_getgroups32,205,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,__PNR_getgroups32,205,__PNR_getgroups32}, +#line 408 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str415,377,373,48,48,293,210,182,47,47,117,117,338,338,210,373,373}, +#line 380 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str416,349,276,238,238,321,237,270,229,233,262,262,261,261,237,270,270}, +#line 144 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str417,113,275,239,239,320,236,269,228,232,261,261,260,260,236,269,269}, +#line 313 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str418,282,371,45,517,292,207,176,44,44,123,123,337,337,207,371,371}, +#line 349 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str419,318,423,__PNR_sched_rr_get_interval_time64,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,423,423,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64,__PNR_sched_rr_get_interval_time64,423,__PNR_sched_rr_get_interval_time64}, +#line 183 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str420,152,416,__PNR_io_pgetevents_time64,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,416,416,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64,__PNR_io_pgetevents_time64,416,__PNR_io_pgetevents_time64}, +#line 375 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str421,344,214,__PNR_setgid32,__PNR_setgid32,214,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,__PNR_setgid32,214,__PNR_setgid32}, +#line 139 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str422,108,200,__PNR_getgid32,__PNR_getgid32,200,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,__PNR_getgid32,200,__PNR_getgid32}, +#line 318 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str423,287,235,197,197,235,14,233,189,189,247,247,218,218,14,233,233}, +#line 393 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str424,362,311,273,530,338,99,309,268,272,289,289,300,300,99,304,304}, +#line 158 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str425,127,312,274,531,339,100,310,269,273,290,290,299,299,100,305,305}, +#line 52 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str426,21,12,80,80,12,49,12,78,78,12,12,12,12,49,12,12}, +#line 383 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str427,352,97,141,141,97,140,97,138,138,97,97,97,97,140,97,97}, +#line 151 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str428,120,96,140,140,96,141,96,137,137,96,96,96,96,141,96,96}, +#line 239 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str429,208,419,__PNR_mq_timedreceive_time64,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,419,419,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64,__PNR_mq_timedreceive_time64,419,__PNR_mq_timedreceive_time64}, +#line 119 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str430,88,197,__PNR_fstat64,__PNR_fstat64,197,__PNR_fstat64,215,__PNR_fstat64,__PNR_fstat64,112,112,197,__PNR_fstat64,__PNR_fstat64,197,__PNR_fstat64}, +#line 112 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str431,81,237,199,199,237,16,235,191,191,249,249,220,220,16,235,235}, +#line 102 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str432,71,207,__PNR_fchown32,__PNR_fchown32,207,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,__PNR_fchown32,207,__PNR_fchown32}, +#line 356 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str433,325,__PNR_security,185,185,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security,__PNR_security}, +#line 213 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str434,182,196,__PNR_lstat64,__PNR_lstat64,196,__PNR_lstat64,214,__PNR_lstat64,__PNR_lstat64,198,198,196,__PNR_lstat64,__PNR_lstat64,196,__PNR_lstat64}, +#line 122 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str435,91,269,__PNR_fstatfs64,__PNR_fstatfs64,267,__PNR_fstatfs64,256,__PNR_fstatfs64,218,299,299,253,253,__PNR_fstatfs64,266,266}, +#line 209 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str436,178,236,198,198,236,15,234,190,190,248,248,219,219,15,234,234}, +#line 199 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str437,168,198,__PNR_lchown32,__PNR_lchown32,198,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,__PNR_lchown32,198,__PNR_lchown32}, +#line 495 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str438,464,114,61,61,114,260,114,59,59,114,114,114,114,260,114,114}, +#line 120 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str439,89,300,__PNR_fstatat64,__PNR_fstatat64,327,__PNR_fstatat64,293,__PNR_fstatat64,__PNR_fstatat64,280,280,291,__PNR_fstatat64,__PNR_fstatat64,293,__PNR_fstatat64}, +#line 235 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str440,204,282,245,245,279,185,276,235,239,234,234,267,267,185,276,276}, +#line 289 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str441,258,333,295,534,361,69,330,289,293,315,315,320,320,69,328,328}, +#line 322 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str442,291,287,249,249,310,218,281,240,244,265,265,270,270,218,279,279}, +#line 176 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str443,145,293,255,255,318,28,286,245,249,271,271,277,277,28,286,286}, +#line 445 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str444,414,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,256,256,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext,__PNR_sys_debug_setcontext}, +#line 236 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str445,205,281,244,527,278,184,275,234,238,233,233,266,266,184,275,275}, +#line 396 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str446,365,243,205,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,283,242,246,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area,__PNR_set_thread_area}, +#line 163 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str447,132,244,211,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area,__PNR_get_thread_area}, +#line 41 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str448,10,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,341,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range,__PNR_arm_sync_file_range}, +#line 499 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str449,468,146,20,516,146,66,146,19,19,146,146,146,146,66,146,146}, +#line 321 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str450,290,353,316,316,382,276,351,311,315,337,337,357,357,276,347,347}, +#line 436 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str451,405,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian,363,363,__PNR_switch_endian,__PNR_switch_endian,__PNR_switch_endian}, +#line 93 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str452,62,250,221,221,__PNR_fadvise64,223,254,215,216,__PNR_fadvise64,__PNR_fadvise64,233,233,223,253,253}, +#line 291 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str453,260,340,302,302,369,261,338,297,302,321,321,325,325,261,334,334}, +#line 94 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str454,63,272,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,__PNR_fadvise64_64,236,236,254,__PNR_fadvise64_64,__PNR_fadvise64_64,264,__PNR_fadvise64_64}, +#line 301 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str455,270,334,296,535,362,70,331,290,294,316,316,321,321,70,329,329}, +#line 242 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str456,211,278,241,241,275,181,272,231,235,230,230,263,263,181,272,272}, +#line 46 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str457,15,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,983041,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint,__PNR_breakpoint}, +#line 288 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str458,257,180,17,17,180,67,200,16,16,108,108,179,179,67,180,180}, +#line 315 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str459,284,417,__PNR_recvmmsg_time64,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,417,417,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64,__PNR_recvmmsg_time64,417,__PNR_recvmmsg_time64}, +#line 40 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str460,9,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,270,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64,__PNR_arm_fadvise64_64}, +#line 35 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str461,4,286,248,248,309,217,280,239,243,264,264,269,269,217,278,278}, +#line 300 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str462,269,181,18,18,181,68,201,17,17,109,109,180,180,68,181,181}, +#line 290 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str463,259,378,327,546,392,286,361,321,325,347,347,380,380,286,376,376}, +#line 45 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str464,14,17,__PNR_break,__PNR_break,__PNR_break,__PNR_break,17,__PNR_break,__PNR_break,__PNR_break,__PNR_break,17,17,__PNR_break,__PNR_break,__PNR_break}, +#line 302 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str465,271,379,328,547,393,287,362,322,326,348,348,381,381,287,377,377}, +#line 42 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str466,11,134,__PNR_bdflush,__PNR_bdflush,134,__PNR_bdflush,134,__PNR_bdflush,__PNR_bdflush,134,134,134,134,__PNR_bdflush,134,134}, +#line 55 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str467,24,212,__PNR_chown32,__PNR_chown32,212,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,__PNR_chown32,212,__PNR_chown32}, +#line 267 "syscalls.perf" + {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str468,236,342,304,304,371,265,340,299,304,326,326,346,346,265,336,336} + }; + +const struct arch_syscall_table * +in_word_set (register const char *str, register size_t len) +{ + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + register const struct arch_syscall_table *resword; + + switch (key - 31) + { + case 0: + resword = &wordlist[0]; + goto compare; + case 8: + resword = &wordlist[1]; + goto compare; + case 10: + resword = &wordlist[2]; + goto compare; + case 16: + resword = &wordlist[3]; + goto compare; + case 17: + resword = &wordlist[4]; + goto compare; + case 21: + resword = &wordlist[5]; + goto compare; + case 23: + resword = &wordlist[6]; + goto compare; + case 27: + resword = &wordlist[7]; + goto compare; + case 28: + resword = &wordlist[8]; + goto compare; + case 30: + resword = &wordlist[9]; + goto compare; + case 31: + resword = &wordlist[10]; + goto compare; + case 33: + resword = &wordlist[11]; + goto compare; + case 35: + resword = &wordlist[12]; + goto compare; + case 36: + resword = &wordlist[13]; + goto compare; + case 37: + resword = &wordlist[14]; + goto compare; + case 39: + resword = &wordlist[15]; + goto compare; + case 40: + resword = &wordlist[16]; + goto compare; + case 45: + resword = &wordlist[17]; + goto compare; + case 47: + resword = &wordlist[18]; + goto compare; + case 49: + resword = &wordlist[19]; + goto compare; + case 53: + resword = &wordlist[20]; + goto compare; + case 54: + resword = &wordlist[21]; + goto compare; + case 55: + resword = &wordlist[22]; + goto compare; + case 56: + resword = &wordlist[23]; + goto compare; + case 57: + resword = &wordlist[24]; + goto compare; + case 58: + resword = &wordlist[25]; + goto compare; + case 60: + resword = &wordlist[26]; + goto compare; + case 61: + resword = &wordlist[27]; + goto compare; + case 62: + resword = &wordlist[28]; + goto compare; + case 64: + resword = &wordlist[29]; + goto compare; + case 65: + resword = &wordlist[30]; + goto compare; + case 66: + resword = &wordlist[31]; + goto compare; + case 67: + resword = &wordlist[32]; + goto compare; + case 68: + resword = &wordlist[33]; + goto compare; + case 69: + resword = &wordlist[34]; + goto compare; + case 75: + resword = &wordlist[35]; + goto compare; + case 76: + resword = &wordlist[36]; + goto compare; + case 78: + resword = &wordlist[37]; + goto compare; + case 79: + resword = &wordlist[38]; + goto compare; + case 81: + resword = &wordlist[39]; + goto compare; + case 82: + resword = &wordlist[40]; + goto compare; + case 86: + resword = &wordlist[41]; + goto compare; + case 88: + resword = &wordlist[42]; + goto compare; + case 92: + resword = &wordlist[43]; + goto compare; + case 93: + resword = &wordlist[44]; + goto compare; + case 94: + resword = &wordlist[45]; + goto compare; + case 98: + resword = &wordlist[46]; + goto compare; + case 99: + resword = &wordlist[47]; + goto compare; + case 102: + resword = &wordlist[48]; + goto compare; + case 103: + resword = &wordlist[49]; + goto compare; + case 104: + resword = &wordlist[50]; + goto compare; + case 106: + resword = &wordlist[51]; + goto compare; + case 109: + resword = &wordlist[52]; + goto compare; + case 113: + resword = &wordlist[53]; + goto compare; + case 115: + resword = &wordlist[54]; + goto compare; + case 116: + resword = &wordlist[55]; + goto compare; + case 117: + resword = &wordlist[56]; + goto compare; + case 119: + resword = &wordlist[57]; + goto compare; + case 122: + resword = &wordlist[58]; + goto compare; + case 126: + resword = &wordlist[59]; + goto compare; + case 128: + resword = &wordlist[60]; + goto compare; + case 129: + resword = &wordlist[61]; + goto compare; + case 131: + resword = &wordlist[62]; + goto compare; + case 132: + resword = &wordlist[63]; + goto compare; + case 133: + resword = &wordlist[64]; + goto compare; + case 135: + resword = &wordlist[65]; + goto compare; + case 136: + resword = &wordlist[66]; + goto compare; + case 141: + resword = &wordlist[67]; + goto compare; + case 148: + resword = &wordlist[68]; + goto compare; + case 155: + resword = &wordlist[69]; + goto compare; + case 158: + resword = &wordlist[70]; + goto compare; + case 160: + resword = &wordlist[71]; + goto compare; + case 161: + resword = &wordlist[72]; + goto compare; + case 171: + resword = &wordlist[73]; + goto compare; + case 180: + resword = &wordlist[74]; + goto compare; + case 181: + resword = &wordlist[75]; + goto compare; + case 182: + resword = &wordlist[76]; + goto compare; + case 184: + resword = &wordlist[77]; + goto compare; + case 185: + resword = &wordlist[78]; + goto compare; + case 186: + resword = &wordlist[79]; + goto compare; + case 187: + resword = &wordlist[80]; + goto compare; + case 189: + resword = &wordlist[81]; + goto compare; + case 191: + resword = &wordlist[82]; + goto compare; + case 199: + resword = &wordlist[83]; + goto compare; + case 203: + resword = &wordlist[84]; + goto compare; + case 210: + resword = &wordlist[85]; + goto compare; + case 213: + resword = &wordlist[86]; + goto compare; + case 214: + resword = &wordlist[87]; + goto compare; + case 217: + resword = &wordlist[88]; + goto compare; + case 219: + resword = &wordlist[89]; + goto compare; + case 222: + resword = &wordlist[90]; + goto compare; + case 224: + resword = &wordlist[91]; + goto compare; + case 225: + resword = &wordlist[92]; + goto compare; + case 227: + resword = &wordlist[93]; + goto compare; + case 228: + resword = &wordlist[94]; + goto compare; + case 234: + resword = &wordlist[95]; + goto compare; + case 236: + resword = &wordlist[96]; + goto compare; + case 237: + resword = &wordlist[97]; + goto compare; + case 242: + resword = &wordlist[98]; + goto compare; + case 243: + resword = &wordlist[99]; + goto compare; + case 244: + resword = &wordlist[100]; + goto compare; + case 245: + resword = &wordlist[101]; + goto compare; + case 248: + resword = &wordlist[102]; + goto compare; + case 249: + resword = &wordlist[103]; + goto compare; + case 250: + resword = &wordlist[104]; + goto compare; + case 255: + resword = &wordlist[105]; + goto compare; + case 257: + resword = &wordlist[106]; + goto compare; + case 262: + resword = &wordlist[107]; + goto compare; + case 264: + resword = &wordlist[108]; + goto compare; + case 266: + resword = &wordlist[109]; + goto compare; + case 268: + resword = &wordlist[110]; + goto compare; + case 274: + resword = &wordlist[111]; + goto compare; + case 275: + resword = &wordlist[112]; + goto compare; + case 278: + resword = &wordlist[113]; + goto compare; + case 280: + resword = &wordlist[114]; + goto compare; + case 282: + resword = &wordlist[115]; + goto compare; + case 283: + resword = &wordlist[116]; + goto compare; + case 285: + resword = &wordlist[117]; + goto compare; + case 288: + resword = &wordlist[118]; + goto compare; + case 292: + resword = &wordlist[119]; + goto compare; + case 295: + resword = &wordlist[120]; + goto compare; + case 297: + resword = &wordlist[121]; + goto compare; + case 300: + resword = &wordlist[122]; + goto compare; + case 308: + resword = &wordlist[123]; + goto compare; + case 310: + resword = &wordlist[124]; + goto compare; + case 312: + resword = &wordlist[125]; + goto compare; + case 315: + resword = &wordlist[126]; + goto compare; + case 317: + resword = &wordlist[127]; + goto compare; + case 318: + resword = &wordlist[128]; + goto compare; + case 319: + resword = &wordlist[129]; + goto compare; + case 320: + resword = &wordlist[130]; + goto compare; + case 321: + resword = &wordlist[131]; + goto compare; + case 322: + resword = &wordlist[132]; + goto compare; + case 323: + resword = &wordlist[133]; + goto compare; + case 325: + resword = &wordlist[134]; + goto compare; + case 326: + resword = &wordlist[135]; + goto compare; + case 334: + resword = &wordlist[136]; + goto compare; + case 335: + resword = &wordlist[137]; + goto compare; + case 336: + resword = &wordlist[138]; + goto compare; + case 337: + resword = &wordlist[139]; + goto compare; + case 340: + resword = &wordlist[140]; + goto compare; + case 343: + resword = &wordlist[141]; + goto compare; + case 344: + resword = &wordlist[142]; + goto compare; + case 347: + resword = &wordlist[143]; + goto compare; + case 348: + resword = &wordlist[144]; + goto compare; + case 349: + resword = &wordlist[145]; + goto compare; + case 350: + resword = &wordlist[146]; + goto compare; + case 352: + resword = &wordlist[147]; + goto compare; + case 353: + resword = &wordlist[148]; + goto compare; + case 354: + resword = &wordlist[149]; + goto compare; + case 355: + resword = &wordlist[150]; + goto compare; + case 356: + resword = &wordlist[151]; + goto compare; + case 358: + resword = &wordlist[152]; + goto compare; + case 360: + resword = &wordlist[153]; + goto compare; + case 361: + resword = &wordlist[154]; + goto compare; + case 362: + resword = &wordlist[155]; + goto compare; + case 363: + resword = &wordlist[156]; + goto compare; + case 365: + resword = &wordlist[157]; + goto compare; + case 366: + resword = &wordlist[158]; + goto compare; + case 367: + resword = &wordlist[159]; + goto compare; + case 368: + resword = &wordlist[160]; + goto compare; + case 369: + resword = &wordlist[161]; + goto compare; + case 371: + resword = &wordlist[162]; + goto compare; + case 372: + resword = &wordlist[163]; + goto compare; + case 373: + resword = &wordlist[164]; + goto compare; + case 375: + resword = &wordlist[165]; + goto compare; + case 376: + resword = &wordlist[166]; + goto compare; + case 377: + resword = &wordlist[167]; + goto compare; + case 379: + resword = &wordlist[168]; + goto compare; + case 383: + resword = &wordlist[169]; + goto compare; + case 384: + resword = &wordlist[170]; + goto compare; + case 385: + resword = &wordlist[171]; + goto compare; + case 386: + resword = &wordlist[172]; + goto compare; + case 388: + resword = &wordlist[173]; + goto compare; + case 389: + resword = &wordlist[174]; + goto compare; + case 390: + resword = &wordlist[175]; + goto compare; + case 394: + resword = &wordlist[176]; + goto compare; + case 397: + resword = &wordlist[177]; + goto compare; + case 398: + resword = &wordlist[178]; + goto compare; + case 399: + resword = &wordlist[179]; + goto compare; + case 400: + resword = &wordlist[180]; + goto compare; + case 406: + resword = &wordlist[181]; + goto compare; + case 409: + resword = &wordlist[182]; + goto compare; + case 412: + resword = &wordlist[183]; + goto compare; + case 414: + resword = &wordlist[184]; + goto compare; + case 416: + resword = &wordlist[185]; + goto compare; + case 420: + resword = &wordlist[186]; + goto compare; + case 421: + resword = &wordlist[187]; + goto compare; + case 422: + resword = &wordlist[188]; + goto compare; + case 424: + resword = &wordlist[189]; + goto compare; + case 426: + resword = &wordlist[190]; + goto compare; + case 431: + resword = &wordlist[191]; + goto compare; + case 433: + resword = &wordlist[192]; + goto compare; + case 434: + resword = &wordlist[193]; + goto compare; + case 435: + resword = &wordlist[194]; + goto compare; + case 437: + resword = &wordlist[195]; + goto compare; + case 438: + resword = &wordlist[196]; + goto compare; + case 439: + resword = &wordlist[197]; + goto compare; + case 442: + resword = &wordlist[198]; + goto compare; + case 443: + resword = &wordlist[199]; + goto compare; + case 444: + resword = &wordlist[200]; + goto compare; + case 445: + resword = &wordlist[201]; + goto compare; + case 449: + resword = &wordlist[202]; + goto compare; + case 454: + resword = &wordlist[203]; + goto compare; + case 456: + resword = &wordlist[204]; + goto compare; + case 458: + resword = &wordlist[205]; + goto compare; + case 461: + resword = &wordlist[206]; + goto compare; + case 465: + resword = &wordlist[207]; + goto compare; + case 467: + resword = &wordlist[208]; + goto compare; + case 468: + resword = &wordlist[209]; + goto compare; + case 470: + resword = &wordlist[210]; + goto compare; + case 472: + resword = &wordlist[211]; + goto compare; + case 473: + resword = &wordlist[212]; + goto compare; + case 476: + resword = &wordlist[213]; + goto compare; + case 477: + resword = &wordlist[214]; + goto compare; + case 479: + resword = &wordlist[215]; + goto compare; + case 480: + resword = &wordlist[216]; + goto compare; + case 483: + resword = &wordlist[217]; + goto compare; + case 485: + resword = &wordlist[218]; + goto compare; + case 486: + resword = &wordlist[219]; + goto compare; + case 489: + resword = &wordlist[220]; + goto compare; + case 493: + resword = &wordlist[221]; + goto compare; + case 494: + resword = &wordlist[222]; + goto compare; + case 495: + resword = &wordlist[223]; + goto compare; + case 496: + resword = &wordlist[224]; + goto compare; + case 500: + resword = &wordlist[225]; + goto compare; + case 501: + resword = &wordlist[226]; + goto compare; + case 503: + resword = &wordlist[227]; + goto compare; + case 504: + resword = &wordlist[228]; + goto compare; + case 507: + resword = &wordlist[229]; + goto compare; + case 508: + resword = &wordlist[230]; + goto compare; + case 513: + resword = &wordlist[231]; + goto compare; + case 514: + resword = &wordlist[232]; + goto compare; + case 516: + resword = &wordlist[233]; + goto compare; + case 517: + resword = &wordlist[234]; + goto compare; + case 518: + resword = &wordlist[235]; + goto compare; + case 520: + resword = &wordlist[236]; + goto compare; + case 521: + resword = &wordlist[237]; + goto compare; + case 522: + resword = &wordlist[238]; + goto compare; + case 524: + resword = &wordlist[239]; + goto compare; + case 527: + resword = &wordlist[240]; + goto compare; + case 528: + resword = &wordlist[241]; + goto compare; + case 531: + resword = &wordlist[242]; + goto compare; + case 533: + resword = &wordlist[243]; + goto compare; + case 535: + resword = &wordlist[244]; + goto compare; + case 536: + resword = &wordlist[245]; + goto compare; + case 537: + resword = &wordlist[246]; + goto compare; + case 538: + resword = &wordlist[247]; + goto compare; + case 539: + resword = &wordlist[248]; + goto compare; + case 546: + resword = &wordlist[249]; + goto compare; + case 548: + resword = &wordlist[250]; + goto compare; + case 551: + resword = &wordlist[251]; + goto compare; + case 556: + resword = &wordlist[252]; + goto compare; + case 557: + resword = &wordlist[253]; + goto compare; + case 558: + resword = &wordlist[254]; + goto compare; + case 560: + resword = &wordlist[255]; + goto compare; + case 561: + resword = &wordlist[256]; + goto compare; + case 564: + resword = &wordlist[257]; + goto compare; + case 566: + resword = &wordlist[258]; + goto compare; + case 568: + resword = &wordlist[259]; + goto compare; + case 570: + resword = &wordlist[260]; + goto compare; + case 573: + resword = &wordlist[261]; + goto compare; + case 574: + resword = &wordlist[262]; + goto compare; + case 576: + resword = &wordlist[263]; + goto compare; + case 578: + resword = &wordlist[264]; + goto compare; + case 580: + resword = &wordlist[265]; + goto compare; + case 589: + resword = &wordlist[266]; + goto compare; + case 590: + resword = &wordlist[267]; + goto compare; + case 591: + resword = &wordlist[268]; + goto compare; + case 593: + resword = &wordlist[269]; + goto compare; + case 594: + resword = &wordlist[270]; + goto compare; + case 597: + resword = &wordlist[271]; + goto compare; + case 598: + resword = &wordlist[272]; + goto compare; + case 599: + resword = &wordlist[273]; + goto compare; + case 601: + resword = &wordlist[274]; + goto compare; + case 602: + resword = &wordlist[275]; + goto compare; + case 605: + resword = &wordlist[276]; + goto compare; + case 606: + resword = &wordlist[277]; + goto compare; + case 607: + resword = &wordlist[278]; + goto compare; + case 610: + resword = &wordlist[279]; + goto compare; + case 615: + resword = &wordlist[280]; + goto compare; + case 616: + resword = &wordlist[281]; + goto compare; + case 617: + resword = &wordlist[282]; + goto compare; + case 618: + resword = &wordlist[283]; + goto compare; + case 621: + resword = &wordlist[284]; + goto compare; + case 623: + resword = &wordlist[285]; + goto compare; + case 624: + resword = &wordlist[286]; + goto compare; + case 629: + resword = &wordlist[287]; + goto compare; + case 630: + resword = &wordlist[288]; + goto compare; + case 631: + resword = &wordlist[289]; + goto compare; + case 633: + resword = &wordlist[290]; + goto compare; + case 639: + resword = &wordlist[291]; + goto compare; + case 640: + resword = &wordlist[292]; + goto compare; + case 641: + resword = &wordlist[293]; + goto compare; + case 642: + resword = &wordlist[294]; + goto compare; + case 647: + resword = &wordlist[295]; + goto compare; + case 648: + resword = &wordlist[296]; + goto compare; + case 649: + resword = &wordlist[297]; + goto compare; + case 650: + resword = &wordlist[298]; + goto compare; + case 658: + resword = &wordlist[299]; + goto compare; + case 661: + resword = &wordlist[300]; + goto compare; + case 662: + resword = &wordlist[301]; + goto compare; + case 667: + resword = &wordlist[302]; + goto compare; + case 669: + resword = &wordlist[303]; + goto compare; + case 674: + resword = &wordlist[304]; + goto compare; + case 675: + resword = &wordlist[305]; + goto compare; + case 677: + resword = &wordlist[306]; + goto compare; + case 679: + resword = &wordlist[307]; + goto compare; + case 680: + resword = &wordlist[308]; + goto compare; + case 681: + resword = &wordlist[309]; + goto compare; + case 682: + resword = &wordlist[310]; + goto compare; + case 687: + resword = &wordlist[311]; + goto compare; + case 688: + resword = &wordlist[312]; + goto compare; + case 695: + resword = &wordlist[313]; + goto compare; + case 698: + resword = &wordlist[314]; + goto compare; + case 700: + resword = &wordlist[315]; + goto compare; + case 702: + resword = &wordlist[316]; + goto compare; + case 703: + resword = &wordlist[317]; + goto compare; + case 704: + resword = &wordlist[318]; + goto compare; + case 705: + resword = &wordlist[319]; + goto compare; + case 706: + resword = &wordlist[320]; + goto compare; + case 710: + resword = &wordlist[321]; + goto compare; + case 711: + resword = &wordlist[322]; + goto compare; + case 712: + resword = &wordlist[323]; + goto compare; + case 714: + resword = &wordlist[324]; + goto compare; + case 716: + resword = &wordlist[325]; + goto compare; + case 718: + resword = &wordlist[326]; + goto compare; + case 719: + resword = &wordlist[327]; + goto compare; + case 725: + resword = &wordlist[328]; + goto compare; + case 735: + resword = &wordlist[329]; + goto compare; + case 737: + resword = &wordlist[330]; + goto compare; + case 738: + resword = &wordlist[331]; + goto compare; + case 739: + resword = &wordlist[332]; + goto compare; + case 742: + resword = &wordlist[333]; + goto compare; + case 747: + resword = &wordlist[334]; + goto compare; + case 748: + resword = &wordlist[335]; + goto compare; + case 749: + resword = &wordlist[336]; + goto compare; + case 750: + resword = &wordlist[337]; + goto compare; + case 754: + resword = &wordlist[338]; + goto compare; + case 755: + resword = &wordlist[339]; + goto compare; + case 756: + resword = &wordlist[340]; + goto compare; + case 759: + resword = &wordlist[341]; + goto compare; + case 762: + resword = &wordlist[342]; + goto compare; + case 767: + resword = &wordlist[343]; + goto compare; + case 769: + resword = &wordlist[344]; + goto compare; + case 771: + resword = &wordlist[345]; + goto compare; + case 773: + resword = &wordlist[346]; + goto compare; + case 774: + resword = &wordlist[347]; + goto compare; + case 776: + resword = &wordlist[348]; + goto compare; + case 777: + resword = &wordlist[349]; + goto compare; + case 779: + resword = &wordlist[350]; + goto compare; + case 781: + resword = &wordlist[351]; + goto compare; + case 782: + resword = &wordlist[352]; + goto compare; + case 783: + resword = &wordlist[353]; + goto compare; + case 784: + resword = &wordlist[354]; + goto compare; + case 785: + resword = &wordlist[355]; + goto compare; + case 787: + resword = &wordlist[356]; + goto compare; + case 789: + resword = &wordlist[357]; + goto compare; + case 790: + resword = &wordlist[358]; + goto compare; + case 797: + resword = &wordlist[359]; + goto compare; + case 798: + resword = &wordlist[360]; + goto compare; + case 799: + resword = &wordlist[361]; + goto compare; + case 800: + resword = &wordlist[362]; + goto compare; + case 801: + resword = &wordlist[363]; + goto compare; + case 806: + resword = &wordlist[364]; + goto compare; + case 808: + resword = &wordlist[365]; + goto compare; + case 811: + resword = &wordlist[366]; + goto compare; + case 816: + resword = &wordlist[367]; + goto compare; + case 817: + resword = &wordlist[368]; + goto compare; + case 819: + resword = &wordlist[369]; + goto compare; + case 840: + resword = &wordlist[370]; + goto compare; + case 841: + resword = &wordlist[371]; + goto compare; + case 842: + resword = &wordlist[372]; + goto compare; + case 845: + resword = &wordlist[373]; + goto compare; + case 854: + resword = &wordlist[374]; + goto compare; + case 857: + resword = &wordlist[375]; + goto compare; + case 858: + resword = &wordlist[376]; + goto compare; + case 864: + resword = &wordlist[377]; + goto compare; + case 867: + resword = &wordlist[378]; + goto compare; + case 870: + resword = &wordlist[379]; + goto compare; + case 874: + resword = &wordlist[380]; + goto compare; + case 875: + resword = &wordlist[381]; + goto compare; + case 876: + resword = &wordlist[382]; + goto compare; + case 877: + resword = &wordlist[383]; + goto compare; + case 881: + resword = &wordlist[384]; + goto compare; + case 883: + resword = &wordlist[385]; + goto compare; + case 889: + resword = &wordlist[386]; + goto compare; + case 892: + resword = &wordlist[387]; + goto compare; + case 893: + resword = &wordlist[388]; + goto compare; + case 894: + resword = &wordlist[389]; + goto compare; + case 897: + resword = &wordlist[390]; + goto compare; + case 900: + resword = &wordlist[391]; + goto compare; + case 910: + resword = &wordlist[392]; + goto compare; + case 911: + resword = &wordlist[393]; + goto compare; + case 913: + resword = &wordlist[394]; + goto compare; + case 919: + resword = &wordlist[395]; + goto compare; + case 930: + resword = &wordlist[396]; + goto compare; + case 933: + resword = &wordlist[397]; + goto compare; + case 941: + resword = &wordlist[398]; + goto compare; + case 953: + resword = &wordlist[399]; + goto compare; + case 954: + resword = &wordlist[400]; + goto compare; + case 955: + resword = &wordlist[401]; + goto compare; + case 958: + resword = &wordlist[402]; + goto compare; + case 972: + resword = &wordlist[403]; + goto compare; + case 973: + resword = &wordlist[404]; + goto compare; + case 981: + resword = &wordlist[405]; + goto compare; + case 986: + resword = &wordlist[406]; + goto compare; + case 1025: + resword = &wordlist[407]; + goto compare; + case 1027: + resword = &wordlist[408]; + goto compare; + case 1032: + resword = &wordlist[409]; + goto compare; + case 1036: + resword = &wordlist[410]; + goto compare; + case 1039: + resword = &wordlist[411]; + goto compare; + case 1048: + resword = &wordlist[412]; + goto compare; + case 1051: + resword = &wordlist[413]; + goto compare; + case 1052: + resword = &wordlist[414]; + goto compare; + case 1059: + resword = &wordlist[415]; + goto compare; + case 1068: + resword = &wordlist[416]; + goto compare; + case 1069: + resword = &wordlist[417]; + goto compare; + case 1073: + resword = &wordlist[418]; + goto compare; + case 1081: + resword = &wordlist[419]; + goto compare; + case 1083: + resword = &wordlist[420]; + goto compare; + case 1088: + resword = &wordlist[421]; + goto compare; + case 1089: + resword = &wordlist[422]; + goto compare; + case 1093: + resword = &wordlist[423]; + goto compare; + case 1106: + resword = &wordlist[424]; + goto compare; + case 1107: + resword = &wordlist[425]; + goto compare; + case 1114: + resword = &wordlist[426]; + goto compare; + case 1116: + resword = &wordlist[427]; + goto compare; + case 1117: + resword = &wordlist[428]; + goto compare; + case 1119: + resword = &wordlist[429]; + goto compare; + case 1126: + resword = &wordlist[430]; + goto compare; + case 1129: + resword = &wordlist[431]; + goto compare; + case 1131: + resword = &wordlist[432]; + goto compare; + case 1135: + resword = &wordlist[433]; + goto compare; + case 1143: + resword = &wordlist[434]; + goto compare; + case 1145: + resword = &wordlist[435]; + goto compare; + case 1146: + resword = &wordlist[436]; + goto compare; + case 1148: + resword = &wordlist[437]; + goto compare; + case 1149: + resword = &wordlist[438]; + goto compare; + case 1158: + resword = &wordlist[439]; + goto compare; + case 1169: + resword = &wordlist[440]; + goto compare; + case 1176: + resword = &wordlist[441]; + goto compare; + case 1178: + resword = &wordlist[442]; + goto compare; + case 1199: + resword = &wordlist[443]; + goto compare; + case 1204: + resword = &wordlist[444]; + goto compare; + case 1206: + resword = &wordlist[445]; + goto compare; + case 1207: + resword = &wordlist[446]; + goto compare; + case 1208: + resword = &wordlist[447]; + goto compare; + case 1217: + resword = &wordlist[448]; + goto compare; + case 1221: + resword = &wordlist[449]; + goto compare; + case 1224: + resword = &wordlist[450]; + goto compare; + case 1228: + resword = &wordlist[451]; + goto compare; + case 1230: + resword = &wordlist[452]; + goto compare; + case 1232: + resword = &wordlist[453]; + goto compare; + case 1233: + resword = &wordlist[454]; + goto compare; + case 1245: + resword = &wordlist[455]; + goto compare; + case 1274: + resword = &wordlist[456]; + goto compare; + case 1302: + resword = &wordlist[457]; + goto compare; + case 1322: + resword = &wordlist[458]; + goto compare; + case 1328: + resword = &wordlist[459]; + goto compare; + case 1337: + resword = &wordlist[460]; + goto compare; + case 1340: + resword = &wordlist[461]; + goto compare; + case 1391: + resword = &wordlist[462]; + goto compare; + case 1402: + resword = &wordlist[463]; + goto compare; + case 1405: + resword = &wordlist[464]; + goto compare; + case 1471: + resword = &wordlist[465]; + goto compare; + case 1515: + resword = &wordlist[466]; + goto compare; + case 1522: + resword = &wordlist[467]; + goto compare; + case 1609: + resword = &wordlist[468]; + goto compare; + } + return 0; + compare: + { + register const char *s = resword->name + stringpool; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return resword; + } + } + } + return 0; +} +#line 500 "syscalls.perf" + + +static int syscall_get_offset_value(const struct arch_syscall_table *s, + int offset) +{ + return *(int *)((char *)s + offset); +} + +int syscall_resolve_name(const char *name, int offset) +{ + const struct arch_syscall_table *s; + + s = in_word_set(name, strlen(name)); + if (s == NULL) + return __NR_SCMP_ERROR; + + return syscall_get_offset_value(s, offset); +} + +const char *syscall_resolve_num(int num, int offset) +{ + unsigned int iter; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (syscall_get_offset_value(&wordlist[iter], offset) == num) + return (stringpool + wordlist[iter].name); + } + + return NULL; +} + +const struct arch_syscall_def *syscall_iterate(unsigned int spot, int offset) +{ + unsigned int iter; + /* this is thread-unsafe, only use for testing */ + static struct arch_syscall_def arch_def; + + arch_def.name = NULL; + arch_def.num = __NR_SCMP_ERROR; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (wordlist[iter].index == spot) { + arch_def.name = stringpool + wordlist[iter].name; + arch_def.num = syscall_get_offset_value(&wordlist[iter], + offset); + return &arch_def; + } + } + + return &arch_def; +} diff -Nru libseccomp-2.4.3/src/syscalls.perf.template libseccomp-2.5.1/src/syscalls.perf.template --- libseccomp-2.4.3/src/syscalls.perf.template 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/src/syscalls.perf.template 2020-11-17 08:34:38.782027382 +1030 @@ -0,0 +1,82 @@ +%{ +/** + * Copyright (c) 2012 Red Hat + * Copyright (c) 2020 Red Hat + * Authors: Paul Moore + * Giuseppe Scrivano + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include "syscalls.h" + +%} +struct arch_syscall_table; + +%% +@@SYSCALLS_TABLE@@ +%% + +static int syscall_get_offset_value(const struct arch_syscall_table *s, + int offset) +{ + return *(int *)((char *)s + offset); +} + +int syscall_resolve_name(const char *name, int offset) +{ + const struct arch_syscall_table *s; + + s = in_word_set(name, strlen(name)); + if (s == NULL) + return __NR_SCMP_ERROR; + + return syscall_get_offset_value(s, offset); +} + +const char *syscall_resolve_num(int num, int offset) +{ + unsigned int iter; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (syscall_get_offset_value(&wordlist[iter], offset) == num) + return (stringpool + wordlist[iter].name); + } + + return NULL; +} + +const struct arch_syscall_def *syscall_iterate(unsigned int spot, int offset) +{ + unsigned int iter; + /* this is thread-unsafe, only use for testing */ + static struct arch_syscall_def arch_def; + + arch_def.name = NULL; + arch_def.num = __NR_SCMP_ERROR; + + for (iter = 0; iter < sizeof(wordlist)/sizeof(wordlist[0]); iter++) { + if (wordlist[iter].index == spot) { + arch_def.name = stringpool + wordlist[iter].name; + arch_def.num = syscall_get_offset_value(&wordlist[iter], + offset); + return &arch_def; + } + } + + return &arch_def; +} diff -Nru libseccomp-2.4.3/src/system.c libseccomp-2.5.1/src/system.c --- libseccomp-2.4.3/src/system.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/system.c 2020-11-17 08:34:38.782027382 +1030 @@ -26,24 +26,79 @@ #define _GNU_SOURCE #include +#include "system.h" + #include #include "arch.h" #include "db.h" #include "gen_bpf.h" -#include "system.h" +#include "helper.h" -/* NOTE: the seccomp syscall whitelist is currently disabled for testing +/* NOTE: the seccomp syscall allowlist is currently disabled for testing * purposes, but unless we can verify all of the supported ABIs before - * our next release we may have to enable the whitelist */ -#define SYSCALL_WHITELIST_ENABLE 0 + * our next release we may have to enable the allowlist */ +#define SYSCALL_ALLOWLIST_ENABLE 0 + +/* task global state */ +struct task_state { + /* seccomp(2) syscall */ + int nr_seccomp; + + /* userspace notification fd */ + int notify_fd; + + /* runtime support flags */ + int sup_syscall; + int sup_flag_tsync; + int sup_flag_log; + int sup_action_log; + int sup_kill_process; + int sup_flag_spec_allow; + int sup_flag_new_listener; + int sup_user_notif; + int sup_flag_tsync_esrch; +}; +static struct task_state state = { + .nr_seccomp = -1, + + .notify_fd = -1, + + .sup_syscall = -1, + .sup_flag_tsync = -1, + .sup_flag_log = -1, + .sup_action_log = -1, + .sup_kill_process = -1, + .sup_flag_spec_allow = -1, + .sup_flag_new_listener = -1, + .sup_user_notif = -1, + .sup_flag_tsync_esrch = -1, +}; + +/** + * Reset the task state + * + * This function fully resets the library's global "system task state". + * + */ +void sys_reset_state(void) +{ + state.nr_seccomp = -1; -static int _nr_seccomp = -1; -static int _support_seccomp_syscall = -1; -static int _support_seccomp_flag_tsync = -1; -static int _support_seccomp_flag_log = -1; -static int _support_seccomp_action_log = -1; -static int _support_seccomp_kill_process = -1; + if (state.notify_fd > 0) + close(state.notify_fd); + state.notify_fd = -1; + + state.sup_syscall = -1; + state.sup_flag_tsync = -1; + state.sup_flag_log = -1; + state.sup_action_log = -1; + state.sup_kill_process = -1; + state.sup_flag_spec_allow = -1; + state.sup_flag_new_listener = -1; + state.sup_user_notif = -1; + state.sup_flag_tsync_esrch = -1; +} /** * Check to see if the seccomp() syscall is supported @@ -62,11 +117,11 @@ /* NOTE: it is reasonably safe to assume that we should be able to call * seccomp() when the caller first starts, but we can't rely on * it later so we need to cache our findings for use later */ - if (_support_seccomp_syscall >= 0) - return _support_seccomp_syscall; + if (state.sup_syscall >= 0) + return state.sup_syscall; -#if SYSCALL_WHITELIST_ENABLE - /* architecture whitelist */ +#if SYSCALL_ALLOWLIST_ENABLE + /* architecture allowlist */ switch (arch_def_native->token) { case SCMP_ARCH_X86_64: case SCMP_ARCH_ARM: @@ -75,6 +130,7 @@ case SCMP_ARCH_PPC64LE: case SCMP_ARCH_S390: case SCMP_ARCH_S390X: + case SCMP_ARCH_RISCV64: break; default: goto unsupported; @@ -87,17 +143,17 @@ /* this is an invalid call because the second argument is non-zero, but * depending on the errno value of ENOSYS or EINVAL we can guess if the - * seccomp() syscal is supported or not */ + * seccomp() syscall is supported or not */ rc = syscall(nr_seccomp, SECCOMP_SET_MODE_STRICT, 1, NULL); if (rc < 0 && errno == EINVAL) goto supported; unsupported: - _support_seccomp_syscall = 0; + state.sup_syscall = 0; return 0; supported: - _nr_seccomp = nr_seccomp; - _support_seccomp_syscall = 1; + state.nr_seccomp = nr_seccomp; + state.sup_syscall = 1; return 1; } @@ -111,7 +167,7 @@ */ void sys_set_seccomp_syscall(bool enable) { - _support_seccomp_syscall = (enable ? 1 : 0); + state.sup_syscall = (enable ? 1 : 0); } /** @@ -125,16 +181,16 @@ int sys_chk_seccomp_action(uint32_t action) { if (action == SCMP_ACT_KILL_PROCESS) { - if (_support_seccomp_kill_process < 0) { + if (state.sup_kill_process < 0) { if (sys_chk_seccomp_syscall() == 1 && - syscall(_nr_seccomp, SECCOMP_GET_ACTION_AVAIL, 0, - &action) == 0) - _support_seccomp_kill_process = 1; + syscall(state.nr_seccomp, + SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0) + state.sup_kill_process = 1; else - _support_seccomp_kill_process = 0; + state.sup_kill_process = 0; } - return _support_seccomp_kill_process; + return state.sup_kill_process; } else if (action == SCMP_ACT_KILL_THREAD) { return 1; } else if (action == SCMP_ACT_TRAP) { @@ -145,18 +201,30 @@ } else if (action == SCMP_ACT_TRACE(action & 0x0000ffff)) { return 1; } else if (action == SCMP_ACT_LOG) { - if (_support_seccomp_action_log < 0) { + if (state.sup_action_log < 0) { if (sys_chk_seccomp_syscall() == 1 && - syscall(_nr_seccomp, SECCOMP_GET_ACTION_AVAIL, 0, - &action) == 0) - _support_seccomp_action_log = 1; + syscall(state.nr_seccomp, + SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0) + state.sup_action_log = 1; else - _support_seccomp_action_log = 0; + state.sup_action_log = 0; } - return _support_seccomp_action_log; + return state.sup_action_log; } else if (action == SCMP_ACT_ALLOW) { return 1; + } else if (action == SCMP_ACT_NOTIFY) { + if (state.sup_user_notif < 0) { + struct seccomp_notif_sizes sizes; + if (sys_chk_seccomp_syscall() == 1 && + syscall(state.nr_seccomp, + SECCOMP_GET_NOTIF_SIZES, 0, &sizes) == 0) + state.sup_user_notif = 1; + else + state.sup_user_notif = 0; + } + + return state.sup_user_notif; } return 0; @@ -172,10 +240,17 @@ */ void sys_set_seccomp_action(uint32_t action, bool enable) { - if (action == SCMP_ACT_LOG) - _support_seccomp_action_log = (enable ? 1 : 0); - else if (action == SCMP_ACT_KILL_PROCESS) - _support_seccomp_kill_process = (enable ? 1 : 0); + switch (action) { + case SCMP_ACT_LOG: + state.sup_action_log = (enable ? 1 : 0); + break; + case SCMP_ACT_KILL_PROCESS: + state.sup_kill_process = (enable ? 1 : 0); + break; + case SCMP_ACT_NOTIFY: + state.sup_user_notif = (enable ? 1 : 0); + break; + } } /** @@ -186,13 +261,14 @@ * Return one if the flag is supported, zero otherwise. * */ -static int _sys_chk_seccomp_flag_kernel(int flag) +static int _sys_chk_flag_kernel(int flag) { /* this is an invalid seccomp(2) call because the last argument * is NULL, but depending on the errno value of EFAULT we can * guess if the filter flag is supported or not */ if (sys_chk_seccomp_syscall() == 1 && - syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flag, NULL) == -1 && + syscall(state.nr_seccomp, + SECCOMP_SET_MODE_FILTER, flag, NULL) == -1 && errno == EFAULT) return 1; @@ -212,15 +288,25 @@ { switch (flag) { case SECCOMP_FILTER_FLAG_TSYNC: - if (_support_seccomp_flag_tsync < 0) - _support_seccomp_flag_tsync = _sys_chk_seccomp_flag_kernel(flag); - - return _support_seccomp_flag_tsync; + if (state.sup_flag_tsync < 0) + state.sup_flag_tsync = _sys_chk_flag_kernel(flag); + return state.sup_flag_tsync; case SECCOMP_FILTER_FLAG_LOG: - if (_support_seccomp_flag_log < 0) - _support_seccomp_flag_log = _sys_chk_seccomp_flag_kernel(flag); - - return _support_seccomp_flag_log; + if (state.sup_flag_log < 0) + state.sup_flag_log = _sys_chk_flag_kernel(flag); + return state.sup_flag_log; + case SECCOMP_FILTER_FLAG_SPEC_ALLOW: + if (state.sup_flag_spec_allow < 0) + state.sup_flag_spec_allow = _sys_chk_flag_kernel(flag); + return state.sup_flag_spec_allow; + case SECCOMP_FILTER_FLAG_NEW_LISTENER: + if (state.sup_flag_new_listener < 0) + state.sup_flag_new_listener = _sys_chk_flag_kernel(flag); + return state.sup_flag_new_listener; + case SECCOMP_FILTER_FLAG_TSYNC_ESRCH: + if (state.sup_flag_tsync_esrch < 0) + state.sup_flag_tsync_esrch = _sys_chk_flag_kernel(flag); + return state.sup_flag_tsync_esrch; } return -EOPNOTSUPP; @@ -239,10 +325,19 @@ { switch (flag) { case SECCOMP_FILTER_FLAG_TSYNC: - _support_seccomp_flag_tsync = (enable ? 1 : 0); + state.sup_flag_tsync = (enable ? 1 : 0); break; case SECCOMP_FILTER_FLAG_LOG: - _support_seccomp_flag_log = (enable ? 1 : 0); + state.sup_flag_log = (enable ? 1 : 0); + break; + case SECCOMP_FILTER_FLAG_SPEC_ALLOW: + state.sup_flag_spec_allow = (enable ? 1 : 0); + break; + case SECCOMP_FILTER_FLAG_NEW_LISTENER: + state.sup_flag_new_listener = (enable ? 1 : 0); + break; + case SECCOMP_FILTER_FLAG_TSYNC_ESRCH: + state.sup_flag_tsync_esrch = (enable ? 1 : 0); break; } } @@ -250,6 +345,7 @@ /** * Loads the filter into the kernel * @param col the filter collection + * @param rawrc pass the raw return code if true * * This function loads the given seccomp filter context into the kernel. If * the filter was loaded correctly, the kernel will be enforcing the filter @@ -257,14 +353,16 @@ * error. * */ -int sys_filter_load(const struct db_filter_col *col) +int sys_filter_load(struct db_filter_col *col, bool rawrc) { int rc; + bool tsync_notify; + bool listener_req; struct bpf_program *prgm = NULL; - prgm = gen_bpf_generate(col); - if (prgm == NULL) - return -ENOMEM; + rc = gen_bpf_generate(col, &prgm); + if (rc < 0) + return rc; /* attempt to set NO_NEW_PRIVS */ if (col->attr.nnp_enable) { @@ -273,24 +371,174 @@ goto filter_load_out; } + tsync_notify = state.sup_flag_tsync_esrch > 0 && state.notify_fd == -1; + listener_req = state.sup_user_notif > 0 && \ + col->notify_used && state.notify_fd == -1; + /* load the filter into the kernel */ if (sys_chk_seccomp_syscall() == 1) { int flgs = 0; - if (col->attr.tsync_enable) + if (tsync_notify) { + if (col->attr.tsync_enable) + flgs |= SECCOMP_FILTER_FLAG_TSYNC | \ + SECCOMP_FILTER_FLAG_TSYNC_ESRCH; + if (listener_req) + flgs |= SECCOMP_FILTER_FLAG_NEW_LISTENER; + } else if (col->attr.tsync_enable) { + if (listener_req) { + /* NOTE: we _should_ catch this in db.c */ + rc = -EFAULT; + goto filter_load_out; + } flgs |= SECCOMP_FILTER_FLAG_TSYNC; + } else if (listener_req) + flgs |= SECCOMP_FILTER_FLAG_NEW_LISTENER; if (col->attr.log_enable) flgs |= SECCOMP_FILTER_FLAG_LOG; - rc = syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flgs, prgm); - if (rc > 0 && col->attr.tsync_enable) + if (col->attr.spec_allow) + flgs |= SECCOMP_FILTER_FLAG_SPEC_ALLOW; + rc = syscall(state.nr_seccomp, + SECCOMP_SET_MODE_FILTER, flgs, prgm); + if (tsync_notify && rc > 0) { + /* return 0 on NEW_LISTENER success, but save the fd */ + state.notify_fd = rc; + rc = 0; + } else if (rc > 0 && col->attr.tsync_enable) { /* always return -ESRCH if we fail to sync threads */ errno = ESRCH; + rc = -errno; + } else if (rc > 0 && state.sup_user_notif > 0) { + /* return 0 on NEW_LISTENER success, but save the fd */ + state.notify_fd = rc; + rc = 0; + } } else rc = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, prgm); filter_load_out: /* cleanup and return */ gen_bpf_release(prgm); + if (rc == -ESRCH) + return -ESRCH; if (rc < 0) - return -errno; + return (rawrc ? -errno : -ECANCELED); + return rc; +} + +/** + * Return the userspace notification fd + * + * This function returns the userspace notification fd from + * SECCOMP_FILTER_FLAG_NEW_LISTENER. If the notification fd has not yet been + * set, or an error has occurred, -1 is returned. + * + */ +int sys_notify_fd(void) +{ + return state.notify_fd; +} + +/** + * Allocate a pair of notification request/response structures + * @param req the request location + * @param resp the response location + * + * This function allocates a pair of request/response structure by computing + * the correct sized based on the currently running kernel. It returns zero on + * success, and negative values on failure. + * + */ +int sys_notify_alloc(struct seccomp_notif **req, + struct seccomp_notif_resp **resp) +{ + int rc; + static struct seccomp_notif_sizes sizes = { 0, 0, 0 }; + + if (state.sup_syscall <= 0) + return -EOPNOTSUPP; + + if (sizes.seccomp_notif == 0 && sizes.seccomp_notif_resp == 0) { + rc = syscall(__NR_seccomp, SECCOMP_GET_NOTIF_SIZES, 0, &sizes); + if (rc < 0) + return -ECANCELED; + } + if (sizes.seccomp_notif == 0 || sizes.seccomp_notif_resp == 0) + return -EFAULT; + + if (req) { + *req = zmalloc(sizes.seccomp_notif); + if (!*req) + return -ENOMEM; + } + + if (resp) { + *resp = zmalloc(sizes.seccomp_notif_resp); + if (!*resp) { + if (req) + free(*req); + return -ENOMEM; + } + } + + return 0; +} + +/** + * Receive a notification from a seccomp notification fd + * @param fd the notification fd + * @param req the request buffer to save into + * + * Blocks waiting for a notification on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int sys_notify_receive(int fd, struct seccomp_notif *req) +{ + if (state.sup_user_notif <= 0) + return -EOPNOTSUPP; + + if (ioctl(fd, SECCOMP_IOCTL_NOTIF_RECV, req) < 0) + return -ECANCELED; + + return 0; +} + +/** + * Send a notification response to a seccomp notification fd + * @param fd the notification fd + * @param resp the response buffer to use + * + * Sends a notification response on this fd. This function is thread safe + * (synchronization is performed in the kernel). Returns zero on success, + * negative values on error. + * + */ +int sys_notify_respond(int fd, struct seccomp_notif_resp *resp) +{ + if (state.sup_user_notif <= 0) + return -EOPNOTSUPP; + + if (ioctl(fd, SECCOMP_IOCTL_NOTIF_SEND, resp) < 0) + return -ECANCELED; + return 0; +} + +/** + * Check if a notification id is still valid + * @param fd the notification fd + * @param id the id to test + * + * Checks to see if a notification id is still valid. Returns 0 on success, and + * negative values on failure. + * + */ +int sys_notify_id_valid(int fd, uint64_t id) +{ + if (state.sup_user_notif <= 0) + return -EOPNOTSUPP; + + if (ioctl(fd, SECCOMP_IOCTL_NOTIF_ID_VALID, &id) < 0) + return -ENOENT; return 0; } diff -Nru libseccomp-2.4.3/src/system.h libseccomp-2.5.1/src/system.h --- libseccomp-2.4.3/src/system.h 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/src/system.h 2020-11-17 08:34:59.764209764 +1030 @@ -22,9 +22,12 @@ #ifndef _SYSTEM_H #define _SYSTEM_H +#include +#include #include +#include #include - +#include #include "configure.h" /* NOTE: this was taken from the Linux Kernel sources */ @@ -40,7 +43,6 @@ #else /* NOTE: the definitions below were taken from the Linux Kernel sources */ -#include /* Valid values for seccomp.mode and prctl(PR_SET_SECCOMP, ) */ #define SECCOMP_MODE_DISABLED 0 /* seccomp is not in use. */ @@ -60,12 +62,11 @@ #define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD /* default to killing the thread */ #define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */ #define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */ +#define SECCOMP_RET_USER_NOTIF 0x7fc00000U /* notifies userspace */ #define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */ -#define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */ #define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */ /* Masks for the return value sections. */ -#define SECCOMP_RET_ACTION_FULL 0xffff0000U #define SECCOMP_RET_ACTION 0x7fff0000U #define SECCOMP_RET_DATA 0x0000ffffU @@ -109,29 +110,80 @@ #ifndef SECCOMP_GET_ACTION_AVAIL #define SECCOMP_GET_ACTION_AVAIL 2 #endif +#ifndef SECCOMP_GET_NOTIF_SIZES +#define SECCOMP_GET_NOTIF_SIZES 3 +#endif /* flags for the seccomp() syscall */ #ifndef SECCOMP_FILTER_FLAG_TSYNC -#define SECCOMP_FILTER_FLAG_TSYNC (1UL << 0) +#define SECCOMP_FILTER_FLAG_TSYNC (1UL << 0) #endif #ifndef SECCOMP_FILTER_FLAG_LOG -#define SECCOMP_FILTER_FLAG_LOG (1UL << 1) +#define SECCOMP_FILTER_FLAG_LOG (1UL << 1) +#endif +#ifndef SECCOMP_FILTER_FLAG_SPEC_ALLOW +#define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2) +#endif +#ifndef SECCOMP_FILTER_FLAG_NEW_LISTENER +#define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3) +#endif +#ifndef SECCOMP_FILTER_FLAG_TSYNC_ESRCH +#define SECCOMP_FILTER_FLAG_TSYNC_ESRCH (1UL << 4) #endif -/* SECCOMP_RET_ACTION_FULL was added in kernel v4.14. It may not be - * defined on older kernels - */ +#ifndef SECCOMP_RET_LOG +#define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */ +#endif + +/* SECCOMP_RET_ACTION_FULL was added in kernel v4.14. */ #ifndef SECCOMP_RET_ACTION_FULL #define SECCOMP_RET_ACTION_FULL 0xffff0000U #endif -/* SECCOMP_RET_LOG was added in kernel v4.14. It may not be defined on - * older kernels. - */ +/* SECCOMP_RET_LOG was added in kernel v4.14. */ #ifndef SECCOMP_RET_LOG #define SECCOMP_RET_LOG 0x7fc00000U #endif +/* SECCOMP_RET_USER_NOTIF was added in kernel v5.0. */ +#ifndef SECCOMP_RET_USER_NOTIF +#define SECCOMP_RET_USER_NOTIF 0x7fc00000U + +struct seccomp_notif_sizes { + __u16 seccomp_notif; + __u16 seccomp_notif_resp; + __u16 seccomp_data; +}; + +struct seccomp_notif { + __u64 id; + __u32 pid; + __u32 flags; + struct seccomp_data data; +}; + +struct seccomp_notif_resp { + __u64 id; + __s64 val; + __s32 error; + __u32 flags; +}; + +#define SECCOMP_IOC_MAGIC '!' +#define SECCOMP_IO(nr) _IO(SECCOMP_IOC_MAGIC, nr) +#define SECCOMP_IOR(nr, type) _IOR(SECCOMP_IOC_MAGIC, nr, type) +#define SECCOMP_IOW(nr, type) _IOW(SECCOMP_IOC_MAGIC, nr, type) +#define SECCOMP_IOWR(nr, type) _IOWR(SECCOMP_IOC_MAGIC, nr, type) + +/* flags for seccomp notification fd ioctl */ +#define SECCOMP_IOCTL_NOTIF_RECV SECCOMP_IOWR(0, struct seccomp_notif) +#define SECCOMP_IOCTL_NOTIF_SEND SECCOMP_IOWR(1, \ + struct seccomp_notif_resp) +#define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64) +#endif /* SECCOMP_RET_USER_NOTIF */ + +void sys_reset_state(void); + int sys_chk_seccomp_syscall(void); void sys_set_seccomp_syscall(bool enable); @@ -141,6 +193,12 @@ int sys_chk_seccomp_flag(int flag); void sys_set_seccomp_flag(int flag, bool enable); -int sys_filter_load(const struct db_filter_col *col); +int sys_filter_load(struct db_filter_col *col, bool rawrc); +int sys_notify_fd(void); +int sys_notify_alloc(struct seccomp_notif **req, + struct seccomp_notif_resp **resp); +int sys_notify_receive(int fd, struct seccomp_notif *req); +int sys_notify_respond(int fd, struct seccomp_notif_resp *resp); +int sys_notify_id_valid(int fd, uint64_t id); #endif diff -Nru libseccomp-2.4.3/tests/04-sim-multilevel_chains.c libseccomp-2.5.1/tests/04-sim-multilevel_chains.c --- libseccomp-2.4.3/tests/04-sim-multilevel_chains.c 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/04-sim-multilevel_chains.c 2020-11-17 08:34:38.783027390 +1030 @@ -41,7 +41,7 @@ if (ctx == NULL) return ENOMEM; - rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0); + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 0); if (rc != 0) goto out; diff -Nru libseccomp-2.4.3/tests/04-sim-multilevel_chains.py libseccomp-2.5.1/tests/04-sim-multilevel_chains.py --- libseccomp-2.4.3/tests/04-sim-multilevel_chains.py 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/04-sim-multilevel_chains.py 2020-11-17 08:34:38.783027390 +1030 @@ -30,7 +30,7 @@ def test(args): f = SyscallFilter(KILL) - f.add_rule(ALLOW, "open") + f.add_rule(ALLOW, "openat") f.add_rule(ALLOW, "close") f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno()), diff -Nru libseccomp-2.4.3/tests/04-sim-multilevel_chains.tests libseccomp-2.5.1/tests/04-sim-multilevel_chains.tests --- libseccomp-2.4.3/tests/04-sim-multilevel_chains.tests 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/04-sim-multilevel_chains.tests 2020-11-17 08:34:38.783027390 +1030 @@ -8,7 +8,7 @@ test type: bpf-sim # Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result -04-sim-multilevel_chains all,-aarch64 open 0x856B008 4 N N N N ALLOW +04-sim-multilevel_chains all openat 0 0x856B008 4 N N N ALLOW 04-sim-multilevel_chains all close 4 N N N N N ALLOW 04-sim-multilevel_chains x86 read 0 0x856B008 0x7FFFFFFE N N N ALLOW 04-sim-multilevel_chains x86_64 read 0 0x856B008 0x7FFFFFFFFFFFFFFE N N N ALLOW @@ -27,9 +27,11 @@ 04-sim-multilevel_chains all rt_sigreturn N N N N N N ALLOW 04-sim-multilevel_chains x86 0-2 N N N N N N KILL 04-sim-multilevel_chains x86 7-172 N N N N N N KILL -04-sim-multilevel_chains x86 174-350 N N N N N N KILL +04-sim-multilevel_chains x86 174-294 N N N N N N KILL +04-sim-multilevel_chains x86 296-350 N N N N N N KILL 04-sim-multilevel_chains x86_64 4-14 N N N N N N KILL -04-sim-multilevel_chains x86_64 16-350 N N N N N N KILL +04-sim-multilevel_chains x86_64 16-256 N N N N N N KILL +04-sim-multilevel_chains x86_64 258-350 N N N N N N KILL test type: bpf-sim-fuzz diff -Nru libseccomp-2.4.3/tests/06-sim-actions.c libseccomp-2.5.1/tests/06-sim-actions.c --- libseccomp-2.4.3/tests/06-sim-actions.c 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/06-sim-actions.c 2020-11-17 08:34:38.783027390 +1030 @@ -60,11 +60,11 @@ if (rc != 0) goto out; - rc = seccomp_rule_add(ctx, SCMP_ACT_TRACE(1234), SCMP_SYS(open), 0); + rc = seccomp_rule_add(ctx, SCMP_ACT_TRACE(1234), SCMP_SYS(openat), 0); if (rc != 0) goto out; - rc = seccomp_rule_add(ctx, SCMP_ACT_KILL_PROCESS, SCMP_SYS(stat), 0); + rc = seccomp_rule_add(ctx, SCMP_ACT_KILL_PROCESS, SCMP_SYS(fstat), 0); if (rc != 0) goto out; diff -Nru libseccomp-2.4.3/tests/06-sim-actions.py libseccomp-2.5.1/tests/06-sim-actions.py --- libseccomp-2.4.3/tests/06-sim-actions.py 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/06-sim-actions.py 2020-11-17 08:34:38.783027390 +1030 @@ -37,8 +37,8 @@ f.add_rule(LOG, "rt_sigreturn") f.add_rule(ERRNO(errno.EPERM), "write") f.add_rule(TRAP, "close") - f.add_rule(TRACE(1234), "open") - f.add_rule(KILL_PROCESS, "stat") + f.add_rule(TRACE(1234), "openat") + f.add_rule(KILL_PROCESS, "fstat") return f args = util.get_opt() diff -Nru libseccomp-2.4.3/tests/06-sim-actions.tests libseccomp-2.5.1/tests/06-sim-actions.tests --- libseccomp-2.4.3/tests/06-sim-actions.tests 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/06-sim-actions.tests 2020-11-17 08:34:38.783027390 +1030 @@ -11,15 +11,17 @@ 06-sim-actions all read 4 0x856B008 80 N N N ALLOW 06-sim-actions all write 1 0x856B008 N N N N ERRNO(1) 06-sim-actions all close 4 N N N N N TRAP -06-sim-actions all,-aarch64 open 0x856B008 4 N N N N TRACE(1234) -06-sim-actions all stat N N N N N N KILL_PROCESS +06-sim-actions all openat 0 0x856B008 4 N N N TRACE(1234) +06-sim-actions all fstat N N N N N N KILL_PROCESS 06-sim-actions all rt_sigreturn N N N N N N LOG 06-sim-actions x86 0-2 N N N N N N KILL -06-sim-actions x86 7-105 N N N N N N KILL -06-sim-actions x86 107-172 N N N N N N KILL -06-sim-actions x86 174-350 N N N N N N KILL -06-sim-actions x86_64 5-14 N N N N N N KILL -06-sim-actions x86_64 16-350 N N N N N N KILL +06-sim-actions x86 7-107 N N N N N N KILL +06-sim-actions x86 109-172 N N N N N N KILL +06-sim-actions x86 174-294 N N N N N N KILL +06-sim-actions x86 296-350 N N N N N N KILL +06-sim-actions x86_64 6-14 N N N N N N KILL +06-sim-actions x86_64 16-256 N N N N N N KILL +06-sim-actions x86_64 258-350 N N N N N N KILL test type: bpf-sim-fuzz diff -Nru libseccomp-2.4.3/tests/11-basic-basic_errors.c libseccomp-2.5.1/tests/11-basic-basic_errors.c --- libseccomp-2.4.3/tests/11-basic-basic_errors.c 2020-03-03 02:13:34.192033131 +1030 +++ libseccomp-2.5.1/tests/11-basic-basic_errors.c 2020-11-17 08:34:38.783027390 +1030 @@ -41,12 +41,9 @@ seccomp_release(ctx); ctx = NULL; - /* seccomp_reset error */ - rc = seccomp_reset(ctx, SCMP_ACT_KILL + 1); - if (rc != -EINVAL) - return -1; - rc = seccomp_reset(ctx, SCMP_ACT_KILL); - if (rc != -EINVAL) + /* ensure that seccomp_reset(NULL, ...) is accepted */ + rc = seccomp_reset(NULL, SCMP_ACT_ALLOW); + if (rc != 0) return -1; /* seccomp_load error */ @@ -81,7 +78,7 @@ return -1; else { rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0); - if (rc != -EPERM) + if (rc != -EACCES) return -1; rc = seccomp_rule_add(ctx, SCMP_ACT_KILL - 1, SCMP_SYS(read), 0); if (rc != -EINVAL) @@ -151,7 +148,7 @@ return -1; else { rc = seccomp_export_pfc(ctx, sysconf(_SC_OPEN_MAX) - 1); - if (rc != EBADF) + if (rc != -ECANCELED) return -1; } seccomp_release(ctx); @@ -167,7 +164,7 @@ return -1; else { rc = seccomp_export_bpf(ctx, sysconf(_SC_OPEN_MAX) - 1); - if (rc != -EBADF) + if (rc != -ECANCELED) return -1; } seccomp_release(ctx); @@ -178,10 +175,10 @@ if (ctx == NULL) return -1; rc = seccomp_attr_get(ctx, 1000, &attr); - if (rc != -EEXIST) + if (rc != -EINVAL) return -1; rc = seccomp_attr_set(ctx, 1000, 1); - if (rc != -EEXIST) + if (rc != -EINVAL) return -1; return 0; diff -Nru libseccomp-2.4.3/tests/13-basic-attrs.c libseccomp-2.5.1/tests/13-basic-attrs.c --- libseccomp-2.4.3/tests/13-basic-attrs.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/13-basic-attrs.c 2020-11-17 08:34:38.783027390 +1030 @@ -32,7 +32,7 @@ uint32_t val = (uint32_t)(-1); scmp_filter_ctx ctx = NULL; - rc = seccomp_api_set(3); + rc = seccomp_api_set(5); if (rc != 0) return EOPNOTSUPP; @@ -104,6 +104,40 @@ if (rc != 0) goto out; if (val != 1) { + rc = -1; + goto out; + } + + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_SSB, 1); + if (rc != 0) + goto out; + rc = seccomp_attr_get(ctx, SCMP_FLTATR_CTL_SSB, &val); + if (rc != 0) + goto out; + if (val != 1) { + rc = -1; + goto out; + } + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_OPTIMIZE, 2); + if (rc != 0) + goto out; + rc = seccomp_attr_get(ctx, SCMP_FLTATR_CTL_OPTIMIZE, &val); + if (rc != 0) + goto out; + if (val != 2) { + rc = -1; + goto out; + } + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_API_SYSRAWRC, 1); + if (rc != 0) + goto out; + rc = seccomp_attr_get(ctx, SCMP_FLTATR_API_SYSRAWRC, &val); + if (rc != 0) + goto out; + if (val != 1) { rc = -1; goto out; } diff -Nru libseccomp-2.4.3/tests/13-basic-attrs.py libseccomp-2.5.1/tests/13-basic-attrs.py --- libseccomp-2.4.3/tests/13-basic-attrs.py 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/13-basic-attrs.py 2020-11-17 08:34:38.783027390 +1030 @@ -29,7 +29,7 @@ from seccomp import * def test(): - set_api(3) + set_api(5) f = SyscallFilter(ALLOW) if f.get_attr(Attr.ACT_DEFAULT) != ALLOW: @@ -52,6 +52,15 @@ f.set_attr(Attr.CTL_LOG, 1) if f.get_attr(Attr.CTL_LOG) != 1: raise RuntimeError("Failed getting Attr.CTL_LOG") + f.set_attr(Attr.CTL_SSB, 1) + if f.get_attr(Attr.CTL_SSB) != 1: + raise RuntimeError("Failed getting Attr.CTL_SSB") + f.set_attr(Attr.CTL_OPTIMIZE, 2) + if f.get_attr(Attr.CTL_OPTIMIZE) != 2: + raise RuntimeError("Failed getting Attr.CTL_OPTIMIZE") + f.set_attr(Attr.API_SYSRAWRC, 1) + if f.get_attr(Attr.API_SYSRAWRC) != 1: + raise RuntimeError("Failed getting Attr.API_SYSRAWRC") test() diff -Nru libseccomp-2.4.3/tests/15-basic-resolver.c libseccomp-2.5.1/tests/15-basic-resolver.c --- libseccomp-2.4.3/tests/15-basic-resolver.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/15-basic-resolver.c 2020-11-17 08:34:38.784027399 +1030 @@ -45,6 +45,7 @@ SCMP_ARCH_S390X, SCMP_ARCH_PARISC, SCMP_ARCH_PARISC64, + SCMP_ARCH_RISCV64, -1 }; diff -Nru libseccomp-2.4.3/tests/16-sim-arch_basic.c libseccomp-2.5.1/tests/16-sim-arch_basic.c --- libseccomp-2.4.3/tests/16-sim-arch_basic.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/16-sim-arch_basic.c 2020-11-17 08:34:38.784027399 +1030 @@ -51,6 +51,12 @@ if (rc != 0) goto out; + /* NOTE: we are using a different approach to test for the native arch + * to exercise slightly different code paths */ + rc = seccomp_arch_exist(ctx, 0); + if (rc != -EEXIST) + goto out; + /* NOTE: more sanity/coverage tests (see above) */ rc = seccomp_arch_add(ctx, SCMP_ARCH_NATIVE); if (rc != 0) @@ -86,6 +92,9 @@ rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC64LE); if (rc != 0) goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_RISCV64); + if (rc != 0) + goto out; rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1, SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); @@ -150,6 +159,9 @@ rc = seccomp_arch_remove(ctx, SCMP_ARCH_PPC64LE); if (rc != 0) goto out; + rc = seccomp_arch_remove(ctx, SCMP_ARCH_RISCV64); + if (rc != 0) + goto out; out: seccomp_release(ctx); diff -Nru libseccomp-2.4.3/tests/16-sim-arch_basic.py libseccomp-2.5.1/tests/16-sim-arch_basic.py --- libseccomp-2.4.3/tests/16-sim-arch_basic.py 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/16-sim-arch_basic.py 2020-11-17 08:34:38.784027399 +1030 @@ -44,6 +44,7 @@ f.add_arch(Arch("mipsel64")) f.add_arch(Arch("mipsel64n32")) f.add_arch(Arch("ppc64le")) + f.add_arch(Arch("riscv64")) f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) diff -Nru libseccomp-2.4.3/tests/18-sim-basic_allowlist.c libseccomp-2.5.1/tests/18-sim-basic_allowlist.c --- libseccomp-2.4.3/tests/18-sim-basic_allowlist.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/18-sim-basic_allowlist.c 2020-11-17 08:34:38.784027399 +1030 @@ -0,0 +1,74 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2013 Red Hat + * Author: Paul Moore + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include + +#include + +#include "util.h" + +int main(int argc, char *argv[]) +{ + int rc; + struct util_options opts; + scmp_filter_ctx ctx = NULL; + + rc = util_getopt(argc, argv, &opts); + if (rc < 0) + goto out; + + ctx = seccomp_init(SCMP_ACT_KILL); + if (ctx == NULL) + return ENOMEM; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1, + SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, + SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, + SCMP_A0(SCMP_CMP_EQ, STDERR_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, + SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0); + if (rc != 0) + goto out; + + rc = util_filter_output(&opts, ctx); + if (rc) + goto out; + +out: + seccomp_release(ctx); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/18-sim-basic_allowlist.py libseccomp-2.5.1/tests/18-sim-basic_allowlist.py --- libseccomp-2.4.3/tests/18-sim-basic_allowlist.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/18-sim-basic_allowlist.py 2020-11-17 08:34:38.784027399 +1030 @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2013 Red Hat +# Author: Paul Moore +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys + +import util + +from seccomp import * + +def test(args): + f = SyscallFilter(KILL) + f.add_rule_exactly(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) + f.add_rule_exactly(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) + f.add_rule_exactly(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) + f.add_rule_exactly(ALLOW, "close") + f.add_rule_exactly(ALLOW, "rt_sigreturn") + return f + +args = util.get_opt() +ctx = test(args) +util.filter_output(args, ctx) + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/18-sim-basic_allowlist.tests libseccomp-2.5.1/tests/18-sim-basic_allowlist.tests --- libseccomp-2.4.3/tests/18-sim-basic_allowlist.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/18-sim-basic_allowlist.tests 2020-11-17 08:34:38.784027399 +1030 @@ -0,0 +1,32 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2013 Red Hat +# Author: Paul Moore +# + +test type: bpf-sim + +# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result +18-sim-basic_allowlist all read 0 0x856B008 10 N N N ALLOW +18-sim-basic_allowlist all read 1-10 0x856B008 10 N N N KILL +18-sim-basic_allowlist all write 1-2 0x856B008 10 N N N ALLOW +18-sim-basic_allowlist all write 3-10 0x856B008 10 N N N KILL +18-sim-basic_allowlist all close N N N N N N ALLOW +18-sim-basic_allowlist all rt_sigreturn N N N N N N ALLOW +18-sim-basic_allowlist all open 0x856B008 4 N N N N KILL +18-sim-basic_allowlist x86 0-2 N N N N N N KILL +18-sim-basic_allowlist x86 7-172 N N N N N N KILL +18-sim-basic_allowlist x86 174-350 N N N N N N KILL +18-sim-basic_allowlist x86_64 4-14 N N N N N N KILL +18-sim-basic_allowlist x86_64 16-350 N N N N N N KILL + +test type: bpf-sim-fuzz + +# Testname StressCount +18-sim-basic_allowlist 50 + +test type: bpf-valgrind + +# Testname +18-sim-basic_allowlist diff -Nru libseccomp-2.4.3/tests/18-sim-basic_whitelist.c libseccomp-2.5.1/tests/18-sim-basic_whitelist.c --- libseccomp-2.4.3/tests/18-sim-basic_whitelist.c 2020-03-03 02:13:34.193033134 +1030 +++ libseccomp-2.5.1/tests/18-sim-basic_whitelist.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,74 +0,0 @@ -/** - * Seccomp Library test program - * - * Copyright (c) 2013 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include -#include - -#include - -#include "util.h" - -int main(int argc, char *argv[]) -{ - int rc; - struct util_options opts; - scmp_filter_ctx ctx = NULL; - - rc = util_getopt(argc, argv, &opts); - if (rc < 0) - goto out; - - ctx = seccomp_init(SCMP_ACT_KILL); - if (ctx == NULL) - return ENOMEM; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1, - SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, - SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, - SCMP_A0(SCMP_CMP_EQ, STDERR_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, - SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0); - if (rc != 0) - goto out; - - rc = util_filter_output(&opts, ctx); - if (rc) - goto out; - -out: - seccomp_release(ctx); - return (rc < 0 ? -rc : rc); -} diff -Nru libseccomp-2.4.3/tests/18-sim-basic_whitelist.py libseccomp-2.5.1/tests/18-sim-basic_whitelist.py --- libseccomp-2.4.3/tests/18-sim-basic_whitelist.py 2020-03-03 02:13:34.193033134 +1030 +++ libseccomp-2.5.1/tests/18-sim-basic_whitelist.py 1970-01-01 09:30:00.000000000 +0930 @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -# -# Seccomp Library test program -# -# Copyright (c) 2013 Red Hat -# Author: Paul Moore -# - -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of version 2.1 of the GNU Lesser General Public License as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, see . -# - -import argparse -import sys - -import util - -from seccomp import * - -def test(args): - f = SyscallFilter(KILL) - f.add_rule_exactly(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) - f.add_rule_exactly(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) - f.add_rule_exactly(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) - f.add_rule_exactly(ALLOW, "close") - f.add_rule_exactly(ALLOW, "rt_sigreturn") - return f - -args = util.get_opt() -ctx = test(args) -util.filter_output(args, ctx) - -# kate: syntax python; -# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/18-sim-basic_whitelist.tests libseccomp-2.5.1/tests/18-sim-basic_whitelist.tests --- libseccomp-2.4.3/tests/18-sim-basic_whitelist.tests 2020-03-03 02:13:34.193033134 +1030 +++ libseccomp-2.5.1/tests/18-sim-basic_whitelist.tests 1970-01-01 09:30:00.000000000 +0930 @@ -1,32 +0,0 @@ -# -# libseccomp regression test automation data -# -# Copyright (c) 2013 Red Hat -# Author: Paul Moore -# - -test type: bpf-sim - -# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result -18-sim-basic_whitelist all read 0 0x856B008 10 N N N ALLOW -18-sim-basic_whitelist all read 1-10 0x856B008 10 N N N KILL -18-sim-basic_whitelist all write 1-2 0x856B008 10 N N N ALLOW -18-sim-basic_whitelist all write 3-10 0x856B008 10 N N N KILL -18-sim-basic_whitelist all close N N N N N N ALLOW -18-sim-basic_whitelist all rt_sigreturn N N N N N N ALLOW -18-sim-basic_whitelist all open 0x856B008 4 N N N N KILL -18-sim-basic_whitelist x86 0-2 N N N N N N KILL -18-sim-basic_whitelist x86 7-172 N N N N N N KILL -18-sim-basic_whitelist x86 174-350 N N N N N N KILL -18-sim-basic_whitelist x86_64 4-14 N N N N N N KILL -18-sim-basic_whitelist x86_64 16-350 N N N N N N KILL - -test type: bpf-sim-fuzz - -# Testname StressCount -18-sim-basic_whitelist 50 - -test type: bpf-valgrind - -# Testname -18-sim-basic_whitelist diff -Nru libseccomp-2.4.3/tests/23-sim-arch_all_le_basic.c libseccomp-2.5.1/tests/23-sim-arch_all_le_basic.c --- libseccomp-2.4.3/tests/23-sim-arch_all_le_basic.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/23-sim-arch_all_le_basic.c 2020-11-17 08:34:38.784027399 +1030 @@ -71,6 +71,9 @@ rc = seccomp_arch_add(ctx, seccomp_arch_resolve_name("ppc64le")); if (rc != 0) goto out; + rc = seccomp_arch_add(ctx, seccomp_arch_resolve_name("riscv64")); + if (rc != 0) + goto out; rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1, SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); diff -Nru libseccomp-2.4.3/tests/23-sim-arch_all_le_basic.py libseccomp-2.5.1/tests/23-sim-arch_all_le_basic.py --- libseccomp-2.4.3/tests/23-sim-arch_all_le_basic.py 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/23-sim-arch_all_le_basic.py 2020-11-17 08:34:38.784027399 +1030 @@ -40,6 +40,7 @@ f.add_arch(Arch("mipsel64")) f.add_arch(Arch("mipsel64n32")) f.add_arch(Arch("ppc64le")) + f.add_arch(Arch("riscv64")) f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) diff -Nru libseccomp-2.4.3/tests/30-sim-socket_syscalls.c libseccomp-2.5.1/tests/30-sim-socket_syscalls.c --- libseccomp-2.4.3/tests/30-sim-socket_syscalls.c 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/30-sim-socket_syscalls.c 2020-11-17 08:34:38.785027408 +1030 @@ -53,6 +53,9 @@ rc = seccomp_arch_add(ctx, SCMP_ARCH_X32); if (rc != 0) goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC64LE); + if (rc != 0) + goto out; rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket), 0); if (rc != 0) diff -Nru libseccomp-2.4.3/tests/30-sim-socket_syscalls.py libseccomp-2.5.1/tests/30-sim-socket_syscalls.py --- libseccomp-2.4.3/tests/30-sim-socket_syscalls.py 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/30-sim-socket_syscalls.py 2020-11-17 08:34:38.785027408 +1030 @@ -34,6 +34,7 @@ f.add_arch(Arch("x86")) f.add_arch(Arch("x86_64")) f.add_arch(Arch("x32")) + f.add_arch(Arch("ppc64le")) f.add_rule(ALLOW, "socket") f.add_rule(ALLOW, "connect") f.add_rule(ALLOW, "accept") diff -Nru libseccomp-2.4.3/tests/30-sim-socket_syscalls.tests libseccomp-2.5.1/tests/30-sim-socket_syscalls.tests --- libseccomp-2.4.3/tests/30-sim-socket_syscalls.tests 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/30-sim-socket_syscalls.tests 2020-11-17 08:34:38.785027408 +1030 @@ -7,23 +7,39 @@ test type: bpf-sim -# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result -30-sim-socket_syscalls +x86 socketcall 1 N N N N N ALLOW -30-sim-socket_syscalls +x86 socketcall 3 N N N N N ALLOW -30-sim-socket_syscalls +x86 socketcall 5 N N N N N ALLOW -30-sim-socket_syscalls +x86 socketcall 13 N N N N N ALLOW -30-sim-socket_syscalls +x86 359 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86 362 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86 364 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86 373 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86 accept 5 N N N N N ALLOW -30-sim-socket_syscalls +x86 accept 0 1 2 N N N KILL -30-sim-socket_syscalls +x86 accept4 18 1 2 N N N ALLOW -30-sim-socket_syscalls +x86 accept4 0 1 2 N N N KILL -30-sim-socket_syscalls +x86_64 socket 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86_64 connect 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86_64 accept4 0 1 2 N N N ALLOW -30-sim-socket_syscalls +x86_64 shutdown 0 1 2 N N N ALLOW +# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result +# socket +30-sim-socket_syscalls +x86,+ppc64le socketcall 1 N N N N N ALLOW +# connect +30-sim-socket_syscalls +x86,+ppc64le socketcall 3 N N N N N ALLOW +# accept +30-sim-socket_syscalls +x86,+ppc64le socketcall 5 N N N N N ALLOW +# accept4 +30-sim-socket_syscalls +ppc64le socketcall 18 N N N N N ALLOW +# shutdown +30-sim-socket_syscalls +x86,+ppc64le socketcall 13 N N N N N ALLOW +# socket +30-sim-socket_syscalls +x86 359 0 1 2 N N N ALLOW +30-sim-socket_syscalls +ppc64le 326 0 1 2 N N N ALLOW +# connect +30-sim-socket_syscalls +x86 362 0 1 2 N N N ALLOW +30-sim-socket_syscalls +ppc64le 328 0 1 2 N N N ALLOW +# accept +30-sim-socket_syscalls +ppc64le 330 0 1 2 N N N ALLOW +# accept4 +30-sim-socket_syscalls +x86 364 0 1 2 N N N ALLOW +30-sim-socket_syscalls +ppc64le 344 0 1 2 N N N ALLOW +# shutdown +30-sim-socket_syscalls +x86 373 0 1 2 N N N ALLOW +30-sim-socket_syscalls +ppc64le 338 0 1 2 N N N ALLOW +30-sim-socket_syscalls +x86,+ppc64le accept 5 N N N N N ALLOW +30-sim-socket_syscalls +x86,+ppc64le accept 0 1 2 N N N KILL +30-sim-socket_syscalls +x86,+ppc64le accept4 18 1 2 N N N ALLOW +30-sim-socket_syscalls +x86,+ppc64le accept4 0 1 2 N N N KILL +30-sim-socket_syscalls +x86_64 socket 0 1 2 N N N ALLOW +30-sim-socket_syscalls +x86_64 connect 0 1 2 N N N ALLOW +30-sim-socket_syscalls +x86_64 accept4 0 1 2 N N N ALLOW +30-sim-socket_syscalls +x86_64 shutdown 0 1 2 N N N ALLOW test type: bpf-valgrind diff -Nru libseccomp-2.4.3/tests/34-sim-basic_blacklist.c libseccomp-2.5.1/tests/34-sim-basic_blacklist.c --- libseccomp-2.4.3/tests/34-sim-basic_blacklist.c 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/34-sim-basic_blacklist.c 1970-01-01 09:30:00.000000000 +0930 @@ -1,74 +0,0 @@ -/** - * Seccomp Library test program - * - * Copyright (c) 2013 Red Hat - * Author: Paul Moore - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include -#include - -#include - -#include "util.h" - -int main(int argc, char *argv[]) -{ - int rc; - struct util_options opts; - scmp_filter_ctx ctx = NULL; - - rc = util_getopt(argc, argv, &opts); - if (rc < 0) - goto out; - - ctx = seccomp_init(SCMP_ACT_ALLOW); - if (ctx == NULL) - return ENOMEM; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(read), 1, - SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 1, - SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 1, - SCMP_A0(SCMP_CMP_EQ, STDERR_FILENO)); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(close), 0); - if (rc != 0) - goto out; - - rc = seccomp_rule_add_exact(ctx, - SCMP_ACT_KILL, SCMP_SYS(rt_sigreturn), 0); - if (rc != 0) - goto out; - - rc = util_filter_output(&opts, ctx); - if (rc) - goto out; - -out: - seccomp_release(ctx); - return (rc < 0 ? -rc : rc); -} diff -Nru libseccomp-2.4.3/tests/34-sim-basic_blacklist.py libseccomp-2.5.1/tests/34-sim-basic_blacklist.py --- libseccomp-2.4.3/tests/34-sim-basic_blacklist.py 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/34-sim-basic_blacklist.py 1970-01-01 09:30:00.000000000 +0930 @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -# -# Seccomp Library test program -# -# Copyright (c) 2013 Red Hat -# Author: Paul Moore -# - -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of version 2.1 of the GNU Lesser General Public License as -# published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, see . -# - -import argparse -import sys - -import util - -from seccomp import * - -def test(args): - f = SyscallFilter(ALLOW) - f.add_rule_exactly(KILL, "read", Arg(0, EQ, sys.stdin.fileno())) - f.add_rule_exactly(KILL, "write", Arg(0, EQ, sys.stdout.fileno())) - f.add_rule_exactly(KILL, "write", Arg(0, EQ, sys.stderr.fileno())) - f.add_rule_exactly(KILL, "close") - f.add_rule_exactly(KILL, "rt_sigreturn") - return f - -args = util.get_opt() -ctx = test(args) -util.filter_output(args, ctx) - -# kate: syntax python; -# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/34-sim-basic_blacklist.tests libseccomp-2.5.1/tests/34-sim-basic_blacklist.tests --- libseccomp-2.4.3/tests/34-sim-basic_blacklist.tests 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/34-sim-basic_blacklist.tests 1970-01-01 09:30:00.000000000 +0930 @@ -1,32 +0,0 @@ -# -# libseccomp regression test automation data -# -# Copyright (c) 2013 Red Hat -# Author: Paul Moore -# - -test type: bpf-sim - -# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result -34-sim-basic_blacklist all read 0 0x856B008 10 N N N KILL -34-sim-basic_blacklist all read 1-10 0x856B008 10 N N N ALLOW -34-sim-basic_blacklist all write 1-2 0x856B008 10 N N N KILL -34-sim-basic_blacklist all write 3-10 0x856B008 10 N N N ALLOW -34-sim-basic_blacklist all close N N N N N N KILL -34-sim-basic_blacklist all rt_sigreturn N N N N N N KILL -34-sim-basic_blacklist all open 0x856B008 4 N N N N ALLOW -34-sim-basic_blacklist x86 0-2 N N N N N N ALLOW -34-sim-basic_blacklist x86 7-172 N N N N N N ALLOW -34-sim-basic_blacklist x86 174-350 N N N N N N ALLOW -34-sim-basic_blacklist x86_64 4-14 N N N N N N ALLOW -34-sim-basic_blacklist x86_64 16-350 N N N N N N ALLOW - -test type: bpf-sim-fuzz - -# Testname StressCount -34-sim-basic_blacklist 50 - -test type: bpf-valgrind - -# Testname -34-sim-basic_blacklist diff -Nru libseccomp-2.4.3/tests/34-sim-basic_denylist.c libseccomp-2.5.1/tests/34-sim-basic_denylist.c --- libseccomp-2.4.3/tests/34-sim-basic_denylist.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/34-sim-basic_denylist.c 2020-11-17 08:34:38.785027408 +1030 @@ -0,0 +1,74 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2013 Red Hat + * Author: Paul Moore + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include + +#include + +#include "util.h" + +int main(int argc, char *argv[]) +{ + int rc; + struct util_options opts; + scmp_filter_ctx ctx = NULL; + + rc = util_getopt(argc, argv, &opts); + if (rc < 0) + goto out; + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) + return ENOMEM; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(read), 1, + SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 1, + SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 1, + SCMP_A0(SCMP_CMP_EQ, STDERR_FILENO)); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(close), 0); + if (rc != 0) + goto out; + + rc = seccomp_rule_add_exact(ctx, + SCMP_ACT_KILL, SCMP_SYS(rt_sigreturn), 0); + if (rc != 0) + goto out; + + rc = util_filter_output(&opts, ctx); + if (rc) + goto out; + +out: + seccomp_release(ctx); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/34-sim-basic_denylist.py libseccomp-2.5.1/tests/34-sim-basic_denylist.py --- libseccomp-2.4.3/tests/34-sim-basic_denylist.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/34-sim-basic_denylist.py 2020-11-17 08:34:38.785027408 +1030 @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2013 Red Hat +# Author: Paul Moore +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys + +import util + +from seccomp import * + +def test(args): + f = SyscallFilter(ALLOW) + f.add_rule_exactly(KILL, "read", Arg(0, EQ, sys.stdin.fileno())) + f.add_rule_exactly(KILL, "write", Arg(0, EQ, sys.stdout.fileno())) + f.add_rule_exactly(KILL, "write", Arg(0, EQ, sys.stderr.fileno())) + f.add_rule_exactly(KILL, "close") + f.add_rule_exactly(KILL, "rt_sigreturn") + return f + +args = util.get_opt() +ctx = test(args) +util.filter_output(args, ctx) + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/34-sim-basic_denylist.tests libseccomp-2.5.1/tests/34-sim-basic_denylist.tests --- libseccomp-2.4.3/tests/34-sim-basic_denylist.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/34-sim-basic_denylist.tests 2020-11-17 08:34:38.785027408 +1030 @@ -0,0 +1,32 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2013 Red Hat +# Author: Paul Moore +# + +test type: bpf-sim + +# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result +34-sim-basic_denylist all read 0 0x856B008 10 N N N KILL +34-sim-basic_denylist all read 1-10 0x856B008 10 N N N ALLOW +34-sim-basic_denylist all write 1-2 0x856B008 10 N N N KILL +34-sim-basic_denylist all write 3-10 0x856B008 10 N N N ALLOW +34-sim-basic_denylist all close N N N N N N KILL +34-sim-basic_denylist all rt_sigreturn N N N N N N KILL +34-sim-basic_denylist all open 0x856B008 4 N N N N ALLOW +34-sim-basic_denylist x86 0-2 N N N N N N ALLOW +34-sim-basic_denylist x86 7-172 N N N N N N ALLOW +34-sim-basic_denylist x86 174-350 N N N N N N ALLOW +34-sim-basic_denylist x86_64 4-14 N N N N N N ALLOW +34-sim-basic_denylist x86_64 16-350 N N N N N N ALLOW + +test type: bpf-sim-fuzz + +# Testname StressCount +34-sim-basic_denylist 50 + +test type: bpf-valgrind + +# Testname +34-sim-basic_denylist diff -Nru libseccomp-2.4.3/tests/36-sim-ipc_syscalls.c libseccomp-2.5.1/tests/36-sim-ipc_syscalls.c --- libseccomp-2.4.3/tests/36-sim-ipc_syscalls.c 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/36-sim-ipc_syscalls.c 2020-11-17 08:34:38.785027408 +1030 @@ -53,6 +53,9 @@ rc = seccomp_arch_add(ctx, SCMP_ARCH_X32); if (rc != 0) goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC64LE); + if (rc != 0) + goto out; rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(semop), 0); if (rc != 0) diff -Nru libseccomp-2.4.3/tests/36-sim-ipc_syscalls.py libseccomp-2.5.1/tests/36-sim-ipc_syscalls.py --- libseccomp-2.4.3/tests/36-sim-ipc_syscalls.py 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/36-sim-ipc_syscalls.py 2020-11-17 08:34:38.785027408 +1030 @@ -34,6 +34,7 @@ f.add_arch(Arch("x86")) f.add_arch(Arch("x86_64")) f.add_arch(Arch("x32")) + f.add_arch(Arch("ppc64le")) f.add_rule(ALLOW, "semop") f.add_rule(ALLOW, "semtimedop") f.add_rule(ALLOW, "semget") diff -Nru libseccomp-2.4.3/tests/36-sim-ipc_syscalls.tests libseccomp-2.5.1/tests/36-sim-ipc_syscalls.tests --- libseccomp-2.4.3/tests/36-sim-ipc_syscalls.tests 2020-03-03 02:13:34.194033136 +1030 +++ libseccomp-2.5.1/tests/36-sim-ipc_syscalls.tests 2020-11-17 08:34:38.785027408 +1030 @@ -7,31 +7,31 @@ test type: bpf-sim -# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result -36-sim-ipc_syscalls +x86 ipc 1 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 2 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 3 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 4 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 11 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 12 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 13 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 14 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 21 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 22 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 23 N N N N N ALLOW -36-sim-ipc_syscalls +x86 ipc 24 N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 semop N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 semget N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 semctl N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 semtimedop N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 msgsnd N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 msgrcv N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 msgget N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 msgctl N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 shmat N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 shmdt N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 shmget N N N N N N ALLOW -36-sim-ipc_syscalls +x86_64 shmctl N N N N N N ALLOW +# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result +36-sim-ipc_syscalls +x86,+ppc64le ipc 1 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 2 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 3 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 4 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 11 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 12 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 13 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 14 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 21 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 22 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 23 N N N N N ALLOW +36-sim-ipc_syscalls +x86,+ppc64le ipc 24 N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 semop N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 semget N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 semctl N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 semtimedop N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 msgsnd N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 msgrcv N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 msgget N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 msgctl N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 shmat N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 shmdt N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 shmget N N N N N N ALLOW +36-sim-ipc_syscalls +x86_64 shmctl N N N N N N ALLOW test type: bpf-valgrind diff -Nru libseccomp-2.4.3/tests/39-basic-api_level.c libseccomp-2.5.1/tests/39-basic-api_level.c --- libseccomp-2.4.3/tests/39-basic-api_level.c 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/39-basic-api_level.c 2020-11-17 08:34:38.785027408 +1030 @@ -54,14 +54,35 @@ if (api != 3) return -7; + rc = seccomp_api_set(4); + if (rc != 0) + return -8; + api = seccomp_api_get(); + if (api != 4) + return -9; + + rc = seccomp_api_set(5); + if (rc != 0) + return -10; + api = seccomp_api_get(); + if (api != 5) + return -11; + + rc = seccomp_api_set(6); + if (rc != 0) + return -12; + api = seccomp_api_get(); + if (api != 6) + return -13; + /* Attempt to set a high, invalid API level */ rc = seccomp_api_set(1024); if (rc != -EINVAL) - return -8; + return -1001; /* Ensure that the previously set API level didn't change */ api = seccomp_api_get(); - if (api != 3) - return -9; + if (api != 6) + return -1002; return 0; } diff -Nru libseccomp-2.4.3/tests/39-basic-api_level.py libseccomp-2.5.1/tests/39-basic-api_level.py --- libseccomp-2.4.3/tests/39-basic-api_level.py 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/39-basic-api_level.py 2020-11-17 08:34:38.785027408 +1030 @@ -50,6 +50,21 @@ if api != 3: raise RuntimeError("Failed getting API level 3") + set_api(4) + api = get_api() + if api != 4: + raise RuntimeError("Failed getting API level 4") + + set_api(5) + api = get_api() + if api != 5: + raise RuntimeError("Failed getting API level 5") + + set_api(6) + api = get_api() + if api != 6: + raise RuntimeError("Failed getting API level 6") + # Attempt to set a high, invalid API level try: set_api(1024) @@ -59,7 +74,7 @@ raise RuntimeError("Missing failure when setting invalid API level") # Ensure that the previously set API level didn't change api = get_api() - if api != 3: + if api != 6: raise RuntimeError("Failed getting old API level after setting an invalid API level") test() diff -Nru libseccomp-2.4.3/tests/47-live-kill_process.c libseccomp-2.5.1/tests/47-live-kill_process.c --- libseccomp-2.4.3/tests/47-live-kill_process.c 2020-03-03 02:13:34.195033138 +1030 +++ libseccomp-2.5.1/tests/47-live-kill_process.c 2020-11-17 08:34:38.786027416 +1030 @@ -31,7 +31,7 @@ #include "util.h" -static const unsigned int whitelist[] = { +static const unsigned int allowlist[] = { SCMP_SYS(clone), SCMP_SYS(exit), SCMP_SYS(exit_group), @@ -75,8 +75,8 @@ if (ctx == NULL) return ENOMEM; - for (i = 0; i < sizeof(whitelist) / sizeof(whitelist[0]); i++) { - rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, whitelist[i], 0); + for (i = 0; i < sizeof(allowlist) / sizeof(allowlist[0]); i++) { + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, allowlist[i], 0); if (rc != 0) goto out; } diff -Nru libseccomp-2.4.3/tests/51-live-user_notification.c libseccomp-2.5.1/tests/51-live-user_notification.c --- libseccomp-2.4.3/tests/51-live-user_notification.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/51-live-user_notification.c 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,134 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2019 Cisco Systems, Inc. + * Author: Paul Moore + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" + +int main(int argc, char *argv[]) +{ + int rc, fd = -1, status; + struct seccomp_notif *req = NULL; + struct seccomp_notif_resp *resp = NULL; + scmp_filter_ctx ctx = NULL; + pid_t pid = 0, magic; + + magic = getpid(); + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) + return ENOMEM; + + rc = seccomp_rule_add(ctx, SCMP_ACT_NOTIFY, SCMP_SYS(getpid), 0, NULL); + if (rc) + goto out; + + rc = seccomp_load(ctx); + if (rc < 0) + goto out; + + rc = seccomp_notify_fd(ctx); + if (rc < 0) + goto out; + fd = rc; + + pid = fork(); + if (pid == 0) + exit(syscall(__NR_getpid) != magic); + + rc = seccomp_notify_alloc(&req, &resp); + if (rc) + goto out; + + rc = seccomp_notify_receive(fd, req); + if (rc) + goto out; + if (req->data.nr != __NR_getpid) { + rc = -EFAULT; + goto out; + } + rc = seccomp_notify_id_valid(fd, req->id); + if (rc) + goto out; + + resp->id = req->id; + resp->val = magic; + resp->error = 0; + resp->flags = 0; + rc = seccomp_notify_respond(fd, resp); + if (rc) + goto out; + + if (waitpid(pid, &status, 0) != pid) { + rc = -EFAULT; + goto out; + } + + if (!WIFEXITED(status)) { + rc = -EFAULT; + goto out; + } + if (WEXITSTATUS(status)) { + rc = -EFAULT; + goto out; + } + + rc = seccomp_reset(ctx, SCMP_ACT_ALLOW); + if (rc < 0) + goto out; + + rc = seccomp_rule_add(ctx, SCMP_ACT_NOTIFY, SCMP_SYS(getppid), 0, NULL); + if (rc) + goto out; + + rc = seccomp_load(ctx); + if (rc < 0) + goto out; + + rc = seccomp_notify_fd(ctx); + if (rc < 0) + goto out; + if (rc != fd) { + rc = -EFAULT; + goto out; + } else + rc = 0; + +out: + if (fd >= 0) + close(fd); + if (pid) + kill(pid, SIGKILL); + seccomp_notify_free(req, resp); + seccomp_release(ctx); + + if (rc != 0) + return (rc < 0 ? -rc : rc); + return 160; +} diff -Nru libseccomp-2.4.3/tests/51-live-user_notification.py libseccomp-2.5.1/tests/51-live-user_notification.py --- libseccomp-2.4.3/tests/51-live-user_notification.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/51-live-user_notification.py 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2019 Cisco Systems, Inc. +# Author: Paul Moore +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import os +import signal +import sys + +import util + +from seccomp import * + +def test(): + magic = os.getuid() + 1 + f = SyscallFilter(ALLOW) + f.add_rule(NOTIFY, "getuid") + f.load() + pid = os.fork() + if pid == 0: + val = os.getuid() + if val != magic: + raise RuntimeError("Response return value failed") + quit(1) + quit(0) + else: + notify = f.receive_notify() + if notify.syscall != resolve_syscall(Arch(), "getuid"): + raise RuntimeError("Notification failed") + f.respond_notify(NotificationResponse(notify, magic, 0, 0)) + wpid, rc = os.waitpid(pid, 0) + if os.WIFEXITED(rc) == 0: + raise RuntimeError("Child process error") + if os.WEXITSTATUS(rc) != 0: + raise RuntimeError("Child process error") + f.reset(ALLOW) + f.add_rule(NOTIFY, "getppid") + f.load() + # no easy way to check the notification fd here + quit(160) + +test() + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/51-live-user_notification.tests libseccomp-2.5.1/tests/51-live-user_notification.tests --- libseccomp-2.4.3/tests/51-live-user_notification.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/51-live-user_notification.tests 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright Cisco Systems 2019 +# Author: Tycho Andersen +# + +test type: live + +# Testname API Result +51-live-user_notification 5 ALLOW diff -Nru libseccomp-2.4.3/tests/53-sim-binary_tree.c libseccomp-2.5.1/tests/53-sim-binary_tree.c --- libseccomp-2.4.3/tests/53-sim-binary_tree.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/53-sim-binary_tree.c 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,156 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2018-2020 Oracle and/or its affiliates. + * Author: Tom Hromatka + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +#define ARG_COUNT_MAX 2 + +struct syscall_errno { + int syscall; + int error; + int arg_cnt; + /* To make the test more interesting, arguments are added to several + * syscalls. To keep the test simple, the arguments always use + * SCMP_CMP_EQ. + */ + int args[ARG_COUNT_MAX]; +}; + +struct syscall_errno table[] = { + { SCMP_SYS(read), 0, 0, { 0, 0 } }, + { SCMP_SYS(write), 1, 0, { 0, 0 } }, + { SCMP_SYS(open), 2, 0, { 0, 0 } }, + { SCMP_SYS(close), 3, 2, { 100, 101 } }, + { SCMP_SYS(stat), 4, 0, { 0, 0 } }, + { SCMP_SYS(fstat), 5, 0, { 0, 0 } }, + { SCMP_SYS(lstat), 6, 0, { 0, 0 } }, + { SCMP_SYS(poll), 7, 1, { 102, 0 } }, + { SCMP_SYS(lseek), 8, 2, { 103, 104 } }, + { SCMP_SYS(mmap), 9, 0, { 0, 0 } }, + { SCMP_SYS(mprotect), 10, 0, { 0, 0 } }, + { SCMP_SYS(munmap), 11, 0, { 0, 0 } }, + { SCMP_SYS(brk), 12, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigaction), 13, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigprocmask), 14, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigreturn), 15, 0, { 0, 0 } }, + { SCMP_SYS(ioctl), 16, 0, { 0, 0 } }, + { SCMP_SYS(pread64), 17, 1, { 105, 0 } }, + { SCMP_SYS(pwrite64), 18, 0, { 0, 0 } }, + { SCMP_SYS(readv), 19, 0, { 0, 0 } }, + { SCMP_SYS(writev), 20, 0, { 0, 0 } }, + { SCMP_SYS(access), 21, 0, { 0, 0 } }, + { SCMP_SYS(pipe), 22, 0, { 0, 0 } }, + { SCMP_SYS(select), 23, 2, { 106, 107 } }, + { SCMP_SYS(sched_yield), 24, 0, { 0, 0 } }, + { SCMP_SYS(mremap), 25, 2, { 108, 109 } }, + { SCMP_SYS(msync), 26, 0, { 0, 0 } }, + { SCMP_SYS(mincore), 27, 0, { 0, 0 } }, + { SCMP_SYS(madvise), 28, 0, { 0, 0 } }, + { SCMP_SYS(dup), 32, 1, { 112, 0 } }, + { SCMP_SYS(dup2), 33, 0, { 0, 0 } }, + { SCMP_SYS(pause), 34, 0, { 0, 0 } }, + { SCMP_SYS(nanosleep), 35, 0, { 0, 0 } }, + { SCMP_SYS(getitimer), 36, 0, { 0, 0 } }, + { SCMP_SYS(alarm), 37, 0, { 0, 0 } }, +}; + +const int table_size = sizeof(table) / sizeof(table[0]); + +int main(int argc, char *argv[]) +{ + int rc, i; + struct util_options opts; + scmp_filter_ctx ctx = NULL; + + rc = util_getopt(argc, argv, &opts); + if (rc < 0) + goto out; + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) { + rc = ENOMEM; + goto out; + } + + rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE); + if (rc != 0) + goto out; + + rc = seccomp_arch_add(ctx, SCMP_ARCH_AARCH64); + if (rc != 0) + goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC64LE); + if (rc != 0) + goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_X86_64); + if (rc != 0) + goto out; + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_OPTIMIZE, 2); + if (rc < 0) + goto out; + + for (i = 0; i < table_size; i++) { + switch (table[i].arg_cnt) { + case 2: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 2, + SCMP_A0(SCMP_CMP_EQ, + table[i].args[0]), + SCMP_A1(SCMP_CMP_EQ, + table[i].args[1])); + break; + case 1: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 1, + SCMP_A0(SCMP_CMP_EQ, + table[i].args[0])); + break; + case 0: + default: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 0); + break; + } + + if (rc < 0) + goto out; + } + + rc = util_filter_output(&opts, ctx); + if (rc) + goto out; + +out: + seccomp_release(ctx); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/53-sim-binary_tree.py libseccomp-2.5.1/tests/53-sim-binary_tree.py --- libseccomp-2.4.3/tests/53-sim-binary_tree.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/53-sim-binary_tree.py 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# Author: Tom Hromatka +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys + +import util + +from seccomp import * + +table = [ + {"syscall": "read", "error": 0, "arg_cnt": 0 }, + {"syscall": "write", "error": 1, "arg_cnt": 0 }, + {"syscall": "open", "error": 2, "arg_cnt": 0 }, + {"syscall": "close", "error": 3, "arg_cnt": 2, "arg1": 100, "arg2": 101 }, + {"syscall": "stat", "error": 4, "arg_cnt": 0 }, + {"syscall": "fstat", "error": 5, "arg_cnt": 0 }, + {"syscall": "lstat", "error": 6, "arg_cnt": 0 }, + {"syscall": "poll", "error": 7, "arg_cnt": 1, "arg1": 102 }, + {"syscall": "lseek", "error": 8, "arg_cnt": 2, "arg1": 103, "arg2": 104 }, + {"syscall": "mmap", "error": 9, "arg_cnt": 0 }, + {"syscall": "mprotect", "error": 10, "arg_cnt": 0 }, + {"syscall": "munmap", "error": 11, "arg_cnt": 0 }, + {"syscall": "brk", "error": 12, "arg_cnt": 0 }, + {"syscall": "rt_sigaction", "error": 13, "arg_cnt": 0 }, + {"syscall": "rt_sigprocmask", "error": 14, "arg_cnt": 0 }, + {"syscall": "rt_sigreturn", "error": 15, "arg_cnt": 0 }, + {"syscall": "ioctl", "error": 16, "arg_cnt": 0 }, + {"syscall": "pread64", "error": 17, "arg_cnt": 1, "arg1": 105 }, + {"syscall": "pwrite64", "error": 18, "arg_cnt": 0 }, + {"syscall": "readv", "error": 19, "arg_cnt": 0 }, + {"syscall": "writev", "error": 20, "arg_cnt": 0 }, + {"syscall": "access", "error": 21, "arg_cnt": 0 }, + {"syscall": "pipe", "error": 22, "arg_cnt": 0 }, + {"syscall": "select", "error": 23, "arg_cnt": 2, "arg1": 106, "arg2": 107 }, + {"syscall": "sched_yield", "error": 24, "arg_cnt": 0 }, + {"syscall": "mremap", "error": 25, "arg_cnt": 2, "arg1": 108, "arg2": 109 }, + {"syscall": "msync", "error": 26, "arg_cnt": 0 }, + {"syscall": "mincore", "error": 27, "arg_cnt": 0 }, + {"syscall": "madvise", "error": 28, "arg_cnt": 0 }, + {"syscall": "dup", "error": 32, "arg_cnt": 1, "arg1": 112 }, + {"syscall": "dup2", "error": 33, "arg_cnt": 0 }, + {"syscall": "pause", "error": 34, "arg_cnt": 0 }, + {"syscall": "nanosleep", "error": 35, "arg_cnt": 0 }, + {"syscall": "getitimer", "error": 36, "arg_cnt": 0 }, + {"syscall": "alarm", "error": 37, "arg_cnt": 0 }, +] + +def test(args): + f = SyscallFilter(ALLOW) + + f.remove_arch(Arch()) + f.add_arch(Arch("aarch64")) + f.add_arch(Arch("ppc64le")) + f.add_arch(Arch("x86_64")) + + for entry in table: + if entry["arg_cnt"] == 2: + f.add_rule(ERRNO(entry["error"]), entry["syscall"], + Arg(0, EQ, entry["arg1"]), + Arg(1, EQ, entry["arg2"])) + elif entry["arg_cnt"] == 1: + f.add_rule(ERRNO(entry["error"]), entry["syscall"], + Arg(0, EQ, entry["arg1"])) + else: + f.add_rule(ERRNO(entry["error"]), entry["syscall"]) + + return f + +args = util.get_opt() +ctx = test(args) +util.filter_output(args, ctx) + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/53-sim-binary_tree.tests libseccomp-2.5.1/tests/53-sim-binary_tree.tests --- libseccomp-2.4.3/tests/53-sim-binary_tree.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/53-sim-binary_tree.tests 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,65 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2019-2020 Oracle and/or its affiliates. +# Author: Tom Hromatka +# + +test type: bpf-sim + +# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 read N N N N N N ERRNO(0) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 write N N N N N N ERRNO(1) +53-sim-binary_tree +x86_64,+ppc64le open N N N N N N ERRNO(2) +53-sim-binary_tree +aarch64 open N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 close N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 close 100 1234 N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 close 100 101 N N N N ERRNO(3) +53-sim-binary_tree +x86_64,+ppc64le stat N N N N N N ERRNO(4) +53-sim-binary_tree +aarch64 stat N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 fstat N N N N N N ERRNO(5) +53-sim-binary_tree +x86_64,+ppc64le lstat N N N N N N ERRNO(6) +53-sim-binary_tree +aarch64 lstat N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le poll 102 N N N N N ERRNO(7) +53-sim-binary_tree +aarch64 poll 102 N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 lseek 103 104 N N N N ERRNO(8) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 mmap N N N N N N ERRNO(9) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 mprotect N N N N N N ERRNO(10) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 munmap N N N N N N ERRNO(11) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 brk N N N N N N ERRNO(12) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 rt_sigaction N N N N N N ERRNO(13) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 rt_sigprocmask N N N N N N ERRNO(14) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 rt_sigreturn N N N N N N ERRNO(15) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 ioctl N N N N N N ERRNO(16) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 pread64 105 N N N N N ERRNO(17) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 pwrite64 N N N N N N ERRNO(18) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 readv N N N N N N ERRNO(19) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 writev N N N N N N ERRNO(20) +53-sim-binary_tree +x86_64,+ppc64le access N N N N N N ERRNO(21) +53-sim-binary_tree +aarch64 access N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le pipe N N N N N N ERRNO(22) +53-sim-binary_tree +aarch64 pipe N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 select N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le select 106 107 N N N N ERRNO(23) +53-sim-binary_tree +aarch64 select 106 107 N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 sched_yield N N N N N N ERRNO(24) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 mremap N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 mremap 108 109 N N N N ERRNO(25) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 msync N N N N N N ERRNO(26) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 mincore N N N N N N ERRNO(27) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 madvise N N N N N N ERRNO(28) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 dup 112 N N N N N ERRNO(32) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 dup 5678 N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le dup2 N N N N N N ERRNO(33) +53-sim-binary_tree +aarch64 dup2 N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le pause N N N N N N ERRNO(34) +53-sim-binary_tree +aarch64 pause N N N N N N ALLOW +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 nanosleep N N N N N N ERRNO(35) +53-sim-binary_tree +x86_64,+ppc64le,+aarch64 getitimer N N N N N N ERRNO(36) +53-sim-binary_tree +x86_64,+ppc64le alarm N N N N N N ERRNO(37) +53-sim-binary_tree +aarch64 alarm N N N N N N ALLOW + +test type: bpf-valgrind + +# Testname +53-sim-binary_tree diff -Nru libseccomp-2.4.3/tests/54-live-binary_tree.c libseccomp-2.5.1/tests/54-live-binary_tree.c --- libseccomp-2.4.3/tests/54-live-binary_tree.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/54-live-binary_tree.c 2020-11-17 08:34:38.786027416 +1030 @@ -0,0 +1,128 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Author: Tom Hromatka + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +/* arbitrary list of syscalls to force seccomp to generate a binary tree */ +static const int denylist[] = { + SCMP_SYS(times), + SCMP_SYS(ptrace), + SCMP_SYS(getuid), + SCMP_SYS(syslog), + SCMP_SYS(getgid), + SCMP_SYS(setuid), + SCMP_SYS(setgid), + SCMP_SYS(geteuid), + SCMP_SYS(getegid), + SCMP_SYS(setpgid), + SCMP_SYS(getppid), + SCMP_SYS(getpgrp), + SCMP_SYS(setsid), + SCMP_SYS(setreuid), + SCMP_SYS(setregid), + SCMP_SYS(getgroups), + SCMP_SYS(setgroups), + SCMP_SYS(setresuid), + SCMP_SYS(getresuid), + SCMP_SYS(setresgid), + SCMP_SYS(getresgid), + SCMP_SYS(getpgid), + SCMP_SYS(setfsuid), + SCMP_SYS(setfsgid), +}; + +int main(int argc, char *argv[]) +{ + int rc; + int fd; + int i; + scmp_filter_ctx ctx = NULL; + const char buf[] = "testing"; + ssize_t buf_len = strlen(buf); + + rc = util_action_parse(argv[1]); + if (rc != SCMP_ACT_ALLOW) { + rc = 1; + goto out; + } + + rc = util_trap_install(); + if (rc != 0) + goto out; + + fd = open("/dev/null", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); + if (fd < 0) { + rc = errno; + goto out; + } + + ctx = seccomp_init(SCMP_ACT_TRAP); + if (ctx == NULL) + return ENOMEM; + + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, + SCMP_A0(SCMP_CMP_EQ, fd)); + if (rc != 0) + goto out; + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0); + if (rc != 0) + goto out; + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0); + if (rc != 0) + goto out; + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(exit_group), 0); + if (rc != 0) + goto out; + + for (i = 0; i < (sizeof(denylist) / sizeof(denylist[0])); i++) { + rc = seccomp_rule_add(ctx, SCMP_ACT_KILL, denylist[i], 0); + if (rc != 0) + goto out; + } + + rc = seccomp_load(ctx); + if (rc != 0) + goto out; + + if (write(fd, buf, buf_len) < buf_len) { + rc = errno; + goto out; + } + if (close(fd) < 0) { + rc = errno; + goto out; + } + + rc = 160; + +out: + seccomp_release(ctx); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/54-live-binary_tree.py libseccomp-2.5.1/tests/54-live-binary_tree.py --- libseccomp-2.4.3/tests/54-live-binary_tree.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/54-live-binary_tree.py 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# Author: Tom Hromatka +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys + +import util + +from seccomp import * + +denylist = [ + "times", + "ptrace", + "getuid", + "syslog", + "getgid", + "setuid", + "setgid", + "geteuid", + "getegid", + "setpgid", + "getppid", + "getpgrp", + "setsid", + "setreuid", + "setregid", + "getgroups", + "setgroups", + "setresuid", + "getresuid", + "setresgid", + "getresgid", + "getpgid", + "setfsuid", + "setfsgid", +] + +def test(): + action = util.parse_action(sys.argv[1]) + if not action == ALLOW: + quit(1) + util.install_trap() + f = SyscallFilter(TRAP) + f.set_attr(Attr.CTL_TSYNC, 1) + # NOTE: additional syscalls required for python + f.add_rule(ALLOW, "stat") + f.add_rule(ALLOW, "fstat") + f.add_rule(ALLOW, "open") + f.add_rule(ALLOW, "openat") + f.add_rule(ALLOW, "mmap") + f.add_rule(ALLOW, "munmap") + f.add_rule(ALLOW, "read") + f.add_rule(ALLOW, "write") + f.add_rule(ALLOW, "close") + f.add_rule(ALLOW, "rt_sigaction") + f.add_rule(ALLOW, "rt_sigreturn") + f.add_rule(ALLOW, "sigreturn") + f.add_rule(ALLOW, "sigaltstack") + f.add_rule(ALLOW, "brk") + f.add_rule(ALLOW, "exit_group") + + for syscall in denylist: + f.add_rule(KILL, syscall) + + f.load() + try: + util.write_file("/dev/null") + except OSError as ex: + quit(ex.errno) + quit(160) + +test() + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/54-live-binary_tree.tests libseccomp-2.5.1/tests/54-live-binary_tree.tests --- libseccomp-2.4.3/tests/54-live-binary_tree.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/54-live-binary_tree.tests 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +# Author: Tom Hromatka +# + +test type: live + +# Testname API Result +54-live-binary_tree 1 ALLOW diff -Nru libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.c libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.c --- libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.c 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,134 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2018-2020 Oracle and/or its affiliates. + * Author: Tom Hromatka + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +#define ARG_COUNT_MAX 2 + +struct syscall_errno { + int syscall; + int error; + int arg_cnt; + /* To make the test more interesting, arguments are added to several + * syscalls. To keep the test simple, the arguments always use + * SCMP_CMP_EQ. + */ + int args[ARG_COUNT_MAX]; +}; + +struct syscall_errno table[] = { + { SCMP_SYS(read), 0, 2, { 100, 101 } }, + { SCMP_SYS(write), 1, 1, { 102, 0 } }, + { SCMP_SYS(open), 2, 0, { 0, 0 } }, + { SCMP_SYS(close), 3, 0, { 0, 0 } }, + { SCMP_SYS(stat), 4, 0, { 0, 0 } }, + { SCMP_SYS(fstat), 5, 1, { 103, 0 } }, + { SCMP_SYS(lstat), 6, 0, { 0, 0 } }, + { SCMP_SYS(poll), 7, 0, { 0, 0 } }, + { SCMP_SYS(lseek), 8, 1, { 104, 0 } }, + { SCMP_SYS(mmap), 9, 0, { 0, 0 } }, + { SCMP_SYS(mprotect), 10, 1, { 105, 0 } }, + { SCMP_SYS(munmap), 11, 0, { 0, 0 } }, + { SCMP_SYS(brk), 12, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigaction), 13, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigprocmask), 14, 0, { 0, 0 } }, + { SCMP_SYS(rt_sigreturn), 15, 0, { 0, 0 } }, + { SCMP_SYS(ioctl), 16, 0, { 0, 0 } }, + { SCMP_SYS(pread64), 17, 1, { 106, 0 } }, + { SCMP_SYS(pwrite64), 18, 2, { 107, 108 } }, +}; + +const int table_size = sizeof(table) / sizeof(table[0]); + +int main(int argc, char *argv[]) +{ + int rc, fd, i; + scmp_filter_ctx ctx = NULL; + + /* stdout */ + fd = 1; + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) { + rc = ENOMEM; + goto out; + } + + rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE); + if (rc < 0) + goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_X86_64); + if (rc < 0) + goto out; + rc = seccomp_arch_add(ctx, SCMP_ARCH_AARCH64); + if (rc < 0) + goto out; + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_OPTIMIZE, 2); + if (rc < 0) + goto out; + + for (i = 0; i < table_size; i++) { + switch (table[i].arg_cnt) { + case 2: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 2, + SCMP_A0(SCMP_CMP_EQ, + table[i].args[0]), + SCMP_A1(SCMP_CMP_EQ, + table[i].args[1])); + break; + case 1: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 1, + SCMP_A0(SCMP_CMP_EQ, + table[i].args[0])); + break; + case 0: + default: + rc = seccomp_rule_add(ctx, + SCMP_ACT_ERRNO(table[i].error), + table[i].syscall, 0); + break; + } + + if (rc < 0) + goto out; + } + + rc = seccomp_export_pfc(ctx, fd); + if (rc < 0) + goto out; + +out: + seccomp_release(ctx); + close(fd); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.pfc libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.pfc --- libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.pfc 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.pfc 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,182 @@ +# +# pseudo filter code start +# +# filter for arch x86_64 (3221225534) +if ($arch == 3221225534) + if ($syscall > 2) + if ($syscall > 10) + if ($syscall > 14) + # filter for syscall "pwrite64" (18) [priority: 65531] + if ($syscall == 18) + if ($a0.hi32 == 0) + if ($a0.lo32 == 107) + if ($a1.hi32 == 0) + if ($a1.lo32 == 108) + action ERRNO(18); + # filter for syscall "pread64" (17) [priority: 65533] + if ($syscall == 17) + if ($a0.hi32 == 0) + if ($a0.lo32 == 106) + action ERRNO(17); + # filter for syscall "ioctl" (16) [priority: 65535] + if ($syscall == 16) + action ERRNO(16); + # filter for syscall "rt_sigreturn" (15) [priority: 65535] + if ($syscall == 15) + action ERRNO(15); + else # ($syscall <= 14) + # filter for syscall "rt_sigprocmask" (14) [priority: 65535] + if ($syscall == 14) + action ERRNO(14); + # filter for syscall "rt_sigaction" (13) [priority: 65535] + if ($syscall == 13) + action ERRNO(13); + # filter for syscall "brk" (12) [priority: 65535] + if ($syscall == 12) + action ERRNO(12); + # filter for syscall "munmap" (11) [priority: 65535] + if ($syscall == 11) + action ERRNO(11); + else # ($syscall <= 10) + if ($syscall > 6) + # filter for syscall "mprotect" (10) [priority: 65533] + if ($syscall == 10) + if ($a0.hi32 == 0) + if ($a0.lo32 == 105) + action ERRNO(10); + # filter for syscall "mmap" (9) [priority: 65535] + if ($syscall == 9) + action ERRNO(9); + # filter for syscall "lseek" (8) [priority: 65533] + if ($syscall == 8) + if ($a0.hi32 == 0) + if ($a0.lo32 == 104) + action ERRNO(8); + # filter for syscall "poll" (7) [priority: 65535] + if ($syscall == 7) + action ERRNO(7); + else # ($syscall <= 6) + # filter for syscall "lstat" (6) [priority: 65535] + if ($syscall == 6) + action ERRNO(6); + # filter for syscall "fstat" (5) [priority: 65533] + if ($syscall == 5) + if ($a0.hi32 == 0) + if ($a0.lo32 == 103) + action ERRNO(5); + # filter for syscall "stat" (4) [priority: 65535] + if ($syscall == 4) + action ERRNO(4); + # filter for syscall "close" (3) [priority: 65535] + if ($syscall == 3) + action ERRNO(3); + else # ($syscall <= 2) + # filter for syscall "open" (2) [priority: 65535] + if ($syscall == 2) + action ERRNO(2); + # filter for syscall "write" (1) [priority: 65533] + if ($syscall == 1) + if ($a0.hi32 == 0) + if ($a0.lo32 == 102) + action ERRNO(1); + # filter for syscall "read" (0) [priority: 65531] + if ($syscall == 0) + if ($a0.hi32 == 0) + if ($a0.lo32 == 100) + if ($a1.hi32 == 0) + if ($a1.lo32 == 101) + action ERRNO(0); + # default action + action ALLOW; +# filter for arch aarch64 (3221225655) +if ($arch == 3221225655) + if ($syscall > 62) + if ($syscall > 139) + if ($syscall > 226) + # filter for syscall "lstat" (4294957133) [priority: 65535] + if ($syscall == 4294957133) + action ERRNO(6); + # filter for syscall "open" (4294957130) [priority: 65535] + if ($syscall == 4294957130) + action ERRNO(2); + # filter for syscall "poll" (4294957127) [priority: 65535] + if ($syscall == 4294957127) + action ERRNO(7); + # filter for syscall "stat" (4294957122) [priority: 65535] + if ($syscall == 4294957122) + action ERRNO(4); + else # ($syscall <= 226) + # filter for syscall "mprotect" (226) [priority: 65533] + if ($syscall == 226) + if ($a0.hi32 == 0) + if ($a0.lo32 == 105) + action ERRNO(10); + # filter for syscall "mmap" (222) [priority: 65535] + if ($syscall == 222) + action ERRNO(9); + # filter for syscall "munmap" (215) [priority: 65535] + if ($syscall == 215) + action ERRNO(11); + # filter for syscall "brk" (214) [priority: 65535] + if ($syscall == 214) + action ERRNO(12); + else # ($syscall <= 139) + if ($syscall > 68) + # filter for syscall "rt_sigreturn" (139) [priority: 65535] + if ($syscall == 139) + action ERRNO(15); + # filter for syscall "rt_sigprocmask" (135) [priority: 65535] + if ($syscall == 135) + action ERRNO(14); + # filter for syscall "rt_sigaction" (134) [priority: 65535] + if ($syscall == 134) + action ERRNO(13); + # filter for syscall "fstat" (80) [priority: 65533] + if ($syscall == 80) + if ($a0.hi32 == 0) + if ($a0.lo32 == 103) + action ERRNO(5); + else # ($syscall <= 68) + # filter for syscall "pwrite64" (68) [priority: 65531] + if ($syscall == 68) + if ($a0.hi32 == 0) + if ($a0.lo32 == 107) + if ($a1.hi32 == 0) + if ($a1.lo32 == 108) + action ERRNO(18); + # filter for syscall "pread64" (67) [priority: 65533] + if ($syscall == 67) + if ($a0.hi32 == 0) + if ($a0.lo32 == 106) + action ERRNO(17); + # filter for syscall "write" (64) [priority: 65533] + if ($syscall == 64) + if ($a0.hi32 == 0) + if ($a0.lo32 == 102) + action ERRNO(1); + # filter for syscall "read" (63) [priority: 65531] + if ($syscall == 63) + if ($a0.hi32 == 0) + if ($a0.lo32 == 100) + if ($a1.hi32 == 0) + if ($a1.lo32 == 101) + action ERRNO(0); + else # ($syscall <= 62) + # filter for syscall "lseek" (62) [priority: 65533] + if ($syscall == 62) + if ($a0.hi32 == 0) + if ($a0.lo32 == 104) + action ERRNO(8); + # filter for syscall "close" (57) [priority: 65535] + if ($syscall == 57) + action ERRNO(3); + # filter for syscall "ioctl" (29) [priority: 65535] + if ($syscall == 29) + action ERRNO(16); + # default action + action ALLOW; +# invalid architecture action +action KILL; +# +# pseudo filter code end +# diff -Nru libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.sh libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.sh --- libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.sh 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.sh 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,46 @@ +#!/bin/bash + +# +# libseccomp regression test automation data +# +# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +# Author: Tom Hromatka +# + +#### +# functions + +# +# Dependency check +# +# Arguments: +# 1 Dependency to check for +# +function check_deps() { + [[ -z "$1" ]] && return + which "$1" >& /dev/null + return $? +} + +# +# Dependency verification +# +# Arguments: +# 1 Dependency to check for +# +function verify_deps() { + [[ -z "$1" ]] && return + if ! check_deps "$1"; then + echo "error: install \"$1\" and include it in your \$PATH" + exit 1 + fi +} + +#### +# functions + +verify_deps diff + +# compare output to the known good output, fail if different +./55-basic-pfc_binary_tree | \ + diff -q ${srcdir:=.}/55-basic-pfc_binary_tree.pfc - > /dev/null diff -Nru libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.tests libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.tests --- libseccomp-2.4.3/tests/55-basic-pfc_binary_tree.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/55-basic-pfc_binary_tree.tests 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +# Author: Tom Hromatka +# + +test type: basic + +# Test command +55-basic-pfc_binary_tree.sh diff -Nru libseccomp-2.4.3/tests/56-basic-iterate_syscalls.c libseccomp-2.5.1/tests/56-basic-iterate_syscalls.c --- libseccomp-2.4.3/tests/56-basic-iterate_syscalls.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/56-basic-iterate_syscalls.c 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,90 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2020 Red Hat + * Author: Giuseppe Scrivano + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include + +#include + +unsigned int arch_list[] = { + SCMP_ARCH_NATIVE, + SCMP_ARCH_X86, + SCMP_ARCH_X86_64, + SCMP_ARCH_X32, + SCMP_ARCH_ARM, + SCMP_ARCH_AARCH64, + SCMP_ARCH_MIPS, + SCMP_ARCH_MIPS64, + SCMP_ARCH_MIPS64N32, + SCMP_ARCH_MIPSEL, + SCMP_ARCH_MIPSEL64, + SCMP_ARCH_MIPSEL64N32, + SCMP_ARCH_PPC, + SCMP_ARCH_PPC64, + SCMP_ARCH_PPC64LE, + SCMP_ARCH_S390, + SCMP_ARCH_S390X, + SCMP_ARCH_PARISC, + SCMP_ARCH_PARISC64, + SCMP_ARCH_RISCV64, + -1 +}; + +static int test_arch(int arch, int init) +{ + int n, iter = 0; + + for (iter = init; iter < init + 1000; iter++) { + char *name; + + name = seccomp_syscall_resolve_num_arch(arch, iter); + if (name == NULL) + continue; + + n = seccomp_syscall_resolve_name_arch(arch, name); + if (n != iter) + return 1; + } + return 0; +} + +int main(int argc, char *argv[]) +{ + int iter = 0; + + for (iter = 0; arch_list[iter] != -1; iter++) { + int init = 0; + if (arch_list[iter] == SCMP_ARCH_X32) + init = 0x40000000; + else if (arch_list[iter] == SCMP_ARCH_MIPS) + init = 4000; + else if (arch_list[iter] == SCMP_ARCH_MIPS64) + init = 5000; + else if (arch_list[iter] == SCMP_ARCH_MIPS64N32) + init = 6000; + if (test_arch(arch_list[iter], init) < 0) + return 1; + } + + return 0; +} diff -Nru libseccomp-2.4.3/tests/56-basic-iterate_syscalls.py libseccomp-2.5.1/tests/56-basic-iterate_syscalls.py --- libseccomp-2.4.3/tests/56-basic-iterate_syscalls.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/56-basic-iterate_syscalls.py 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2020 Red Hat +# Author: Giuseppe Scrivano +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys + +import util + +from seccomp import * + +arch_list = ["x86", + "x86_64", + "x32", + "arm", + "aarch64", + "mipsel", + "mipsel64", + "mipsel64n32", + "ppc64le", + "riscv64"] + +def test_arch(arch, init): + for i in range(init, init + 1000): + sys_name = resolve_syscall(arch, i) + if sys_name is None: + continue + n = resolve_syscall(i, sys_name) + if i != n: + raise RuntimeError("Test failure") + +def test(): + for i in arch_list: + init = 0 + if i == "x32": + init = 0x40000000 + elif i == "mipsel": + init = 4000 + elif i == "mipsel64": + init = 5000 + elif i == "mipsel64n32": + init = 6000 + test_arch(Arch(i), init) + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/56-basic-iterate_syscalls.tests libseccomp-2.5.1/tests/56-basic-iterate_syscalls.tests --- libseccomp-2.4.3/tests/56-basic-iterate_syscalls.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/56-basic-iterate_syscalls.tests 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2020 Red Hat +# Author: Giuseppe Scrivano +# + +test type: basic + +# Test command +56-basic-iterate_syscalls diff -Nru libseccomp-2.4.3/tests/57-basic-rawsysrc.c libseccomp-2.5.1/tests/57-basic-rawsysrc.c --- libseccomp-2.4.3/tests/57-basic-rawsysrc.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/57-basic-rawsysrc.c 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,64 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2020 Cisco Systems, Inc. + * Author: Paul Moore + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +int main(int argc, char *argv[]) +{ + int rc; + int fd; + scmp_filter_ctx ctx = NULL; + + rc = seccomp_api_set(3); + if (rc != 0) + return EOPNOTSUPP; + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) { + rc = ENOMEM; + goto out; + } + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_API_SYSRAWRC, 1); + if (rc != 0) + goto out; + + /* we must use a closed/invalid fd for this to work */ + fd = dup(2); + close(fd); + rc = seccomp_export_pfc(ctx, fd); + if (rc == -EBADF) + rc = 0; + else + rc = -1; + +out: + seccomp_release(ctx); + return (rc < 0 ? -rc : rc); +} diff -Nru libseccomp-2.4.3/tests/57-basic-rawsysrc.py libseccomp-2.5.1/tests/57-basic-rawsysrc.py --- libseccomp-2.4.3/tests/57-basic-rawsysrc.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/57-basic-rawsysrc.py 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2020 Cisco Systems, Inc. +# Author: Paul Moore +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import sys +import os + +import util + +from seccomp import * + +def test(): + # this test really isn't conclusive, but considering how python does error + # handling it may be the best we can do + f = SyscallFilter(ALLOW) + dummy = open("/dev/null", "w") + os.close(dummy.fileno()) + try: + f = f.export_pfc(dummy) + except RuntimeError: + pass + +test() + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/57-basic-rawsysrc.tests libseccomp-2.5.1/tests/57-basic-rawsysrc.tests --- libseccomp-2.4.3/tests/57-basic-rawsysrc.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/57-basic-rawsysrc.tests 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2020 Cisco Systems, Inc. +# Author: Paul Moore +# + +test type: basic + +# Test command +57-basic-rawsysrc diff -Nru libseccomp-2.4.3/tests/58-live-tsync_notify.c libseccomp-2.5.1/tests/58-live-tsync_notify.c --- libseccomp-2.4.3/tests/58-live-tsync_notify.c 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/58-live-tsync_notify.c 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,117 @@ +/** + * Seccomp Library test program + * + * Copyright (c) 2019 Cisco Systems, Inc. + * Author: Paul Moore + */ + +/* + * This library is free software; you can redistribute it and/or modify it + * under the terms of version 2.1 of the GNU Lesser General Public License as + * published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" + +int main(int argc, char *argv[]) +{ + int rc, fd = -1, status; + struct seccomp_notif *req = NULL; + struct seccomp_notif_resp *resp = NULL; + scmp_filter_ctx ctx = NULL; + pid_t pid = 0, magic; + + magic = getpid(); + + ctx = seccomp_init(SCMP_ACT_ALLOW); + if (ctx == NULL) + return ENOMEM; + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); + if (rc) + goto out; + + rc = seccomp_rule_add(ctx, SCMP_ACT_NOTIFY, SCMP_SYS(getpid), 0, NULL); + if (rc) + goto out; + + rc = seccomp_load(ctx); + if (rc < 0) + goto out; + + rc = seccomp_notify_fd(ctx); + if (rc < 0) + goto out; + fd = rc; + + pid = fork(); + if (pid == 0) + exit(syscall(__NR_getpid) != magic); + + rc = seccomp_notify_alloc(&req, &resp); + if (rc) + goto out; + + rc = seccomp_notify_receive(fd, req); + if (rc) + goto out; + if (req->data.nr != __NR_getpid) { + rc = -EFAULT; + goto out; + } + rc = seccomp_notify_id_valid(fd, req->id); + if (rc) + goto out; + + resp->id = req->id; + resp->val = magic; + resp->error = 0; + resp->flags = 0; + rc = seccomp_notify_respond(fd, resp); + if (rc) + goto out; + + if (waitpid(pid, &status, 0) != pid) { + rc = -EFAULT; + goto out; + } + + if (!WIFEXITED(status)) { + rc = -EFAULT; + goto out; + } + if (WEXITSTATUS(status)) { + rc = -EFAULT; + goto out; + } + +out: + if (fd >= 0) + close(fd); + if (pid) + kill(pid, SIGKILL); + seccomp_notify_free(req, resp); + seccomp_release(ctx); + + if (rc != 0) + return (rc < 0 ? -rc : rc); + return 160; +} diff -Nru libseccomp-2.4.3/tests/58-live-tsync_notify.py libseccomp-2.5.1/tests/58-live-tsync_notify.py --- libseccomp-2.4.3/tests/58-live-tsync_notify.py 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/58-live-tsync_notify.py 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +# +# Seccomp Library test program +# +# Copyright (c) 2019 Cisco Systems, Inc. +# Author: Paul Moore +# + +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of version 2.1 of the GNU Lesser General Public License as +# published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, see . +# + +import argparse +import os +import signal +import sys + +import util + +from seccomp import * + +def test(): + magic = os.getuid() + 1 + f = SyscallFilter(ALLOW) + f.set_attr(Attr.CTL_TSYNC, 1) + f.add_rule(NOTIFY, "getuid") + f.load() + pid = os.fork() + if pid == 0: + val = os.getuid() + if val != magic: + raise RuntimeError("Response return value failed") + quit(1) + quit(0) + else: + notify = f.receive_notify() + if notify.syscall != resolve_syscall(Arch(), "getuid"): + raise RuntimeError("Notification failed") + f.respond_notify(NotificationResponse(notify, magic, 0, 0)) + wpid, rc = os.waitpid(pid, 0) + if os.WIFEXITED(rc) == 0: + raise RuntimeError("Child process error") + if os.WEXITSTATUS(rc) != 0: + raise RuntimeError("Child process error") + quit(160) + +test() + +# kate: syntax python; +# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off; diff -Nru libseccomp-2.4.3/tests/58-live-tsync_notify.tests libseccomp-2.5.1/tests/58-live-tsync_notify.tests --- libseccomp-2.4.3/tests/58-live-tsync_notify.tests 1970-01-01 09:30:00.000000000 +0930 +++ libseccomp-2.5.1/tests/58-live-tsync_notify.tests 2020-11-17 08:34:38.787027425 +1030 @@ -0,0 +1,11 @@ +# +# libseccomp regression test automation data +# +# Copyright (c) 2019 Cisco Systems, Inc. +# Author: Paul Moore +# + +test type: live + +# Testname API Result +58-live-tsync_notify 6 ALLOW diff -Nru libseccomp-2.4.3/tests/Makefile.am libseccomp-2.5.1/tests/Makefile.am --- libseccomp-2.4.3/tests/Makefile.am 2020-03-03 02:49:57.857374579 +1030 +++ libseccomp-2.5.1/tests/Makefile.am 2020-11-17 08:34:38.787027425 +1030 @@ -57,7 +57,7 @@ 15-basic-resolver \ 16-sim-arch_basic \ 17-sim-arch_merge \ - 18-sim-basic_whitelist \ + 18-sim-basic_allowlist \ 19-sim-missing_syscalls \ 20-live-basic_die \ 21-live-basic_allow \ @@ -73,7 +73,7 @@ 31-basic-version_check \ 32-live-tsync_allow \ 33-sim-socket_syscalls_be \ - 34-sim-basic_blacklist \ + 34-sim-basic_denylist \ 35-sim-negative_one \ 36-sim-ipc_syscalls \ 37-sim-ipc_syscalls_be \ @@ -90,7 +90,14 @@ 48-sim-32b_args \ 49-sim-64b_comparisons \ 50-sim-hash_collision \ - 52-basic-load + 51-live-user_notification \ + 52-basic-load \ + 53-sim-binary_tree \ + 54-live-binary_tree \ + 55-basic-pfc_binary_tree \ + 56-basic-iterate_syscalls \ + 57-basic-rawsysrc \ + 58-live-tsync_notify EXTRA_DIST_TESTPYTHON = \ util.py \ @@ -111,7 +118,7 @@ 15-basic-resolver.py \ 16-sim-arch_basic.py \ 17-sim-arch_merge.py \ - 18-sim-basic_whitelist.py \ + 18-sim-basic_allowlist.py \ 19-sim-missing_syscalls.py \ 20-live-basic_die.py \ 21-live-basic_allow.py \ @@ -127,7 +134,7 @@ 31-basic-version_check.py \ 32-live-tsync_allow.py \ 33-sim-socket_syscalls_be.py \ - 34-sim-basic_blacklist.py \ + 34-sim-basic_denylist.py \ 35-sim-negative_one.py \ 36-sim-ipc_syscalls.py \ 37-sim-ipc_syscalls_be.py \ @@ -143,7 +150,13 @@ 48-sim-32b_args.py \ 49-sim-64b_comparisons.py \ 50-sim-hash_collision.py \ - 52-basic-load.py + 51-live-user_notification.py \ + 52-basic-load.py \ + 53-sim-binary_tree.py \ + 54-live-binary_tree.py \ + 56-basic-iterate_syscalls.py \ + 57-basic-rawsysrc.py \ + 58-live-tsync_notify.py EXTRA_DIST_TESTCFGS = \ 01-sim-allow.tests \ @@ -163,7 +176,7 @@ 15-basic-resolver.tests \ 16-sim-arch_basic.tests \ 17-sim-arch_merge.tests \ - 18-sim-basic_whitelist.tests \ + 18-sim-basic_allowlist.tests \ 19-sim-missing_syscalls.tests \ 20-live-basic_die.tests \ 21-live-basic_allow.tests \ @@ -179,7 +192,7 @@ 31-basic-version_check.tests \ 32-live-tsync_allow.tests \ 33-sim-socket_syscalls_be.tests \ - 34-sim-basic_blacklist.tests \ + 34-sim-basic_denylist.tests \ 35-sim-negative_one.tests \ 36-sim-ipc_syscalls.tests \ 37-sim-ipc_syscalls_be.tests \ @@ -196,10 +209,18 @@ 48-sim-32b_args.tests \ 49-sim-64b_comparisons.tests \ 50-sim-hash_collision.tests \ - 52-basic-load.tests + 51-live-user_notification.tests \ + 52-basic-load.tests \ + 53-sim-binary_tree.tests \ + 54-live-binary_tree.tests \ + 55-basic-pfc_binary_tree.tests \ + 56-basic-iterate_syscalls.tests \ + 57-basic-rawsysrc.tests \ + 58-live-tsync_notify.tests EXTRA_DIST_TESTSCRIPTS = \ - 38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc + 38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc \ + 55-basic-pfc_binary_tree.sh 55-basic-pfc_binary_tree.pfc EXTRA_DIST_TESTTOOLS = regression testdiff testgen diff -Nru libseccomp-2.4.3/tests/Makefile.in libseccomp-2.5.1/tests/Makefile.in --- libseccomp-2.4.3/tests/Makefile.in 2020-03-03 04:15:53.172765667 +1030 +++ libseccomp-2.5.1/tests/Makefile.in 2020-11-17 10:17:44.951798737 +1030 @@ -116,7 +116,7 @@ 12-sim-basic_masked_ops$(EXEEXT) 13-basic-attrs$(EXEEXT) \ 14-sim-reset$(EXEEXT) 15-basic-resolver$(EXEEXT) \ 16-sim-arch_basic$(EXEEXT) 17-sim-arch_merge$(EXEEXT) \ - 18-sim-basic_whitelist$(EXEEXT) \ + 18-sim-basic_allowlist$(EXEEXT) \ 19-sim-missing_syscalls$(EXEEXT) 20-live-basic_die$(EXEEXT) \ 21-live-basic_allow$(EXEEXT) \ 22-sim-basic_chains_array$(EXEEXT) \ @@ -127,7 +127,7 @@ 29-sim-pseudo_syscall$(EXEEXT) 30-sim-socket_syscalls$(EXEEXT) \ 31-basic-version_check$(EXEEXT) 32-live-tsync_allow$(EXEEXT) \ 33-sim-socket_syscalls_be$(EXEEXT) \ - 34-sim-basic_blacklist$(EXEEXT) 35-sim-negative_one$(EXEEXT) \ + 34-sim-basic_denylist$(EXEEXT) 35-sim-negative_one$(EXEEXT) \ 36-sim-ipc_syscalls$(EXEEXT) 37-sim-ipc_syscalls_be$(EXEEXT) \ 38-basic-pfc_coverage$(EXEEXT) 39-basic-api_level$(EXEEXT) \ 40-sim-log$(EXEEXT) 41-sim-syscall_priority_arch$(EXEEXT) \ @@ -135,7 +135,12 @@ 44-live-a2_order$(EXEEXT) 45-sim-chain_code_coverage$(EXEEXT) \ 46-sim-kill_process$(EXEEXT) 47-live-kill_process$(EXEEXT) \ 48-sim-32b_args$(EXEEXT) 49-sim-64b_comparisons$(EXEEXT) \ - 50-sim-hash_collision$(EXEEXT) 52-basic-load$(EXEEXT) + 50-sim-hash_collision$(EXEEXT) \ + 51-live-user_notification$(EXEEXT) 52-basic-load$(EXEEXT) \ + 53-sim-binary_tree$(EXEEXT) 54-live-binary_tree$(EXEEXT) \ + 55-basic-pfc_binary_tree$(EXEEXT) \ + 56-basic-iterate_syscalls$(EXEEXT) 57-basic-rawsysrc$(EXEEXT) \ + 58-live-tsync_notify$(EXEEXT) EXTRA_PROGRAMS = 00-test$(EXEEXT) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -253,10 +258,10 @@ 17_sim_arch_merge_LDADD = $(LDADD) 17_sim_arch_merge_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) -18_sim_basic_whitelist_SOURCES = 18-sim-basic_whitelist.c -18_sim_basic_whitelist_OBJECTS = 18-sim-basic_whitelist.$(OBJEXT) -18_sim_basic_whitelist_LDADD = $(LDADD) -18_sim_basic_whitelist_DEPENDENCIES = util.la ../src/libseccomp.la \ +18_sim_basic_allowlist_SOURCES = 18-sim-basic_allowlist.c +18_sim_basic_allowlist_OBJECTS = 18-sim-basic_allowlist.$(OBJEXT) +18_sim_basic_allowlist_LDADD = $(LDADD) +18_sim_basic_allowlist_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) 19_sim_missing_syscalls_SOURCES = 19-sim-missing_syscalls.c 19_sim_missing_syscalls_OBJECTS = 19-sim-missing_syscalls.$(OBJEXT) @@ -336,10 +341,10 @@ 33_sim_socket_syscalls_be_LDADD = $(LDADD) 33_sim_socket_syscalls_be_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) -34_sim_basic_blacklist_SOURCES = 34-sim-basic_blacklist.c -34_sim_basic_blacklist_OBJECTS = 34-sim-basic_blacklist.$(OBJEXT) -34_sim_basic_blacklist_LDADD = $(LDADD) -34_sim_basic_blacklist_DEPENDENCIES = util.la ../src/libseccomp.la \ +34_sim_basic_denylist_SOURCES = 34-sim-basic_denylist.c +34_sim_basic_denylist_OBJECTS = 34-sim-basic_denylist.$(OBJEXT) +34_sim_basic_denylist_LDADD = $(LDADD) +34_sim_basic_denylist_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) 35_sim_negative_one_SOURCES = 35-sim-negative_one.c 35_sim_negative_one_OBJECTS = 35-sim-negative_one.$(OBJEXT) @@ -423,11 +428,48 @@ 50_sim_hash_collision_LDADD = $(LDADD) 50_sim_hash_collision_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) +51_live_user_notification_SOURCES = 51-live-user_notification.c +51_live_user_notification_OBJECTS = \ + 51-live-user_notification.$(OBJEXT) +51_live_user_notification_LDADD = $(LDADD) +51_live_user_notification_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) 52_basic_load_SOURCES = 52-basic-load.c 52_basic_load_OBJECTS = 52-basic-load.$(OBJEXT) 52_basic_load_LDADD = $(LDADD) 52_basic_load_DEPENDENCIES = util.la ../src/libseccomp.la \ $(am__DEPENDENCIES_1) +53_sim_binary_tree_SOURCES = 53-sim-binary_tree.c +53_sim_binary_tree_OBJECTS = 53-sim-binary_tree.$(OBJEXT) +53_sim_binary_tree_LDADD = $(LDADD) +53_sim_binary_tree_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) +54_live_binary_tree_SOURCES = 54-live-binary_tree.c +54_live_binary_tree_OBJECTS = 54-live-binary_tree.$(OBJEXT) +54_live_binary_tree_LDADD = $(LDADD) +54_live_binary_tree_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) +55_basic_pfc_binary_tree_SOURCES = 55-basic-pfc_binary_tree.c +55_basic_pfc_binary_tree_OBJECTS = 55-basic-pfc_binary_tree.$(OBJEXT) +55_basic_pfc_binary_tree_LDADD = $(LDADD) +55_basic_pfc_binary_tree_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) +56_basic_iterate_syscalls_SOURCES = 56-basic-iterate_syscalls.c +56_basic_iterate_syscalls_OBJECTS = \ + 56-basic-iterate_syscalls.$(OBJEXT) +56_basic_iterate_syscalls_LDADD = $(LDADD) +56_basic_iterate_syscalls_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) +57_basic_rawsysrc_SOURCES = 57-basic-rawsysrc.c +57_basic_rawsysrc_OBJECTS = 57-basic-rawsysrc.$(OBJEXT) +57_basic_rawsysrc_LDADD = $(LDADD) +57_basic_rawsysrc_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) +58_live_tsync_notify_SOURCES = 58-live-tsync_notify.c +58_live_tsync_notify_OBJECTS = 58-live-tsync_notify.$(OBJEXT) +58_live_tsync_notify_LDADD = $(LDADD) +58_live_tsync_notify_DEPENDENCIES = util.la ../src/libseccomp.la \ + $(am__DEPENDENCIES_1) miniseq_SOURCES = miniseq.c miniseq_OBJECTS = miniseq.$(OBJEXT) miniseq_DEPENDENCIES = @@ -461,7 +503,7 @@ ./$(DEPDIR)/15-basic-resolver.Po \ ./$(DEPDIR)/16-sim-arch_basic.Po \ ./$(DEPDIR)/17-sim-arch_merge.Po \ - ./$(DEPDIR)/18-sim-basic_whitelist.Po \ + ./$(DEPDIR)/18-sim-basic_allowlist.Po \ ./$(DEPDIR)/19-sim-missing_syscalls.Po \ ./$(DEPDIR)/20-live-basic_die.Po \ ./$(DEPDIR)/21-live-basic_allow.Po \ @@ -477,7 +519,7 @@ ./$(DEPDIR)/31-basic-version_check.Po \ ./$(DEPDIR)/32-live-tsync_allow.Po \ ./$(DEPDIR)/33-sim-socket_syscalls_be.Po \ - ./$(DEPDIR)/34-sim-basic_blacklist.Po \ + ./$(DEPDIR)/34-sim-basic_denylist.Po \ ./$(DEPDIR)/35-sim-negative_one.Po \ ./$(DEPDIR)/36-sim-ipc_syscalls.Po \ ./$(DEPDIR)/37-sim-ipc_syscalls_be.Po \ @@ -492,7 +534,13 @@ ./$(DEPDIR)/48-sim-32b_args.Po \ ./$(DEPDIR)/49-sim-64b_comparisons.Po \ ./$(DEPDIR)/50-sim-hash_collision.Po \ - ./$(DEPDIR)/52-basic-load.Po ./$(DEPDIR)/miniseq.Po \ + ./$(DEPDIR)/51-live-user_notification.Po \ + ./$(DEPDIR)/52-basic-load.Po ./$(DEPDIR)/53-sim-binary_tree.Po \ + ./$(DEPDIR)/54-live-binary_tree.Po \ + ./$(DEPDIR)/55-basic-pfc_binary_tree.Po \ + ./$(DEPDIR)/56-basic-iterate_syscalls.Po \ + ./$(DEPDIR)/57-basic-rawsysrc.Po \ + ./$(DEPDIR)/58-live-tsync_notify.Po ./$(DEPDIR)/miniseq.Po \ ./$(DEPDIR)/util.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -521,7 +569,7 @@ 10-sim-syscall_priority_post.c 11-basic-basic_errors.c \ 12-sim-basic_masked_ops.c 13-basic-attrs.c 14-sim-reset.c \ 15-basic-resolver.c 16-sim-arch_basic.c 17-sim-arch_merge.c \ - 18-sim-basic_whitelist.c 19-sim-missing_syscalls.c \ + 18-sim-basic_allowlist.c 19-sim-missing_syscalls.c \ 20-live-basic_die.c 21-live-basic_allow.c \ 22-sim-basic_chains_array.c 23-sim-arch_all_le_basic.c \ 24-live-arg_allow.c 25-sim-multilevel_chains_adv.c \ @@ -529,7 +577,7 @@ 28-sim-arch_x86.c 29-sim-pseudo_syscall.c \ 30-sim-socket_syscalls.c 31-basic-version_check.c \ 32-live-tsync_allow.c 33-sim-socket_syscalls_be.c \ - 34-sim-basic_blacklist.c 35-sim-negative_one.c \ + 34-sim-basic_denylist.c 35-sim-negative_one.c \ 36-sim-ipc_syscalls.c 37-sim-ipc_syscalls_be.c \ 38-basic-pfc_coverage.c 39-basic-api_level.c 40-sim-log.c \ 41-sim-syscall_priority_arch.c 42-sim-adv_chains.c \ @@ -537,7 +585,10 @@ 45-sim-chain_code_coverage.c 46-sim-kill_process.c \ 47-live-kill_process.c 48-sim-32b_args.c \ 49-sim-64b_comparisons.c 50-sim-hash_collision.c \ - 52-basic-load.c miniseq.c + 51-live-user_notification.c 52-basic-load.c \ + 53-sim-binary_tree.c 54-live-binary_tree.c \ + 55-basic-pfc_binary_tree.c 56-basic-iterate_syscalls.c \ + 57-basic-rawsysrc.c 58-live-tsync_notify.c miniseq.c DIST_SOURCES = $(util_la_SOURCES) 01-sim-allow.c 02-sim-basic.c \ 03-sim-basic_chains.c 04-sim-multilevel_chains.c \ 05-sim-long_jumps.c 06-sim-actions.c 07-sim-db_bug_looping.c \ @@ -545,7 +596,7 @@ 10-sim-syscall_priority_post.c 11-basic-basic_errors.c \ 12-sim-basic_masked_ops.c 13-basic-attrs.c 14-sim-reset.c \ 15-basic-resolver.c 16-sim-arch_basic.c 17-sim-arch_merge.c \ - 18-sim-basic_whitelist.c 19-sim-missing_syscalls.c \ + 18-sim-basic_allowlist.c 19-sim-missing_syscalls.c \ 20-live-basic_die.c 21-live-basic_allow.c \ 22-sim-basic_chains_array.c 23-sim-arch_all_le_basic.c \ 24-live-arg_allow.c 25-sim-multilevel_chains_adv.c \ @@ -553,7 +604,7 @@ 28-sim-arch_x86.c 29-sim-pseudo_syscall.c \ 30-sim-socket_syscalls.c 31-basic-version_check.c \ 32-live-tsync_allow.c 33-sim-socket_syscalls_be.c \ - 34-sim-basic_blacklist.c 35-sim-negative_one.c \ + 34-sim-basic_denylist.c 35-sim-negative_one.c \ 36-sim-ipc_syscalls.c 37-sim-ipc_syscalls_be.c \ 38-basic-pfc_coverage.c 39-basic-api_level.c 40-sim-log.c \ 41-sim-syscall_priority_arch.c 42-sim-adv_chains.c \ @@ -561,7 +612,10 @@ 45-sim-chain_code_coverage.c 46-sim-kill_process.c \ 47-live-kill_process.c 48-sim-32b_args.c \ 49-sim-64b_comparisons.c 50-sim-hash_collision.c \ - 52-basic-load.c miniseq.c + 51-live-user_notification.c 52-basic-load.c \ + 53-sim-binary_tree.c 54-live-binary_tree.c \ + 55-basic-pfc_binary_tree.c 56-basic-iterate_syscalls.c \ + 57-basic-rawsysrc.c 58-live-tsync_notify.c miniseq.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -647,6 +701,7 @@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -713,13 +768,13 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ +cython = @cython@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_coverity = @have_coverity@ -have_cython = @have_cython@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -780,7 +835,7 @@ 15-basic-resolver.py \ 16-sim-arch_basic.py \ 17-sim-arch_merge.py \ - 18-sim-basic_whitelist.py \ + 18-sim-basic_allowlist.py \ 19-sim-missing_syscalls.py \ 20-live-basic_die.py \ 21-live-basic_allow.py \ @@ -796,7 +851,7 @@ 31-basic-version_check.py \ 32-live-tsync_allow.py \ 33-sim-socket_syscalls_be.py \ - 34-sim-basic_blacklist.py \ + 34-sim-basic_denylist.py \ 35-sim-negative_one.py \ 36-sim-ipc_syscalls.py \ 37-sim-ipc_syscalls_be.py \ @@ -812,7 +867,13 @@ 48-sim-32b_args.py \ 49-sim-64b_comparisons.py \ 50-sim-hash_collision.py \ - 52-basic-load.py + 51-live-user_notification.py \ + 52-basic-load.py \ + 53-sim-binary_tree.py \ + 54-live-binary_tree.py \ + 56-basic-iterate_syscalls.py \ + 57-basic-rawsysrc.py \ + 58-live-tsync_notify.py EXTRA_DIST_TESTCFGS = \ 01-sim-allow.tests \ @@ -832,7 +893,7 @@ 15-basic-resolver.tests \ 16-sim-arch_basic.tests \ 17-sim-arch_merge.tests \ - 18-sim-basic_whitelist.tests \ + 18-sim-basic_allowlist.tests \ 19-sim-missing_syscalls.tests \ 20-live-basic_die.tests \ 21-live-basic_allow.tests \ @@ -848,7 +909,7 @@ 31-basic-version_check.tests \ 32-live-tsync_allow.tests \ 33-sim-socket_syscalls_be.tests \ - 34-sim-basic_blacklist.tests \ + 34-sim-basic_denylist.tests \ 35-sim-negative_one.tests \ 36-sim-ipc_syscalls.tests \ 37-sim-ipc_syscalls_be.tests \ @@ -865,10 +926,18 @@ 48-sim-32b_args.tests \ 49-sim-64b_comparisons.tests \ 50-sim-hash_collision.tests \ - 52-basic-load.tests + 51-live-user_notification.tests \ + 52-basic-load.tests \ + 53-sim-binary_tree.tests \ + 54-live-binary_tree.tests \ + 55-basic-pfc_binary_tree.tests \ + 56-basic-iterate_syscalls.tests \ + 57-basic-rawsysrc.tests \ + 58-live-tsync_notify.tests EXTRA_DIST_TESTSCRIPTS = \ - 38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc + 38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc \ + 55-basic-pfc_binary_tree.sh 55-basic-pfc_binary_tree.pfc EXTRA_DIST_TESTTOOLS = regression testdiff testgen EXTRA_DIST_TESTVALGRIND = valgrind_test.supp @@ -1009,9 +1078,9 @@ @rm -f 17-sim-arch_merge$(EXEEXT) $(AM_V_CCLD)$(LINK) $(17_sim_arch_merge_OBJECTS) $(17_sim_arch_merge_LDADD) $(LIBS) -18-sim-basic_whitelist$(EXEEXT): $(18_sim_basic_whitelist_OBJECTS) $(18_sim_basic_whitelist_DEPENDENCIES) $(EXTRA_18_sim_basic_whitelist_DEPENDENCIES) - @rm -f 18-sim-basic_whitelist$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(18_sim_basic_whitelist_OBJECTS) $(18_sim_basic_whitelist_LDADD) $(LIBS) +18-sim-basic_allowlist$(EXEEXT): $(18_sim_basic_allowlist_OBJECTS) $(18_sim_basic_allowlist_DEPENDENCIES) $(EXTRA_18_sim_basic_allowlist_DEPENDENCIES) + @rm -f 18-sim-basic_allowlist$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(18_sim_basic_allowlist_OBJECTS) $(18_sim_basic_allowlist_LDADD) $(LIBS) 19-sim-missing_syscalls$(EXEEXT): $(19_sim_missing_syscalls_OBJECTS) $(19_sim_missing_syscalls_DEPENDENCIES) $(EXTRA_19_sim_missing_syscalls_DEPENDENCIES) @rm -f 19-sim-missing_syscalls$(EXEEXT) @@ -1073,9 +1142,9 @@ @rm -f 33-sim-socket_syscalls_be$(EXEEXT) $(AM_V_CCLD)$(LINK) $(33_sim_socket_syscalls_be_OBJECTS) $(33_sim_socket_syscalls_be_LDADD) $(LIBS) -34-sim-basic_blacklist$(EXEEXT): $(34_sim_basic_blacklist_OBJECTS) $(34_sim_basic_blacklist_DEPENDENCIES) $(EXTRA_34_sim_basic_blacklist_DEPENDENCIES) - @rm -f 34-sim-basic_blacklist$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(34_sim_basic_blacklist_OBJECTS) $(34_sim_basic_blacklist_LDADD) $(LIBS) +34-sim-basic_denylist$(EXEEXT): $(34_sim_basic_denylist_OBJECTS) $(34_sim_basic_denylist_DEPENDENCIES) $(EXTRA_34_sim_basic_denylist_DEPENDENCIES) + @rm -f 34-sim-basic_denylist$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(34_sim_basic_denylist_OBJECTS) $(34_sim_basic_denylist_LDADD) $(LIBS) 35-sim-negative_one$(EXEEXT): $(35_sim_negative_one_OBJECTS) $(35_sim_negative_one_DEPENDENCIES) $(EXTRA_35_sim_negative_one_DEPENDENCIES) @rm -f 35-sim-negative_one$(EXEEXT) @@ -1141,10 +1210,38 @@ @rm -f 50-sim-hash_collision$(EXEEXT) $(AM_V_CCLD)$(LINK) $(50_sim_hash_collision_OBJECTS) $(50_sim_hash_collision_LDADD) $(LIBS) +51-live-user_notification$(EXEEXT): $(51_live_user_notification_OBJECTS) $(51_live_user_notification_DEPENDENCIES) $(EXTRA_51_live_user_notification_DEPENDENCIES) + @rm -f 51-live-user_notification$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(51_live_user_notification_OBJECTS) $(51_live_user_notification_LDADD) $(LIBS) + 52-basic-load$(EXEEXT): $(52_basic_load_OBJECTS) $(52_basic_load_DEPENDENCIES) $(EXTRA_52_basic_load_DEPENDENCIES) @rm -f 52-basic-load$(EXEEXT) $(AM_V_CCLD)$(LINK) $(52_basic_load_OBJECTS) $(52_basic_load_LDADD) $(LIBS) +53-sim-binary_tree$(EXEEXT): $(53_sim_binary_tree_OBJECTS) $(53_sim_binary_tree_DEPENDENCIES) $(EXTRA_53_sim_binary_tree_DEPENDENCIES) + @rm -f 53-sim-binary_tree$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(53_sim_binary_tree_OBJECTS) $(53_sim_binary_tree_LDADD) $(LIBS) + +54-live-binary_tree$(EXEEXT): $(54_live_binary_tree_OBJECTS) $(54_live_binary_tree_DEPENDENCIES) $(EXTRA_54_live_binary_tree_DEPENDENCIES) + @rm -f 54-live-binary_tree$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(54_live_binary_tree_OBJECTS) $(54_live_binary_tree_LDADD) $(LIBS) + +55-basic-pfc_binary_tree$(EXEEXT): $(55_basic_pfc_binary_tree_OBJECTS) $(55_basic_pfc_binary_tree_DEPENDENCIES) $(EXTRA_55_basic_pfc_binary_tree_DEPENDENCIES) + @rm -f 55-basic-pfc_binary_tree$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(55_basic_pfc_binary_tree_OBJECTS) $(55_basic_pfc_binary_tree_LDADD) $(LIBS) + +56-basic-iterate_syscalls$(EXEEXT): $(56_basic_iterate_syscalls_OBJECTS) $(56_basic_iterate_syscalls_DEPENDENCIES) $(EXTRA_56_basic_iterate_syscalls_DEPENDENCIES) + @rm -f 56-basic-iterate_syscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(56_basic_iterate_syscalls_OBJECTS) $(56_basic_iterate_syscalls_LDADD) $(LIBS) + +57-basic-rawsysrc$(EXEEXT): $(57_basic_rawsysrc_OBJECTS) $(57_basic_rawsysrc_DEPENDENCIES) $(EXTRA_57_basic_rawsysrc_DEPENDENCIES) + @rm -f 57-basic-rawsysrc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(57_basic_rawsysrc_OBJECTS) $(57_basic_rawsysrc_LDADD) $(LIBS) + +58-live-tsync_notify$(EXEEXT): $(58_live_tsync_notify_OBJECTS) $(58_live_tsync_notify_DEPENDENCIES) $(EXTRA_58_live_tsync_notify_DEPENDENCIES) + @rm -f 58-live-tsync_notify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(58_live_tsync_notify_OBJECTS) $(58_live_tsync_notify_LDADD) $(LIBS) + miniseq$(EXEEXT): $(miniseq_OBJECTS) $(miniseq_DEPENDENCIES) $(EXTRA_miniseq_DEPENDENCIES) @rm -f miniseq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(miniseq_OBJECTS) $(miniseq_LDADD) $(LIBS) @@ -1173,7 +1270,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/15-basic-resolver.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/16-sim-arch_basic.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/17-sim-arch_merge.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/18-sim-basic_whitelist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/18-sim-basic_allowlist.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/19-sim-missing_syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/20-live-basic_die.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/21-live-basic_allow.Po@am__quote@ # am--include-marker @@ -1189,7 +1286,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/31-basic-version_check.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/32-live-tsync_allow.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/33-sim-socket_syscalls_be.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/34-sim-basic_blacklist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/34-sim-basic_denylist.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/35-sim-negative_one.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/36-sim-ipc_syscalls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/37-sim-ipc_syscalls_be.Po@am__quote@ # am--include-marker @@ -1206,7 +1303,14 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/48-sim-32b_args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/49-sim-64b_comparisons.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/50-sim-hash_collision.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/51-live-user_notification.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/52-basic-load.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/53-sim-binary_tree.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/54-live-binary_tree.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/55-basic-pfc_binary_tree.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/56-basic-iterate_syscalls.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/57-basic-rawsysrc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/58-live-tsync_notify.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miniseq.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ # am--include-marker @@ -1484,7 +1588,7 @@ -rm -f ./$(DEPDIR)/15-basic-resolver.Po -rm -f ./$(DEPDIR)/16-sim-arch_basic.Po -rm -f ./$(DEPDIR)/17-sim-arch_merge.Po - -rm -f ./$(DEPDIR)/18-sim-basic_whitelist.Po + -rm -f ./$(DEPDIR)/18-sim-basic_allowlist.Po -rm -f ./$(DEPDIR)/19-sim-missing_syscalls.Po -rm -f ./$(DEPDIR)/20-live-basic_die.Po -rm -f ./$(DEPDIR)/21-live-basic_allow.Po @@ -1500,7 +1604,7 @@ -rm -f ./$(DEPDIR)/31-basic-version_check.Po -rm -f ./$(DEPDIR)/32-live-tsync_allow.Po -rm -f ./$(DEPDIR)/33-sim-socket_syscalls_be.Po - -rm -f ./$(DEPDIR)/34-sim-basic_blacklist.Po + -rm -f ./$(DEPDIR)/34-sim-basic_denylist.Po -rm -f ./$(DEPDIR)/35-sim-negative_one.Po -rm -f ./$(DEPDIR)/36-sim-ipc_syscalls.Po -rm -f ./$(DEPDIR)/37-sim-ipc_syscalls_be.Po @@ -1517,7 +1621,14 @@ -rm -f ./$(DEPDIR)/48-sim-32b_args.Po -rm -f ./$(DEPDIR)/49-sim-64b_comparisons.Po -rm -f ./$(DEPDIR)/50-sim-hash_collision.Po + -rm -f ./$(DEPDIR)/51-live-user_notification.Po -rm -f ./$(DEPDIR)/52-basic-load.Po + -rm -f ./$(DEPDIR)/53-sim-binary_tree.Po + -rm -f ./$(DEPDIR)/54-live-binary_tree.Po + -rm -f ./$(DEPDIR)/55-basic-pfc_binary_tree.Po + -rm -f ./$(DEPDIR)/56-basic-iterate_syscalls.Po + -rm -f ./$(DEPDIR)/57-basic-rawsysrc.Po + -rm -f ./$(DEPDIR)/58-live-tsync_notify.Po -rm -f ./$(DEPDIR)/miniseq.Po -rm -f ./$(DEPDIR)/util.Plo -rm -f Makefile @@ -1583,7 +1694,7 @@ -rm -f ./$(DEPDIR)/15-basic-resolver.Po -rm -f ./$(DEPDIR)/16-sim-arch_basic.Po -rm -f ./$(DEPDIR)/17-sim-arch_merge.Po - -rm -f ./$(DEPDIR)/18-sim-basic_whitelist.Po + -rm -f ./$(DEPDIR)/18-sim-basic_allowlist.Po -rm -f ./$(DEPDIR)/19-sim-missing_syscalls.Po -rm -f ./$(DEPDIR)/20-live-basic_die.Po -rm -f ./$(DEPDIR)/21-live-basic_allow.Po @@ -1599,7 +1710,7 @@ -rm -f ./$(DEPDIR)/31-basic-version_check.Po -rm -f ./$(DEPDIR)/32-live-tsync_allow.Po -rm -f ./$(DEPDIR)/33-sim-socket_syscalls_be.Po - -rm -f ./$(DEPDIR)/34-sim-basic_blacklist.Po + -rm -f ./$(DEPDIR)/34-sim-basic_denylist.Po -rm -f ./$(DEPDIR)/35-sim-negative_one.Po -rm -f ./$(DEPDIR)/36-sim-ipc_syscalls.Po -rm -f ./$(DEPDIR)/37-sim-ipc_syscalls_be.Po @@ -1616,7 +1727,14 @@ -rm -f ./$(DEPDIR)/48-sim-32b_args.Po -rm -f ./$(DEPDIR)/49-sim-64b_comparisons.Po -rm -f ./$(DEPDIR)/50-sim-hash_collision.Po + -rm -f ./$(DEPDIR)/51-live-user_notification.Po -rm -f ./$(DEPDIR)/52-basic-load.Po + -rm -f ./$(DEPDIR)/53-sim-binary_tree.Po + -rm -f ./$(DEPDIR)/54-live-binary_tree.Po + -rm -f ./$(DEPDIR)/55-basic-pfc_binary_tree.Po + -rm -f ./$(DEPDIR)/56-basic-iterate_syscalls.Po + -rm -f ./$(DEPDIR)/57-basic-rawsysrc.Po + -rm -f ./$(DEPDIR)/58-live-tsync_notify.Po -rm -f ./$(DEPDIR)/miniseq.Po -rm -f ./$(DEPDIR)/util.Plo -rm -f Makefile diff -Nru libseccomp-2.4.3/tests/regression libseccomp-2.5.1/tests/regression --- libseccomp-2.4.3/tests/regression 2020-03-03 02:49:57.858374575 +1030 +++ libseccomp-2.5.1/tests/regression 2020-11-17 08:34:38.787027425 +1030 @@ -25,7 +25,8 @@ x86 x86_64 x32 \ arm aarch64 \ mipsel mipsel64 mipsel64n32 \ - ppc64le" + ppc64le \ + riscv64" GLBL_ARCH_BE_SUPPORT=" \ mips mips64 mips64n32 \ parisc parisc64 \ @@ -46,6 +47,7 @@ mips64 \ parisc64 \ ppc64 \ + riscv64 \ s390x" GLBL_SYS_ARCH="../tools/scmp_arch_detect" @@ -270,7 +272,8 @@ else rcount=$[ ($RANDOM % 8) + 1 ] fi - rdata=$(echo $(