From 10c312d33ff4faa564cb6765e23b91d7c8192fd8 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Feb 24 2021 16:10:01 +0000 Subject: libseccomp-2.5.1 base --- diff --git a/CHANGELOG b/CHANGELOG index e116b66..73e769e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,35 @@ libseccomp: Releases =============================================================================== 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 --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3507fa..76e2bb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ to the rules described here, but by following the instructions below you 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 @@ command: ... 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 @@ base, and can be enabled via the "--enable-code-coverage" configure flag and 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 @@ your real name, saying: 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 @@ a problem with your email client. When in doubt try a test first by sending 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 --git a/CREDITS b/CREDITS index abae36b..0765b1b 100644 --- a/CREDITS +++ b/CREDITS @@ -2,11 +2,14 @@ libseccomp: Contributors ======================================================================== 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 @@ Eric Paris Fabrice Fontaine Felix Abecassis Felix Geyer +Giuseppe Scrivano Heiko Carstens Helge Deller Jake Edge @@ -25,25 +29,32 @@ Jan Willeke 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 --git a/Makefile.in b/Makefile.in index 4b8a8bd..be0e6d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -296,6 +296,7 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -362,13 +363,13 @@ build_cpu = @build_cpu@ 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 --git a/README.md b/README.md index e8223fb..752259d 100644 --- a/README.md +++ b/README.md @@ -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 @@ The libseccomp library currently supports the architectures listed below: * 64-bit PowerPC little endian (ppc64le) * 32-bit s390 (s390) * 64-bit s390x (s390x) +* 64-bit RISC-V (riscv64) ## Documentation @@ -72,8 +74,8 @@ verify detached signatures using the following command: # 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 @@ releases: 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 --git a/configure b/configure index 71ccf03..cd5c097 100755 --- a/configure +++ b/configure @@ -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 @@ MAKEFLAGS= # 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 @@ CODE_COVERAGE_ENABLED_TRUE COVERITY_FALSE COVERITY_TRUE have_coverity +GPERF ENABLE_PYTHON_FALSE ENABLE_PYTHON_TRUE pkgpyexecdir @@ -659,7 +660,7 @@ PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON -have_cython +cython VERSION_MICRO VERSION_MINOR VERSION_MAJOR @@ -1347,7 +1348,7 @@ if test "$ac_init_help" = "long"; then # 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 @@ fi 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 @@ fi 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 @@ cat >config.log <<_ACEOF 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 @@ fi # Define the identity of the package. PACKAGE='libseccomp' - VERSION='2.4.3' + VERSION='2.5.1' cat >>confdefs.h <<_ACEOF @@ -12181,8 +12182,8 @@ fi 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 @@ VERSION_MICRO=$(echo ${VERSION} | cut -d'.' -f 3) -# 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 @@ do 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 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 @@ fi - # 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 @@ $as_echo "no" >&6; } 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 @@ cat >>confdefs.h <<_ACEOF _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 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 @@ _ACEOF 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 --git a/configure.ac b/configure.ac index 3fc85dd..78be431 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ dnl # 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 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 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 @@ AC_SUBST([VERSION_MICRO]) 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 "$enable_python" = yes], [ 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 --git a/doc/Makefile.am b/doc/Makefile.am index a37a32b..1e6eecc 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -38,6 +38,12 @@ dist_man3_MANS = \ 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 --git a/doc/Makefile.in b/doc/Makefile.in index b633803..b02ef36 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -209,6 +209,7 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -275,13 +276,13 @@ build_cpu = @build_cpu@ 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 @@ dist_man3_MANS = \ 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 --git a/doc/man/man3/seccomp_api_get.3 b/doc/man/man3/seccomp_api_get.3 index 0def686..be8286b 100644 --- a/doc/man/man3/seccomp_api_get.3 +++ b/doc/man/man3/seccomp_api_get.3 @@ -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 @@ the 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 --git a/doc/man/man3/seccomp_arch_add.3 b/doc/man/man3/seccomp_arch_add.3 index f8f5a08..7baa21e 100644 --- a/doc/man/man3/seccomp_arch_add.3 +++ b/doc/man/man3/seccomp_arch_add.3 @@ -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 @@ seccomp_arch_add, seccomp_arch_remove, seccomp_arch_exist, seccomp_arch_native \ .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 @@ new architecture will be added to all of the architectures in the filter. .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 --git a/doc/man/man3/seccomp_attr_set.3 b/doc/man/man3/seccomp_attr_set.3 index 7050d5f..eb82557 100644 --- a/doc/man/man3/seccomp_attr_set.3 +++ b/doc/man/man3/seccomp_attr_set.3 @@ -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 @@ the 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 --git a/doc/man/man3/seccomp_export_bpf.3 b/doc/man/man3/seccomp_export_bpf.3 index 613a110..9ce06df 100644 --- a/doc/man/man3/seccomp_export_bpf.3 +++ b/doc/man/man3/seccomp_export_bpf.3 @@ -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 @@ The .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 @@ ordering, are not guaranteed to be the same in both the BPF and PFC formats. .\" ////////////////////////////////////////////////////////////////////////// .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 --git a/doc/man/man3/seccomp_init.3 b/doc/man/man3/seccomp_init.3 index ad1371f..7881c35 100644 --- a/doc/man/man3/seccomp_init.3 +++ b/doc/man/man3/seccomp_init.3 @@ -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 @@ The 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 @@ The .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 --git a/doc/man/man3/seccomp_load.3 b/doc/man/man3/seccomp_load.3 index e86bac4..8e2e6f0 100644 --- a/doc/man/man3/seccomp_load.3 +++ b/doc/man/man3/seccomp_load.3 @@ -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 @@ Loads the seccomp filter provided by .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 --git a/doc/man/man3/seccomp_merge.3 b/doc/man/man3/seccomp_merge.3 index d580ab5..10b3c3f 100644 --- a/doc/man/man3/seccomp_merge.3 +++ b/doc/man/man3/seccomp_merge.3 @@ -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 @@ attribute values and no overlapping architectures. .\" ////////////////////////////////////////////////////////////////////////// .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 --git a/doc/man/man3/seccomp_notify_alloc.3 b/doc/man/man3/seccomp_notify_alloc.3 new file mode 100644 index 0000000..cb1c048 --- /dev/null +++ b/doc/man/man3/seccomp_notify_alloc.3 @@ -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 --git a/doc/man/man3/seccomp_notify_fd.3 b/doc/man/man3/seccomp_notify_fd.3 new file mode 100644 index 0000000..0c168c8 --- /dev/null +++ b/doc/man/man3/seccomp_notify_fd.3 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff --git a/doc/man/man3/seccomp_notify_free.3 b/doc/man/man3/seccomp_notify_free.3 new file mode 100644 index 0000000..0c168c8 --- /dev/null +++ b/doc/man/man3/seccomp_notify_free.3 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff --git a/doc/man/man3/seccomp_notify_id_valid.3 b/doc/man/man3/seccomp_notify_id_valid.3 new file mode 100644 index 0000000..0c168c8 --- /dev/null +++ b/doc/man/man3/seccomp_notify_id_valid.3 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff --git a/doc/man/man3/seccomp_notify_receive.3 b/doc/man/man3/seccomp_notify_receive.3 new file mode 100644 index 0000000..0c168c8 --- /dev/null +++ b/doc/man/man3/seccomp_notify_receive.3 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff --git a/doc/man/man3/seccomp_notify_respond.3 b/doc/man/man3/seccomp_notify_respond.3 new file mode 100644 index 0000000..0c168c8 --- /dev/null +++ b/doc/man/man3/seccomp_notify_respond.3 @@ -0,0 +1 @@ +.so man3/seccomp_notify_alloc.3 diff --git a/doc/man/man3/seccomp_rule_add.3 b/doc/man/man3/seccomp_rule_add.3 index e86f41b..4d8ef3f 100644 --- a/doc/man/man3/seccomp_rule_add.3 +++ b/doc/man/man3/seccomp_rule_add.3 @@ -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 @@ do guarantee the same behavior regardless of the architecture. 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 @@ macros and use the variants which are explicitly 32 or 64-bit. This should 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 @@ value directly using the standard 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 @@ matches the filter rule but the syscall will be logged. .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 @@ SCMP_CMP( .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 --git a/doc/man/man3/seccomp_syscall_priority.3 b/doc/man/man3/seccomp_syscall_priority.3 index 5a11037..5621b85 100644 --- a/doc/man/man3/seccomp_syscall_priority.3 +++ b/doc/man/man3/seccomp_syscall_priority.3 @@ -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 @@ is the value returned by the call to .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 --git a/include/Makefile.in b/include/Makefile.in index f37e94d..cd17712 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -225,6 +225,7 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -291,13 +292,13 @@ build_cpu = @build_cpu@ 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 --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h index 3c958df..2a4ebd3 100644 --- a/include/seccomp-syscalls.h +++ b/include/seccomp-syscalls.h @@ -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 --git a/include/seccomp.h b/include/seccomp.h index d5dc283..5677430 100644 --- a/include/seccomp.h +++ b/include/seccomp.h @@ -27,6 +27,8 @@ #include #include #include +#include +#include #ifdef __cplusplus extern "C" { @@ -37,8 +39,8 @@ extern "C" { */ #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 @@ enum scmp_filter_attr { 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 @@ struct scmp_arg_cmp { #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 @@ struct scmp_arg_cmp { */ #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 @@ struct scmp_arg_cmp { */ #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 @@ const struct scmp_version *seccomp_version(void); * 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 @@ int seccomp_rule_add_exact_array(scmp_filter_ctx ctx, 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 --git a/include/seccomp.h.in b/include/seccomp.h.in index 07a504a..ef4c6e4 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -27,6 +27,8 @@ #include #include #include +#include +#include #ifdef __cplusplus extern "C" { @@ -66,6 +68,15 @@ enum scmp_filter_attr { 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 @@ struct scmp_arg_cmp { #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 @@ struct scmp_arg_cmp { */ #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 @@ struct scmp_arg_cmp { */ #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 @@ const struct scmp_version *seccomp_version(void); * 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 @@ int seccomp_rule_add_exact_array(scmp_filter_ctx ctx, 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 --git a/src/Makefile.am b/src/Makefile.am index 2e7e38d..10154e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,21 +31,26 @@ SOURCES_ALL = \ 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 @@ 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} +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 --git a/src/Makefile.in b/src/Makefile.in index 60107c3..f57c743 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -157,26 +157,15 @@ am__objects_1 = libseccomp_la-api.lo libseccomp_la-system.lo \ 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 @@ am__objects_2 = arch_syscall_check-api.$(OBJEXT) \ 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 @@ arch_syscall_check_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ 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 @@ am__v_at_1 = 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 @@ am__depfiles_remade = ./$(DEPDIR)/api.Po \ ./$(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 @@ am__depfiles_remade = ./$(DEPDIR)/api.Po \ ./$(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 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -571,13 +518,13 @@ build_cpu = @build_cpu@ 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 @@ SOURCES_ALL = \ 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 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 @@ distclean-compile: -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 @@ distclean-compile: @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 @@ distclean-compile: @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 @@ distclean-compile: @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 @@ libseccomp_la-arch-x86.lo: arch-x86.c @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 @@ libseccomp_la-arch-x86_64.lo: arch-x86_64.c @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 @@ libseccomp_la-arch-x32.lo: arch-x32.c @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 @@ libseccomp_la-arch-arm.lo: arch-arm.c @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 @@ libseccomp_la-arch-aarch64.lo: arch-aarch64.c @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 @@ libseccomp_la-arch-mips.lo: arch-mips.c @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 @@ libseccomp_la-arch-mips64.lo: arch-mips64.c @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 @@ libseccomp_la-arch-mips64n32.lo: arch-mips64n32.c @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 @@ libseccomp_la-arch-parisc64.lo: arch-parisc64.c @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 @@ libseccomp_la-arch-ppc.lo: arch-ppc.c @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 @@ libseccomp_la-arch-ppc64.lo: arch-ppc64.c @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 @@ libseccomp_la-arch-s390.lo: arch-s390.c @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 @@ libseccomp_la-arch-s390x.lo: arch-s390x.c @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 @@ arch_syscall_check-arch-x86.obj: arch-x86.c @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 @@ arch_syscall_check-arch-x86_64.obj: arch-x86_64.c @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 @@ arch_syscall_check-arch-x32.obj: arch-x32.c @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 @@ arch_syscall_check-arch-arm.obj: arch-arm.c @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 @@ arch_syscall_check-arch-aarch64.obj: arch-aarch64.c @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 @@ arch_syscall_check-arch-mips.obj: arch-mips.c @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 @@ arch_syscall_check-arch-mips64.obj: arch-mips64.c @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 @@ arch_syscall_check-arch-mips64n32.obj: arch-mips64n32.c @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 @@ arch_syscall_check-arch-parisc64.obj: arch-parisc64.c @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 @@ arch_syscall_check-arch-ppc.obj: arch-ppc.c @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 @@ arch_syscall_check-arch-ppc64.obj: arch-ppc64.c @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@ +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-ppc64-syscalls.o `test -f 'arch-ppc64-syscalls.c' || echo '$(srcdir)/'`arch-ppc64-syscalls.c +@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-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.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 @@ arch_syscall_check-arch-s390.obj: arch-s390.c @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 @@ arch_syscall_check-arch-s390x.obj: arch-s390x.c @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@ +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.o `test -f 'arch-s390x-syscalls.c' || echo '$(srcdir)/'`arch-s390x-syscalls.c +@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-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.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-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.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 @@ install-strip: 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 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ 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 @@ distclean: distclean-recursive -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 @@ distclean: distclean-recursive -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 @@ distclean: distclean-recursive -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 @@ installcheck-am: 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 @@ maintainer-clean: maintainer-clean-recursive -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 @@ maintainer-clean: maintainer-clean-recursive -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 @@ maintainer-clean: maintainer-clean-recursive -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 @@ uninstall-am: uninstall-libLTLIBRARIES @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 --git a/src/api.c b/src/api.c index 94039a7..5cec088 100644 --- a/src/api.c +++ b/src/api.c @@ -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 @@ const struct scmp_version library_version = { 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 @@ static unsigned int _seccomp_api_update(void) /* 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 @@ API int seccomp_api_set(unsigned int level) 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 @@ API int seccomp_api_set(unsigned int level) 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 @@ API int seccomp_api_set(unsigned int level) 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 @@ API int seccomp_reset(scmp_filter_ctx ctx, uint32_t def_action) { 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 @@ API void seccomp_release(scmp_filter_ctx ctx) } /* 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 @@ API uint32_t seccomp_arch_native(void) } /* 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 @@ API int seccomp_arch_exist(const scmp_filter_ctx ctx, 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 @@ API int seccomp_arch_add(scmp_filter_ctx ctx, uint32_t arch_token) 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 @@ API int seccomp_arch_remove(scmp_filter_ctx ctx, uint32_t arch_token) 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 @@ API int seccomp_attr_get(const scmp_filter_ctx ctx, 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 @@ API int seccomp_attr_set(scmp_filter_ctx ctx, 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 @@ API int seccomp_syscall_priority(scmp_filter_ctx ctx, 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 @@ API int seccomp_rule_add_array(scmp_filter_ctx ctx, 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 @@ API int seccomp_rule_add(scmp_filter_ctx ctx, /* 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 @@ API int seccomp_rule_add(scmp_filter_ctx ctx, 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 @@ API int seccomp_rule_add_exact_array(scmp_filter_ctx ctx, 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 @@ API int seccomp_rule_add_exact(scmp_filter_ctx ctx, /* 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 @@ API int seccomp_rule_add_exact(scmp_filter_ctx 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 */ +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 --git a/src/arch-aarch64.h b/src/arch-aarch64.h index cde11cf..ed1877a 100644 --- a/src/arch-aarch64.h +++ b/src/arch-aarch64.h @@ -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 --git a/src/arch-arm.c b/src/arch-arm.c index c797f3f..9c9153a 100644 --- a/src/arch-arm.c +++ b/src/arch-arm.c @@ -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 --git a/src/arch-arm.h b/src/arch-arm.h index 9f675d8..34e6c91 100644 --- a/src/arch-arm.h +++ b/src/arch-arm.h @@ -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 --git a/src/arch-gperf-generate b/src/arch-gperf-generate new file mode 100755 index 0000000..9e6c000 --- /dev/null +++ b/src/arch-gperf-generate @@ -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 --git a/src/arch-mips.c b/src/arch-mips.c index 1d1f4e2..06741c7 100644 --- a/src/arch-mips.c +++ b/src/arch-mips.c @@ -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 @@ const struct arch_def arch_def_mipsel = { .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 --git a/src/arch-mips.h b/src/arch-mips.h index 51f86ce..c8752a8 100644 --- a/src/arch-mips.h +++ b/src/arch-mips.h @@ -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 --git a/src/arch-mips64.c b/src/arch-mips64.c index f98982c..342d0d8 100644 --- a/src/arch-mips64.c +++ b/src/arch-mips64.c @@ -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 @@ const struct arch_def arch_def_mipsel64 = { .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 --git a/src/arch-mips64.h b/src/arch-mips64.h index 7f231ce..c8eaba8 100644 --- a/src/arch-mips64.h +++ b/src/arch-mips64.h @@ -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 --git a/src/arch-mips64n32.c b/src/arch-mips64n32.c index 90ead98..098864b 100644 --- a/src/arch-mips64n32.c +++ b/src/arch-mips64n32.c @@ -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 @@ const struct arch_def arch_def_mipsel64n32 = { .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 --git a/src/arch-mips64n32.h b/src/arch-mips64n32.h index fd7e542..7f9146a 100644 --- a/src/arch-mips64n32.h +++ b/src/arch-mips64n32.h @@ -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 --git a/src/arch-parisc.h b/src/arch-parisc.h index d51a227..0a2df6a 100644 --- a/src/arch-parisc.h +++ b/src/arch-parisc.h @@ -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 --git a/src/arch-parisc64.c b/src/arch-parisc64.c index 2b63120..08e5081 100644 --- a/src/arch-parisc64.c +++ b/src/arch-parisc64.c @@ -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 --git a/src/arch-parisc64.h b/src/arch-parisc64.h new file mode 100644 index 0000000..7ec889b --- /dev/null +++ b/src/arch-parisc64.h @@ -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 --git a/src/arch-ppc.h b/src/arch-ppc.h index 0b5ffa5..f46aa1d 100644 --- a/src/arch-ppc.h +++ b/src/arch-ppc.h @@ -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 --git a/src/arch-ppc64.c b/src/arch-ppc64.c index c3f15e3..8cccbb8 100644 --- a/src/arch-ppc64.c +++ b/src/arch-ppc64.c @@ -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 @@ const struct arch_def arch_def_ppc64le = { .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 --git a/src/arch-ppc64.h b/src/arch-ppc64.h index beb24f7..a0f7eb1 100644 --- a/src/arch-ppc64.h +++ b/src/arch-ppc64.h @@ -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 --git a/src/arch-riscv64.c b/src/arch-riscv64.c new file mode 100644 index 0000000..67bc926 --- /dev/null +++ b/src/arch-riscv64.c @@ -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 --git a/src/arch-riscv64.h b/src/arch-riscv64.h new file mode 100644 index 0000000..96939f2 --- /dev/null +++ b/src/arch-riscv64.h @@ -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 --git a/src/arch-s390.c b/src/arch-s390.c index 6c13368..c2990c0 100644 --- a/src/arch-s390.c +++ b/src/arch-s390.c @@ -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 @@ static int _s390_syscall_demux(int syscall) /* semctl */ return 394; case -204: - /* semtimedop - not defined */ - return __NR_SCMP_UNDEF; + /* semtimedop */ + return 392; case -211: /* msgsnd */ return 400; @@ -231,6 +376,9 @@ static int _s390_syscall_mux(int syscall) case 396: /* shmctl */ return -224; + case 392: + /* semtimedop */ + return -204; } return __NR_SCMP_ERROR; @@ -448,3 +596,14 @@ add_return: 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 --git a/src/arch-s390.h b/src/arch-s390.h index 61abaf9..3881ef3 100644 --- a/src/arch-s390.h +++ b/src/arch-s390.h @@ -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 --git a/src/arch-s390x.c b/src/arch-s390x.c index 8815e6a..45d67ec 100644 --- a/src/arch-s390x.c +++ b/src/arch-s390x.c @@ -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 @@ add_return: 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 --git a/src/arch-s390x.h b/src/arch-s390x.h index 9fb087b..9592ec9 100644 --- a/src/arch-s390x.h +++ b/src/arch-s390x.h @@ -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 --git a/src/arch-syscall-dump.c b/src/arch-syscall-dump.c index 9601bc0..2055d34 100644 --- a/src/arch-syscall-dump.c +++ b/src/arch-syscall-dump.c @@ -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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 --git a/src/arch-syscall-validate b/src/arch-syscall-validate index b9e0bce..3b69e9b 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -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 verify_deps() { # 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 @@ function dump_lib_arch() { [[ -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_lib_arch() { # 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 @@ function dump_sys_x86() { # 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_lib_x86() { # 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 @@ function dump_sys_x86_64() { # 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_lib_x86_64() { # 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 @@ function dump_sys_x32() { # 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_lib_x32() { # 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_sys_arm() { # 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 @@ function dump_lib_arm() { # 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 @@ function dump_sys_aarch64() { # 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 @@ function dump_lib_aarch64() { # 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 @@ function dump_sys_mips() { # 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 @@ function dump_lib_mips() { # 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 @@ function dump_sys_mips64() { # 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 @@ function dump_lib_mips64() { # 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 @@ function dump_sys_mips64n32() { # 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_lib_mips64n32() { 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 @@ function dump_sys_ppc() { # 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_lib_ppc() { 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 @@ function dump_sys_ppc64() { # 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_lib_ppc64() { 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 @@ function dump_sys_s390() { # 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_lib_s390() { 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 @@ function dump_sys_s390x() { # 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 @@ function dump_sys() { 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 @@ function dump_lib() { 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 @@ function dump_lib() { 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 @@ if [[ ! -x $LIB_SYS_DUMP ]]; then 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 @@ if [[ $opt_arches == "" ]]; then x86 x86_64 x32 \ arm aarch64 \ mips mips64 mips64n32 \ + parisc parisc64 \ ppc ppc64 \ s390 s390x" fi @@ -620,30 +827,39 @@ fi 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 --git a/src/arch-x32.c b/src/arch-x32.c index d45ac06..50c502e 100644 --- a/src/arch-x32.c +++ b/src/arch-x32.c @@ -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 --git a/src/arch-x32.h b/src/arch-x32.h index d166c3c..639fd20 100644 --- a/src/arch-x32.h +++ b/src/arch-x32.h @@ -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 --git a/src/arch-x86.c b/src/arch-x86.c index fc0deaa..2a4c074 100644 --- a/src/arch-x86.c +++ b/src/arch-x86.c @@ -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 @@ add_return: 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 --git a/src/arch-x86.h b/src/arch-x86.h index 4aa5e9b..a2e0b12 100644 --- a/src/arch-x86.h +++ b/src/arch-x86.h @@ -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 --git a/src/arch-x86_64.h b/src/arch-x86_64.h index c770d75..fcba125 100644 --- a/src/arch-x86_64.h +++ b/src/arch-x86_64.h @@ -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 --git a/src/arch.c b/src/arch.c index bfa664f..5485eb8 100644 --- a/src/arch.c +++ b/src/arch.c @@ -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_ppc; 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 @@ const struct arch_def *arch_def_lookup(uint32_t token) 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 @@ const struct arch_def *arch_def_lookup_name(const char *arch_name) 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 @@ int arch_syscall_rewrite(const struct arch_def *arch, int *syscall) 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 --git a/src/arch.h b/src/arch.h index e299b39..38c3a9c 100644 --- a/src/arch.h +++ b/src/arch.h @@ -59,6 +59,13 @@ struct arch_def { /* 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 --git a/src/db.c b/src/db.c index afb1c9f..836171a 100644 --- a/src/db.c +++ b/src/db.c @@ -841,6 +841,7 @@ static void _db_reset(struct db_filter *db) } db->syscalls = NULL; } + db->syscall_cnt = 0; /* free any rules */ if (db->rules != NULL) { @@ -909,6 +910,9 @@ static void _db_snap_release(struct db_filter_snap *snap) { 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 @@ int db_col_reset(struct db_filter_col *col, uint32_t def_action) 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 @@ 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 +1147,13 @@ void db_col_release(struct db_filter_col *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]); @@ -1148,30 +1167,42 @@ void db_col_release(struct db_filter_col *col) } /** - * 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 @@ int db_col_attr_get(const struct db_filter_col *col, 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 @@ int db_col_attr_get(const struct db_filter_col *col, } /** + * 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 @@ int db_col_attr_set(struct db_filter_col *col, 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 @@ int db_col_attr_set(struct db_filter_col *col, 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 @@ int db_col_attr_set(struct db_filter_col *col, 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 @@ add_reset: 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 @@ 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 +2302,7 @@ int db_col_rule_add(struct db_filter_col *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 +2350,6 @@ int db_col_rule_add(struct db_filter_col *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 +2360,10 @@ int db_col_rule_add(struct db_filter_col *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; @@ -2265,6 +2376,9 @@ add_arch_fail: 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 @@ int db_col_transaction_start(struct db_filter_col *col) 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 @@ int db_col_transaction_start(struct db_filter_col *col) 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 @@ void db_col_transaction_abort(struct db_filter_col *col) * 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 --git a/src/db.h b/src/db.h index 8a64623..765c607 100644 --- a/src/db.h +++ b/src/db.h @@ -116,6 +116,12 @@ struct db_filter_attr { 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 @@ struct db_filter { /* 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 @@ struct db_filter_snap { /* individual filters */ struct db_filter **filters; unsigned int filter_cnt; + bool shadow; struct db_filter_snap *next; }; @@ -151,6 +159,9 @@ struct db_filter_col { /* transaction snapshots */ struct db_filter_snap *snapshots; + + /* userspace notification */ + bool notify_used; }; /** @@ -165,8 +176,6 @@ struct db_filter_col { #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 @@ void db_col_release(struct db_filter_col *col); 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 --git a/src/gen_bpf.c b/src/gen_bpf.c index 1b559b0..f7b6eca 100644 --- a/src/gen_bpf.c +++ b/src/gen_bpf.c @@ -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 @@ struct bpf_state { /* 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 @@ chain_failure: } /** + * 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 @@ static struct bpf_blk *_gen_bpf_syscall(struct bpf_state *state, } /** - * 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) +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) { - int rc; - unsigned int blk_cnt = 0; + 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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, 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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, 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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, _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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, _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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, _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 @@ static struct bpf_blk *_gen_bpf_arch(struct bpf_state *state, _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 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, 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 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, 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 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, break; default: /* fatal error */ + rc = -EFAULT; goto build_bpf_free_blks; } switch (i_iter->jf.type) { @@ -1867,6 +2208,7 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, break; default: /* fatal error */ + rc = -EFAULT; goto build_bpf_free_blks; } } @@ -1888,8 +2230,10 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, 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 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, 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 @@ static int _gen_bpf_build_bpf(struct bpf_state *state, 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 @@ build_bpf_free_blks: __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 --git a/src/gen_bpf.h b/src/gen_bpf.h index 14484e7..8f886ae 100644 --- a/src/gen_bpf.h +++ b/src/gen_bpf.h @@ -36,7 +36,8 @@ struct bpf_program { #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 --git a/src/gen_pfc.c b/src/gen_pfc.c index 75d8507..405f080 100644 --- a/src/gen_pfc.c +++ b/src/gen_pfc.c @@ -87,6 +87,8 @@ static const char *_pfc_arch(const struct arch_def *arch) 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_chain(const struct arch_def *arch, * */ 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) { - int rc = 0; + 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) +{ + 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 @@ static int _gen_pfc_arch(const struct db_filter_col *col, 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 @@ arch_return: } return rc; } - /** * Generate a pseudo filter code string representation * @param col the seccomp filter collection @@ -336,23 +464,22 @@ arch_return: * * 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 @@ int gen_pfc_generate(const struct db_filter_col *col, int fd) 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 @@ int gen_pfc_generate(const struct db_filter_col *col, int fd) fflush(fds); fclose(fds); - return rc; + return 0; } diff --git a/src/python/Makefile.in b/src/python/Makefile.in index 8a85552..ce30cfb 100644 --- a/src/python/Makefile.in +++ b/src/python/Makefile.in @@ -176,6 +176,7 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -242,13 +243,13 @@ build_cpu = @build_cpu@ 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 --git a/src/python/libseccomp.pxd b/src/python/libseccomp.pxd index 49d0be4..0629bf1 100644 --- a/src/python/libseccomp.pxd +++ b/src/python/libseccomp.pxd @@ -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 @@ cdef extern from "seccomp.h": 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 @@ cdef extern from "seccomp.h": 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 @@ cdef extern from "seccomp.h": 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 @@ cdef extern from "seccomp.h": 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 @@ cdef extern from "seccomp.h": 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 --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx index 121a0d6..1a9eb24 100644 --- a/src/python/seccomp.pyx +++ b/src/python/seccomp.pyx @@ -36,6 +36,7 @@ Filter action values: 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 @@ Example: # 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 @@ __author__ = 'Paul Moore ' __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 @@ KILL = libseccomp.SCMP_ACT_KILL 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 @@ cdef class Arch: 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 @@ cdef class Arch: 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 @@ cdef class Attr: 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 @@ cdef class Attr: 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 @@ cdef class Arg: """ 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 @@ cdef class SyscallFilter: 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 @@ cdef class SyscallFilter: 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 --git a/src/syscalls.c b/src/syscalls.c new file mode 100644 index 0000000..9091fa9 --- /dev/null +++ b/src/syscalls.c @@ -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 --git a/src/syscalls.csv b/src/syscalls.csv new file mode 100644 index 0000000..11d087a --- /dev/null +++ b/src/syscalls.csv @@ -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 --git a/src/syscalls.h b/src/syscalls.h new file mode 100644 index 0000000..d638733 --- /dev/null +++ b/src/syscalls.h @@ -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 --git a/src/syscalls.perf b/src/syscalls.perf new file mode 100644 index 0000000..8c5f23e --- /dev/null +++ b/src/syscalls.perf @@ -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 --git a/src/syscalls.perf.c b/src/syscalls.perf.c new file mode 100644 index 0000000..4d1f60c --- /dev/null +++ b/src/syscalls.perf.c @@ -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 --git a/src/syscalls.perf.template b/src/syscalls.perf.template new file mode 100644 index 0000000..f1fd3db --- /dev/null +++ b/src/syscalls.perf.template @@ -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 --git a/src/system.c b/src/system.c index 0501b76..c646c65 100644 --- a/src/system.c +++ b/src/system.c @@ -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; + + if (state.notify_fd > 0) + close(state.notify_fd); + state.notify_fd = -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; + 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 @@ int sys_chk_seccomp_syscall(void) /* 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 @@ int sys_chk_seccomp_syscall(void) case SCMP_ARCH_PPC64LE: case SCMP_ARCH_S390: case SCMP_ARCH_S390X: + case SCMP_ARCH_RISCV64: break; default: goto unsupported; @@ -87,17 +143,17 @@ int sys_chk_seccomp_syscall(void) /* 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 @@ supported: */ void sys_set_seccomp_syscall(bool enable) { - _support_seccomp_syscall = (enable ? 1 : 0); + state.sup_syscall = (enable ? 1 : 0); } /** @@ -125,16 +181,16 @@ void sys_set_seccomp_syscall(bool enable) 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 @@ int sys_chk_seccomp_action(uint32_t action) } 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 @@ int sys_chk_seccomp_action(uint32_t action) */ 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 @@ void sys_set_seccomp_action(uint32_t action, bool enable) * 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 @@ int sys_chk_seccomp_flag(int flag) { 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 @@ void sys_set_seccomp_flag(int flag, bool enable) { 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 @@ void sys_set_seccomp_flag(int flag, bool enable) /** * 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 @@ void sys_set_seccomp_flag(int flag, bool enable) * 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 @@ int sys_filter_load(const struct db_filter_col *col) 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 --git a/src/system.h b/src/system.h index 9f708d1..096f3ca 100644 --- a/src/system.h +++ b/src/system.h @@ -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 @@ struct db_filter_col; #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 @@ struct db_filter_col; #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 @@ typedef struct sock_filter bpf_instr_raw; #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 @@ void sys_set_seccomp_action(uint32_t action, bool enable); 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 --git a/tests/04-sim-multilevel_chains.c b/tests/04-sim-multilevel_chains.c index a660b40..e3e4f9b 100644 --- a/tests/04-sim-multilevel_chains.c +++ b/tests/04-sim-multilevel_chains.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) 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 --git a/tests/04-sim-multilevel_chains.py b/tests/04-sim-multilevel_chains.py index bcf1ee4..a5127a2 100755 --- a/tests/04-sim-multilevel_chains.py +++ b/tests/04-sim-multilevel_chains.py @@ -30,7 +30,7 @@ from seccomp import * 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 --git a/tests/04-sim-multilevel_chains.tests b/tests/04-sim-multilevel_chains.tests index 6613f9a..b6f7576 100644 --- a/tests/04-sim-multilevel_chains.tests +++ b/tests/04-sim-multilevel_chains.tests @@ -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 @@ test type: bpf-sim 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 --git a/tests/06-sim-actions.c b/tests/06-sim-actions.c index 10b366c..da636c9 100644 --- a/tests/06-sim-actions.c +++ b/tests/06-sim-actions.c @@ -60,11 +60,11 @@ int main(int argc, char *argv[]) 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 --git a/tests/06-sim-actions.py b/tests/06-sim-actions.py index f14d6ed..253061d 100755 --- a/tests/06-sim-actions.py +++ b/tests/06-sim-actions.py @@ -37,8 +37,8 @@ def test(args): 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 --git a/tests/06-sim-actions.tests b/tests/06-sim-actions.tests index 0a7bc66..1ef38b3 100644 --- a/tests/06-sim-actions.tests +++ b/tests/06-sim-actions.tests @@ -11,15 +11,17 @@ test type: bpf-sim 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 --git a/tests/11-basic-basic_errors.c b/tests/11-basic-basic_errors.c index ddd9e38..da059df 100644 --- a/tests/11-basic-basic_errors.c +++ b/tests/11-basic-basic_errors.c @@ -41,12 +41,9 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 --git a/tests/13-basic-attrs.c b/tests/13-basic-attrs.c index 0fe4755..e3c5881 100644 --- a/tests/13-basic-attrs.c +++ b/tests/13-basic-attrs.c @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) 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; @@ -108,6 +108,40 @@ int main(int argc, char *argv[]) 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; + } + rc = 0; out: seccomp_release(ctx); diff --git a/tests/13-basic-attrs.py b/tests/13-basic-attrs.py index 49759ee..48c25a0 100755 --- a/tests/13-basic-attrs.py +++ b/tests/13-basic-attrs.py @@ -29,7 +29,7 @@ import util 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 @@ def test(): 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 --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c index 0c1eefe..2679270 100644 --- a/tests/15-basic-resolver.c +++ b/tests/15-basic-resolver.c @@ -45,6 +45,7 @@ unsigned int arch_list[] = { SCMP_ARCH_S390X, SCMP_ARCH_PARISC, SCMP_ARCH_PARISC64, + SCMP_ARCH_RISCV64, -1 }; diff --git a/tests/16-sim-arch_basic.c b/tests/16-sim-arch_basic.c index 7495f82..0b141e1 100644 --- a/tests/16-sim-arch_basic.c +++ b/tests/16-sim-arch_basic.c @@ -51,6 +51,12 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 --git a/tests/16-sim-arch_basic.py b/tests/16-sim-arch_basic.py index 7d7a05f..846553f 100755 --- a/tests/16-sim-arch_basic.py +++ b/tests/16-sim-arch_basic.py @@ -44,6 +44,7 @@ def test(args): 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 --git a/tests/18-sim-basic_allowlist.c b/tests/18-sim-basic_allowlist.c new file mode 100644 index 0000000..e30274f --- /dev/null +++ b/tests/18-sim-basic_allowlist.c @@ -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 --git a/tests/18-sim-basic_allowlist.py b/tests/18-sim-basic_allowlist.py new file mode 100755 index 0000000..dbee3ac --- /dev/null +++ b/tests/18-sim-basic_allowlist.py @@ -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 --git a/tests/18-sim-basic_allowlist.tests b/tests/18-sim-basic_allowlist.tests new file mode 100644 index 0000000..dba88ce --- /dev/null +++ b/tests/18-sim-basic_allowlist.tests @@ -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 --git a/tests/23-sim-arch_all_le_basic.c b/tests/23-sim-arch_all_le_basic.c index 5672980..32739e5 100644 --- a/tests/23-sim-arch_all_le_basic.c +++ b/tests/23-sim-arch_all_le_basic.c @@ -71,6 +71,9 @@ int main(int argc, char *argv[]) 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 --git a/tests/23-sim-arch_all_le_basic.py b/tests/23-sim-arch_all_le_basic.py index 5927f37..33eedb1 100755 --- a/tests/23-sim-arch_all_le_basic.py +++ b/tests/23-sim-arch_all_le_basic.py @@ -40,6 +40,7 @@ def test(args): 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 --git a/tests/30-sim-socket_syscalls.c b/tests/30-sim-socket_syscalls.c index 934d30e..7a193b2 100644 --- a/tests/30-sim-socket_syscalls.c +++ b/tests/30-sim-socket_syscalls.c @@ -53,6 +53,9 @@ int main(int argc, char *argv[]) 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 --git a/tests/30-sim-socket_syscalls.py b/tests/30-sim-socket_syscalls.py index 439aa61..d37d411 100755 --- a/tests/30-sim-socket_syscalls.py +++ b/tests/30-sim-socket_syscalls.py @@ -34,6 +34,7 @@ def test(args): 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 --git a/tests/30-sim-socket_syscalls.tests b/tests/30-sim-socket_syscalls.tests index 9d54b0e..b439c18 100644 --- a/tests/30-sim-socket_syscalls.tests +++ b/tests/30-sim-socket_syscalls.tests @@ -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 --git a/tests/34-sim-basic_denylist.c b/tests/34-sim-basic_denylist.c new file mode 100644 index 0000000..e17406f --- /dev/null +++ b/tests/34-sim-basic_denylist.c @@ -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 --git a/tests/34-sim-basic_denylist.py b/tests/34-sim-basic_denylist.py new file mode 100755 index 0000000..05a202d --- /dev/null +++ b/tests/34-sim-basic_denylist.py @@ -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 --git a/tests/34-sim-basic_denylist.tests b/tests/34-sim-basic_denylist.tests new file mode 100644 index 0000000..ed2491a --- /dev/null +++ b/tests/34-sim-basic_denylist.tests @@ -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 --git a/tests/36-sim-ipc_syscalls.c b/tests/36-sim-ipc_syscalls.c index c3ff332..1437e43 100644 --- a/tests/36-sim-ipc_syscalls.c +++ b/tests/36-sim-ipc_syscalls.c @@ -53,6 +53,9 @@ int main(int argc, char *argv[]) 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 --git a/tests/36-sim-ipc_syscalls.py b/tests/36-sim-ipc_syscalls.py index 369a80e..2e223ff 100755 --- a/tests/36-sim-ipc_syscalls.py +++ b/tests/36-sim-ipc_syscalls.py @@ -34,6 +34,7 @@ def test(args): 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 --git a/tests/36-sim-ipc_syscalls.tests b/tests/36-sim-ipc_syscalls.tests index 8e0ded7..8d83af7 100644 --- a/tests/36-sim-ipc_syscalls.tests +++ b/tests/36-sim-ipc_syscalls.tests @@ -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 --git a/tests/39-basic-api_level.c b/tests/39-basic-api_level.c index 9ce3b41..6c31be1 100644 --- a/tests/39-basic-api_level.c +++ b/tests/39-basic-api_level.c @@ -54,14 +54,35 @@ int main(int argc, char *argv[]) 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 --git a/tests/39-basic-api_level.py b/tests/39-basic-api_level.py index 9c40c33..352568e 100755 --- a/tests/39-basic-api_level.py +++ b/tests/39-basic-api_level.py @@ -50,6 +50,21 @@ def test(): 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 @@ def test(): 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 --git a/tests/47-live-kill_process.c b/tests/47-live-kill_process.c index 7da407f..47d5833 100644 --- a/tests/47-live-kill_process.c +++ b/tests/47-live-kill_process.c @@ -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 @@ int main(int argc, char *argv[]) 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 --git a/tests/51-live-user_notification.c b/tests/51-live-user_notification.c new file mode 100644 index 0000000..4847d8b --- /dev/null +++ b/tests/51-live-user_notification.c @@ -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 --git a/tests/51-live-user_notification.py b/tests/51-live-user_notification.py new file mode 100755 index 0000000..3449c44 --- /dev/null +++ b/tests/51-live-user_notification.py @@ -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 --git a/tests/51-live-user_notification.tests b/tests/51-live-user_notification.tests new file mode 100644 index 0000000..4c5e964 --- /dev/null +++ b/tests/51-live-user_notification.tests @@ -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 --git a/tests/53-sim-binary_tree.c b/tests/53-sim-binary_tree.c new file mode 100644 index 0000000..4aa5f13 --- /dev/null +++ b/tests/53-sim-binary_tree.c @@ -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 --git a/tests/53-sim-binary_tree.py b/tests/53-sim-binary_tree.py new file mode 100755 index 0000000..39b2769 --- /dev/null +++ b/tests/53-sim-binary_tree.py @@ -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 --git a/tests/53-sim-binary_tree.tests b/tests/53-sim-binary_tree.tests new file mode 100644 index 0000000..2ebaafd --- /dev/null +++ b/tests/53-sim-binary_tree.tests @@ -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 --git a/tests/54-live-binary_tree.c b/tests/54-live-binary_tree.c new file mode 100644 index 0000000..cd4e9e4 --- /dev/null +++ b/tests/54-live-binary_tree.c @@ -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 --git a/tests/54-live-binary_tree.py b/tests/54-live-binary_tree.py new file mode 100755 index 0000000..2250938 --- /dev/null +++ b/tests/54-live-binary_tree.py @@ -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 --git a/tests/54-live-binary_tree.tests b/tests/54-live-binary_tree.tests new file mode 100644 index 0000000..63575e9 --- /dev/null +++ b/tests/54-live-binary_tree.tests @@ -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 --git a/tests/55-basic-pfc_binary_tree.c b/tests/55-basic-pfc_binary_tree.c new file mode 100644 index 0000000..e364fd6 --- /dev/null +++ b/tests/55-basic-pfc_binary_tree.c @@ -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 --git a/tests/55-basic-pfc_binary_tree.pfc b/tests/55-basic-pfc_binary_tree.pfc new file mode 100644 index 0000000..ba3244c --- /dev/null +++ b/tests/55-basic-pfc_binary_tree.pfc @@ -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 --git a/tests/55-basic-pfc_binary_tree.sh b/tests/55-basic-pfc_binary_tree.sh new file mode 100755 index 0000000..a12c69c --- /dev/null +++ b/tests/55-basic-pfc_binary_tree.sh @@ -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 --git a/tests/55-basic-pfc_binary_tree.tests b/tests/55-basic-pfc_binary_tree.tests new file mode 100644 index 0000000..8269a64 --- /dev/null +++ b/tests/55-basic-pfc_binary_tree.tests @@ -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 --git a/tests/56-basic-iterate_syscalls.c b/tests/56-basic-iterate_syscalls.c new file mode 100644 index 0000000..5e7ab67 --- /dev/null +++ b/tests/56-basic-iterate_syscalls.c @@ -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 --git a/tests/56-basic-iterate_syscalls.py b/tests/56-basic-iterate_syscalls.py new file mode 100755 index 0000000..77a5b89 --- /dev/null +++ b/tests/56-basic-iterate_syscalls.py @@ -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 --git a/tests/56-basic-iterate_syscalls.tests b/tests/56-basic-iterate_syscalls.tests new file mode 100644 index 0000000..a84415a --- /dev/null +++ b/tests/56-basic-iterate_syscalls.tests @@ -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 --git a/tests/57-basic-rawsysrc.c b/tests/57-basic-rawsysrc.c new file mode 100644 index 0000000..4248c7a --- /dev/null +++ b/tests/57-basic-rawsysrc.c @@ -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 --git a/tests/57-basic-rawsysrc.py b/tests/57-basic-rawsysrc.py new file mode 100755 index 0000000..a88461a --- /dev/null +++ b/tests/57-basic-rawsysrc.py @@ -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 --git a/tests/57-basic-rawsysrc.tests b/tests/57-basic-rawsysrc.tests new file mode 100644 index 0000000..fe71632 --- /dev/null +++ b/tests/57-basic-rawsysrc.tests @@ -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 --git a/tests/58-live-tsync_notify.c b/tests/58-live-tsync_notify.c new file mode 100644 index 0000000..e071284 --- /dev/null +++ b/tests/58-live-tsync_notify.c @@ -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 --git a/tests/58-live-tsync_notify.py b/tests/58-live-tsync_notify.py new file mode 100755 index 0000000..ae01b06 --- /dev/null +++ b/tests/58-live-tsync_notify.py @@ -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 --git a/tests/58-live-tsync_notify.tests b/tests/58-live-tsync_notify.tests new file mode 100644 index 0000000..6c84891 --- /dev/null +++ b/tests/58-live-tsync_notify.tests @@ -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 --git a/tests/Makefile.am b/tests/Makefile.am index f667b7d..13d3157 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,7 +57,7 @@ check_PROGRAMS = \ 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 @@ check_PROGRAMS = \ 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 @@ check_PROGRAMS = \ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 --git a/tests/Makefile.in b/tests/Makefile.in index 8f942f3..5ed972a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -116,7 +116,7 @@ check_PROGRAMS = miniseq$(EXEEXT) 01-sim-allow$(EXEEXT) \ 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 @@ check_PROGRAMS = miniseq$(EXEEXT) 01-sim-allow$(EXEEXT) \ 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 @@ check_PROGRAMS = miniseq$(EXEEXT) 01-sim-allow$(EXEEXT) \ 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 @@ am__DEPENDENCIES_1 = 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 @@ am__DEPENDENCIES_1 = 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 @@ am__DEPENDENCIES_1 = 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 @@ am__depfiles_remade = ./$(DEPDIR)/00-test.Po \ ./$(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 @@ am__depfiles_remade = ./$(DEPDIR)/00-test.Po \ ./$(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 @@ am__depfiles_remade = ./$(DEPDIR)/00-test.Po \ ./$(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 @@ SOURCES = $(util_la_SOURCES) $(nodist_00_test_SOURCES) 01-sim-allow.c \ 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 @@ SOURCES = $(util_la_SOURCES) $(nodist_00_test_SOURCES) 01-sim-allow.c \ 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 @@ SOURCES = $(util_la_SOURCES) $(nodist_00_test_SOURCES) 01-sim-allow.c \ 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 @@ DIST_SOURCES = $(util_la_SOURCES) 01-sim-allow.c 02-sim-basic.c \ 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 @@ DIST_SOURCES = $(util_la_SOURCES) 01-sim-allow.c 02-sim-basic.c \ 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 @@ DIST_SOURCES = $(util_la_SOURCES) 01-sim-allow.c 02-sim-basic.c \ 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 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ GENHTML = @GENHTML@ +GPERF = @GPERF@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -713,13 +768,13 @@ build_cpu = @build_cpu@ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTPYTHON = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 @@ EXTRA_DIST_TESTCFGS = \ 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 @@ util.la: $(util_la_OBJECTS) $(util_la_DEPENDENCIES) $(EXTRA_util_la_DEPENDENCIES @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 @@ util.la: $(util_la_OBJECTS) $(util_la_DEPENDENCIES) $(EXTRA_util_la_DEPENDENCIES @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 @@ util.la: $(util_la_OBJECTS) $(util_la_DEPENDENCIES) $(EXTRA_util_la_DEPENDENCIES @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 @@ distclean-compile: @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 @@ distclean-compile: @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 @@ distclean-compile: @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 @@ distclean: distclean-am -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 @@ distclean: distclean-am -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 @@ distclean: distclean-am -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 @@ maintainer-clean: maintainer-clean-am -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 @@ maintainer-clean: maintainer-clean-am -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 @@ maintainer-clean: maintainer-clean-am -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 --git a/tests/regression b/tests/regression index 56822fb..1496294 100755 --- a/tests/regression +++ b/tests/regression @@ -25,7 +25,8 @@ GLBL_ARCH_LE_SUPPORT=" \ 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 @@ GLBL_ARCH_64B_SUPPORT=" \ mips64 \ parisc64 \ ppc64 \ + riscv64 \ s390x" GLBL_SYS_ARCH="../tools/scmp_arch_detect" @@ -270,7 +272,8 @@ function generate_random_data() { else rcount=$[ ($RANDOM % 8) + 1 ] fi - rdata=$(echo $(