diff --git a/SOURCES/001-arch-add-stax-syscall.patch b/SOURCES/001-arch-add-stax-syscall.patch new file mode 100644 index 0000000..6d47d7d --- /dev/null +++ b/SOURCES/001-arch-add-stax-syscall.patch @@ -0,0 +1,181 @@ +From 172b09674a3f2c38d5827504967fdb0b44ab1231 Mon Sep 17 00:00:00 2001 +From: Tobias Klauser +Date: Fri, 20 Oct 2017 09:39:40 +0200 +Subject: [PATCH] arch: add the statx syscall + +Fixes #88 + +Signed-off-by: Tobias Klauser +[PM: fixed the incorrect x32 definition] +Signed-off-by: Paul Moore +--- + src/arch-aarch64-syscalls.c | 1 + + src/arch-arm-syscalls.c | 1 + + src/arch-mips-syscalls.c | 1 + + src/arch-mips64-syscalls.c | 1 + + src/arch-mips64n32-syscalls.c | 1 + + src/arch-ppc-syscalls.c | 1 + + src/arch-ppc64-syscalls.c | 1 + + src/arch-s390-syscalls.c | 1 + + src/arch-s390x-syscalls.c | 1 + + src/arch-x32-syscalls.c | 3 ++- + src/arch-x86-syscalls.c | 1 + + src/arch-x86_64-syscalls.c | 1 + + 12 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c +index 357f290..d8d01bf 100644 +--- a/src/arch-aarch64-syscalls.c ++++ b/src/arch-aarch64-syscalls.c +@@ -387,6 +387,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", 43 }, + { "statfs64", __PNR_statfs64 }, ++ { "statx", 291 }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c +index d1349a1..12e3ed9 100644 +--- a/src/arch-arm-syscalls.c ++++ b/src/arch-arm-syscalls.c +@@ -399,6 +399,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \ + { "stat64", (__SCMP_NR_BASE + 195) }, + { "statfs", (__SCMP_NR_BASE + 99) }, + { "statfs64", (__SCMP_NR_BASE + 266) }, ++ { "statx", (__SCMP_NR_BASE + 397) }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c +index 2cd86cd..8efaacd 100644 +--- a/src/arch-mips-syscalls.c ++++ b/src/arch-mips-syscalls.c +@@ -391,6 +391,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \ + { "stat64", (__SCMP_NR_BASE + 213) }, + { "statfs", (__SCMP_NR_BASE + 99) }, + { "statfs64", (__SCMP_NR_BASE + 255) }, ++ { "statx", (__SCMP_NR_BASE + 366) }, + { "stime", (__SCMP_NR_BASE + 25) }, + { "stty", (__SCMP_NR_BASE + 31) }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c +index 80db447..1b1bcd0 100644 +--- a/src/arch-mips64-syscalls.c ++++ b/src/arch-mips64-syscalls.c +@@ -391,6 +391,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", (__SCMP_NR_BASE + 134) }, + { "statfs64", __PNR_statfs64 }, ++ { "statx", (__SCMP_NR_BASE + 326) }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c +index 5cf03d2..b280074 100644 +--- a/src/arch-mips64n32-syscalls.c ++++ b/src/arch-mips64n32-syscalls.c +@@ -391,6 +391,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", (__SCMP_NR_BASE + 134) }, + { "statfs64", (__SCMP_NR_BASE + 217) }, ++ { "statx", (__SCMP_NR_BASE + 330) }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c +index 2bd8a36..9959b19 100644 +--- a/src/arch-ppc-syscalls.c ++++ b/src/arch-ppc-syscalls.c +@@ -388,6 +388,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \ + { "stat64", 195 }, + { "statfs", 99 }, + { "statfs64", 252 }, ++ { "statx", 383}, + { "stime", 25 }, + { "stty", 31 }, + { "subpage_prot", 310 }, +diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c +index 73621a1..f6d8a83 100644 +--- a/src/arch-ppc64-syscalls.c ++++ b/src/arch-ppc64-syscalls.c +@@ -388,6 +388,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", 99 }, + { "statfs64", 252 }, ++ { "statx", 383}, + { "stime", 25 }, + { "stty", 31 }, + { "subpage_prot", 310 }, +diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c +index a04673a..23bc4f7 100644 +--- a/src/arch-s390-syscalls.c ++++ b/src/arch-s390-syscalls.c +@@ -371,6 +371,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \ + { "stat64", 195 }, + { "statfs", 99 }, + { "statfs64", 265 }, ++ { "statx", 379 }, + { "stime", 25 }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c +index 9825c63..59b93cf 100644 +--- a/src/arch-s390x-syscalls.c ++++ b/src/arch-s390x-syscalls.c +@@ -371,6 +371,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", 99 }, + { "statfs64", 265 }, ++ { "statx", 379 }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c +index 80dd38b..c933956 100644 +--- a/src/arch-x32-syscalls.c ++++ b/src/arch-x32-syscalls.c +@@ -26,7 +26,7 @@ + #include "arch.h" + #include "arch-x32.h" + +-/* NOTE: based on Linux 4.5-rc4 */ ++/* NOTE: based on Linux 4.14 */ + const struct arch_syscall_def x32_syscall_table[] = { \ + { "_llseek", __PNR__llseek }, + { "_newselect", __PNR__newselect }, +@@ -387,6 +387,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", (X32_SYSCALL_BIT + 137) }, + { "statfs64", __PNR_statfs64 }, ++ { "statx", (X32_SYSCALL_BIT + 332) }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c +index 58e0597..04e2e0a 100644 +--- a/src/arch-x86-syscalls.c ++++ b/src/arch-x86-syscalls.c +@@ -387,6 +387,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \ + { "stat64", 195 }, + { "statfs", 99 }, + { "statfs64", 268 }, ++ { "statx", 383 }, + { "stime", 25 }, + { "stty", 31 }, + { "subpage_prot", __PNR_subpage_prot }, +diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c +index 2dd9818..0aa437a 100644 +--- a/src/arch-x86_64-syscalls.c ++++ b/src/arch-x86_64-syscalls.c +@@ -387,6 +387,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \ + { "stat64", __PNR_stat64 }, + { "statfs", 137 }, + { "statfs64", __PNR_statfs64 }, ++ { "statx", 332 }, + { "stime", __PNR_stime }, + { "stty", __PNR_stty }, + { "subpage_prot", __PNR_subpage_prot }, +-- +2.21.0 + diff --git a/SPECS/libseccomp.spec b/SPECS/libseccomp.spec index b423811..ebd021e 100644 --- a/SPECS/libseccomp.spec +++ b/SPECS/libseccomp.spec @@ -1,16 +1,19 @@ Summary: Enhanced seccomp library Name: libseccomp Version: 2.3.1 -Release: 3%{?dist} +Release: 4%{?dist} ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc ppc64 ppc64le s390 s390x License: LGPLv2 Group: System Environment/Libraries Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz URL: https://github.com/seccomp/libseccomp +BuildRequires: git %ifnarch s390 BuildRequires: valgrind %endif +Patch001: 001-arch-add-stax-syscall.patch + %description The libseccomp library provides an easy to use interface to the Linux Kernel's syscall filtering mechanism, seccomp. The libseccomp API allows an application @@ -31,7 +34,7 @@ application is allowed to execute, all of which are enforced by the Linux Kernel. %prep -%setup -q +%autosetup -p 1 -S git %build %configure @@ -71,6 +74,9 @@ make V=1 check %{_mandir}/man3/* %changelog +* Thu Dec 12 2019 Marek Tamaskovic - 2.3.1-4 +- Added statx syscall + * Wed Feb 22 2017 Paul Moore - 2.3.1-3 - Added the ppc arch to the build