summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/libseccomp/files/0001-arch-Add-riscv32-architecture-support.patch162
-rw-r--r--meta/recipes-support/libseccomp/files/0002-man-Add-RISCV64-to-arch-list.patch28
-rw-r--r--meta/recipes-support/libseccomp/files/0003-syscalls-update-the-syscall-defs-for-Linux-v5.15.0-r.patch (renamed from meta/recipes-support/libseccomp/files/0002-Regenerate-syscall-cvs-file-from-5.13-rc5-kernel.patch)60
-rw-r--r--meta/recipes-support/libseccomp/files/0004-syscalls-Add-quotactl_path.patch40
-rw-r--r--meta/recipes-support/libseccomp/libseccomp_2.5.2.bb (renamed from meta/recipes-support/libseccomp/libseccomp_2.5.1.bb)6
5 files changed, 172 insertions, 124 deletions
diff --git a/meta/recipes-support/libseccomp/files/0001-arch-Add-riscv32-architecture-support.patch b/meta/recipes-support/libseccomp/files/0001-arch-Add-riscv32-architecture-support.patch
index 62bd61fb56..2fd22b1aa2 100644
--- a/meta/recipes-support/libseccomp/files/0001-arch-Add-riscv32-architecture-support.patch
+++ b/meta/recipes-support/libseccomp/files/0001-arch-Add-riscv32-architecture-support.patch
@@ -1,18 +1,18 @@
1From 6d127a0463ea2d7bb5021562678324e28e0407e5 Mon Sep 17 00:00:00 2001 1From e99b00a78acaf80236cba8b3fabaebdb3ef1987b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Jun 2021 19:45:34 -0700 3Date: Tue, 8 Jun 2021 19:45:34 -0700
4Subject: [PATCH 1/2] arch: Add riscv32 architecture support 4Subject: [PATCH 1/4] arch: Add riscv32 architecture support
5 5
6Support for rv32 was upstreamed into 5.4+ kernel 6Support for rv32 was upstreamed into 5.4+ kernel
7
8Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327] 7Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327]
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10--- 10---
11 CREDITS | 1 + 11 CREDITS | 1 +
12 README.md | 1 + 12 README.md | 1 +
13 doc/man/man1/scmp_sys_resolver.1 | 2 +- 13 doc/man/man1/scmp_sys_resolver.1 | 2 +-
14 doc/man/man3/seccomp_arch_add.3 | 1 + 14 doc/man/man3/seccomp_arch_add.3 | 1 +
15 include/seccomp-syscalls.h | 31 ++++++++++++++++++ 15 include/seccomp-syscalls.h | 32 +++++++++++++++++++
16 include/seccomp.h.in | 9 ++++++ 16 include/seccomp.h.in | 9 ++++++
17 src/Makefile.am | 1 + 17 src/Makefile.am | 1 +
18 src/arch-riscv32.c | 31 ++++++++++++++++++ 18 src/arch-riscv32.c | 31 ++++++++++++++++++
@@ -24,7 +24,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 src/python/libseccomp.pxd | 1 + 24 src/python/libseccomp.pxd | 1 +
25 src/python/seccomp.pyx | 2 ++ 25 src/python/seccomp.pyx | 2 ++
26 src/syscalls.c | 1 + 26 src/syscalls.c | 1 +
27 src/syscalls.csv | 2 +-
28 src/syscalls.h | 2 ++ 27 src/syscalls.h | 2 ++
29 src/system.c | 1 + 28 src/system.c | 1 +
30 tests/15-basic-resolver.c | 1 + 29 tests/15-basic-resolver.c | 1 +
@@ -40,12 +39,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
40 tools/scmp_bpf_sim.c | 2 ++ 39 tools/scmp_bpf_sim.c | 2 ++
41 tools/util.c | 6 +++- 40 tools/util.c | 6 +++-
42 tools/util.h | 7 ++++ 41 tools/util.h | 7 ++++
43 32 files changed, 208 insertions(+), 7 deletions(-) 42 31 files changed, 208 insertions(+), 6 deletions(-)
44 create mode 100644 src/arch-riscv32.c 43 create mode 100644 src/arch-riscv32.c
45 create mode 100644 src/arch-riscv32.h 44 create mode 100644 src/arch-riscv32.h
46 45
47diff --git a/CREDITS b/CREDITS 46diff --git a/CREDITS b/CREDITS
48index d6bbc2a..ad2f7e0 100644 47index b685712..c1ffdb3 100644
49--- a/CREDITS 48--- a/CREDITS
50+++ b/CREDITS 49+++ b/CREDITS
51@@ -33,6 +33,7 @@ John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> 50@@ -33,6 +33,7 @@ John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
@@ -55,9 +54,9 @@ index d6bbc2a..ad2f7e0 100644
55+Khem Raj <raj.khem@gmail.com> 54+Khem Raj <raj.khem@gmail.com>
56 Kyle R. Conway <kyle.r.conway@gmail.com> 55 Kyle R. Conway <kyle.r.conway@gmail.com>
57 Kenta Tada <Kenta.Tada@sony.com> 56 Kenta Tada <Kenta.Tada@sony.com>
58 Luca Bruno <lucab@debian.org> 57 Kir Kolyshkin <kolyshkin@gmail.com>
59diff --git a/README.md b/README.md 58diff --git a/README.md b/README.md
60index ba02186..2cd718f 100644 59index 579f226..8199a71 100644
61--- a/README.md 60--- a/README.md
62+++ b/README.md 61+++ b/README.md
63@@ -54,6 +54,7 @@ The libseccomp library currently supports the architectures listed below: 62@@ -54,6 +54,7 @@ The libseccomp library currently supports the architectures listed below:
@@ -67,7 +66,7 @@ index ba02186..2cd718f 100644
67+* 32-bit RISC-V (riscv32) 66+* 32-bit RISC-V (riscv32)
68 * 32-bit SuperH big endian (sheb) 67 * 32-bit SuperH big endian (sheb)
69 * 32-bit SuperH (sh) 68 * 32-bit SuperH (sh)
70 69
71diff --git a/doc/man/man1/scmp_sys_resolver.1 b/doc/man/man1/scmp_sys_resolver.1 70diff --git a/doc/man/man1/scmp_sys_resolver.1 b/doc/man/man1/scmp_sys_resolver.1
72index 267187b..fc68d18 100644 71index 267187b..fc68d18 100644
73--- a/doc/man/man1/scmp_sys_resolver.1 72--- a/doc/man/man1/scmp_sys_resolver.1
@@ -94,93 +93,94 @@ index 7baa21e..8966b3a 100644
94 .sp 93 .sp
95 .BI "uint32_t seccomp_arch_resolve_name(const char *" arch_name ");" 94 .BI "uint32_t seccomp_arch_resolve_name(const char *" arch_name ");"
96diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h 95diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h
97index c694db1..c6ea5ca 100644 96index 476f953..4ff814c 100644
98--- a/include/seccomp-syscalls.h 97--- a/include/seccomp-syscalls.h
99+++ b/include/seccomp-syscalls.h 98+++ b/include/seccomp-syscalls.h
100@@ -275,6 +275,13 @@ 99@@ -276,6 +276,14 @@
101 #define __PNR_ppoll -10241
102 #define __PNR_renameat -10242 100 #define __PNR_renameat -10242
103 #define __PNR_riscv_flush_icache -10243 101 #define __PNR_riscv_flush_icache -10243
104+#define __PNR_fstat -10244 102 #define __PNR_memfd_secret -10244
105+#define __PNR_futex -10245 103+#define __PNR_fstat -10245
106+#define __PNR_nanosleep -10246 104+#define __PNR_futex -10246
107+#define __PNR_lseek -10247 105+#define __PNR_nanosleep -10247
108+#define __PNR_clock_gettime -10248 106+#define __PNR_lseek -10248
109+#define __PNR_clock_nanosleep -10249 107+#define __PNR_clock_gettime -10249
110+#define __PNR_gettimeofday -10250 108+#define __PNR_clock_nanosleep -10250
111 109+#define __PNR_gettimeofday -10251
110+#define __PNR_fcntl -10252
111
112 /* 112 /*
113 * libseccomp syscall definitions 113 * libseccomp syscall definitions
114@@ -442,7 +449,11 @@ 114@@ -443,7 +451,11 @@
115 #define __SNR_clock_getres_time64 __PNR_clock_getres_time64 115 #define __SNR_clock_getres_time64 __PNR_clock_getres_time64
116 #endif 116 #endif
117 117
118+#ifdef __NR_clock_gettime 118+#ifdef __NR_clock_gettime
119 #define __SNR_clock_gettime __NR_clock_gettime 119 #define __SNR_clock_gettime __NR_clock_gettime
120+#else 120+#else
121+#define __SNR_clock_gettime __PNR_clock_gettime 121+#define __SNR_clock_gettime __PNR_clock_gettime
122+#endif 122+#endif
123 123
124 #ifdef __NR_clock_gettime64 124 #ifdef __NR_clock_gettime64
125 #define __SNR_clock_gettime64 __NR_clock_gettime64 125 #define __SNR_clock_gettime64 __NR_clock_gettime64
126@@ -450,7 +461,11 @@ 126@@ -451,7 +463,11 @@
127 #define __SNR_clock_gettime64 __PNR_clock_gettime64 127 #define __SNR_clock_gettime64 __PNR_clock_gettime64
128 #endif 128 #endif
129 129
130+#ifdef __NR_clock_nanosleep 130+#ifdef __NR_clock_nanosleep
131 #define __SNR_clock_nanosleep __NR_clock_nanosleep 131 #define __SNR_clock_nanosleep __NR_clock_nanosleep
132+#else 132+#else
133+#define __SNR_clock_nanosleep __PNR_clock_nanosleep 133+#define __SNR_clock_nanosleep __PNR_clock_nanosleep
134+#endif 134+#endif
135 135
136 #ifdef __NR_clock_nanosleep_time64 136 #ifdef __NR_clock_nanosleep_time64
137 #define __SNR_clock_nanosleep_time64 __NR_clock_nanosleep_time64 137 #define __SNR_clock_nanosleep_time64 __NR_clock_nanosleep_time64
138@@ -710,7 +725,11 @@ 138@@ -713,7 +729,11 @@
139 #define __SNR_ftruncate64 __PNR_ftruncate64 139 #define __SNR_ftruncate64 __PNR_ftruncate64
140 #endif 140 #endif
141 141
142+#ifdef __NR_futex 142+#ifdef __NR_futex
143 #define __SNR_futex __NR_futex 143 #define __SNR_futex __NR_futex
144+#else 144+#else
145+#define __SNR_futex __PNR_futex 145+#define __SNR_futex __PNR_futex
146+#endif 146+#endif
147 147
148 #ifdef __NR_futex_time64 148 #ifdef __NR_futex_time64
149 #define __SNR_futex_time64 __NR_futex_time64 149 #define __SNR_futex_time64 __NR_futex_time64
150@@ -896,7 +915,11 @@ 150@@ -899,7 +919,11 @@
151 151
152 #define __SNR_gettid __NR_gettid 152 #define __SNR_gettid __NR_gettid
153 153
154+#ifdef __NR_gettimeofday 154+#ifdef __NR_gettimeofday
155 #define __SNR_gettimeofday __NR_gettimeofday 155 #define __SNR_gettimeofday __NR_gettimeofday
156+#else 156+#else
157+#define __SNR_gettimeofday __PNR_gettimeofday 157+#define __SNR_gettimeofday __PNR_gettimeofday
158+#endif 158+#endif
159 159
160 #ifdef __NR_getuid 160 #ifdef __NR_getuid
161 #define __SNR_getuid __NR_getuid 161 #define __SNR_getuid __NR_getuid
162@@ -1046,7 +1069,11 @@ 162@@ -1049,7 +1073,11 @@
163 163
164 #define __SNR_lremovexattr __NR_lremovexattr 164 #define __SNR_lremovexattr __NR_lremovexattr
165 165
166+#ifdef __NR_lseek 166+#ifdef __NR_lseek
167 #define __SNR_lseek __NR_lseek 167 #define __SNR_lseek __NR_lseek
168+#else 168+#else
169+#define __SNR_lseek __PNR_lseek 169+#define __SNR_lseek __PNR_lseek
170+#endif 170+#endif
171 171
172 #define __SNR_lsetxattr __NR_lsetxattr 172 #define __SNR_lsetxattr __NR_lsetxattr
173 173
174@@ -1218,7 +1245,11 @@ 174@@ -1227,7 +1255,11 @@
175 175
176 #define __SNR_name_to_handle_at __NR_name_to_handle_at 176 #define __SNR_name_to_handle_at __NR_name_to_handle_at
177 177
178+#ifdef __NR_nanosleep 178+#ifdef __NR_nanosleep
179 #define __SNR_nanosleep __NR_nanosleep 179 #define __SNR_nanosleep __NR_nanosleep
180+#else 180+#else
181+#define __SNR_nanosleep __PNR_nanosleep 181+#define __SNR_nanosleep __PNR_nanosleep
182+#endif 182+#endif
183 183
184 #ifdef __NR_newfstatat 184 #ifdef __NR_newfstatat
185 #define __SNR_newfstatat __NR_newfstatat 185 #define __SNR_newfstatat __NR_newfstatat
186diff --git a/include/seccomp.h.in b/include/seccomp.h.in 186diff --git a/include/seccomp.h.in b/include/seccomp.h.in
@@ -201,14 +201,14 @@ index 333a89c..2e911db 100644
201+ 201+
202 #define SCMP_ARCH_RISCV64 AUDIT_ARCH_RISCV64 202 #define SCMP_ARCH_RISCV64 AUDIT_ARCH_RISCV64
203+#define SCMP_ARCH_RISCV32 AUDIT_ARCH_RISCV32 203+#define SCMP_ARCH_RISCV32 AUDIT_ARCH_RISCV32
204 204
205 /** 205 /**
206 * The SuperH architecture tokens 206 * The SuperH architecture tokens
207diff --git a/src/Makefile.am b/src/Makefile.am 207diff --git a/src/Makefile.am b/src/Makefile.am
208index 7b59810..7961925 100644 208index 04e7ba5..a30bbc0 100644
209--- a/src/Makefile.am 209--- a/src/Makefile.am
210+++ b/src/Makefile.am 210+++ b/src/Makefile.am
211@@ -44,6 +44,7 @@ SOURCES_ALL = \ 211@@ -40,6 +40,7 @@ SOURCES_ALL = \
212 arch-ppc.h arch-ppc.c \ 212 arch-ppc.h arch-ppc.c \
213 arch-ppc64.h arch-ppc64.c \ 213 arch-ppc64.h arch-ppc64.c \
214 arch-riscv64.h arch-riscv64.c \ 214 arch-riscv64.h arch-riscv64.c \
@@ -218,7 +218,7 @@ index 7b59810..7961925 100644
218 arch-sh.h arch-sh.c \ 218 arch-sh.h arch-sh.c \
219diff --git a/src/arch-riscv32.c b/src/arch-riscv32.c 219diff --git a/src/arch-riscv32.c b/src/arch-riscv32.c
220new file mode 100644 220new file mode 100644
221index 0000000..53b3126 221index 0000000..10418f4
222--- /dev/null 222--- /dev/null
223+++ b/src/arch-riscv32.c 223+++ b/src/arch-riscv32.c
224@@ -0,0 +1,31 @@ 224@@ -0,0 +1,31 @@
@@ -248,8 +248,8 @@ index 0000000..53b3126
248+ .token_bpf = AUDIT_ARCH_RISCV32, 248+ .token_bpf = AUDIT_ARCH_RISCV32,
249+ .size = ARCH_SIZE_32, 249+ .size = ARCH_SIZE_32,
250+ .endian = ARCH_ENDIAN_LITTLE, 250+ .endian = ARCH_ENDIAN_LITTLE,
251+ .syscall_resolve_name = riscv32_syscall_resolve_name, 251+ .syscall_resolve_name_raw = riscv32_syscall_resolve_name,
252+ .syscall_resolve_num = riscv32_syscall_resolve_num, 252+ .syscall_resolve_num_raw = riscv32_syscall_resolve_num,
253+ .syscall_rewrite = NULL, 253+ .syscall_rewrite = NULL,
254+ .rule_add = NULL, 254+ .rule_add = NULL,
255+}; 255+};
@@ -310,7 +310,7 @@ index 68bebef..85c7f3d 100755
310@@ -519,6 +519,49 @@ function dump_lib_riscv64() { 310@@ -519,6 +519,49 @@ function dump_lib_riscv64() {
311 dump_lib_arch riscv64 | mangle_lib_syscall riscv64 311 dump_lib_arch riscv64 | mangle_lib_syscall riscv64
312 } 312 }
313 313
314+# 314+#
315+# Dump the riscv32 system syscall table 315+# Dump the riscv32 system syscall table
316+# 316+#
@@ -385,9 +385,9 @@ index 68bebef..85c7f3d 100755
385+ abi_list+=" riscv32 riscv64" 385+ abi_list+=" riscv32 riscv64"
386 abi_list+=" s390 s390x" 386 abi_list+=" s390 s390x"
387 abi_list+=" sh" 387 abi_list+=" sh"
388 388
389diff --git a/src/arch.c b/src/arch.c 389diff --git a/src/arch.c b/src/arch.c
390index 6ab922f..acf80af 100644 390index 921e455..07935a9 100644
391--- a/src/arch.c 391--- a/src/arch.c
392+++ b/src/arch.c 392+++ b/src/arch.c
393@@ -43,6 +43,7 @@ 393@@ -43,6 +43,7 @@
@@ -453,10 +453,10 @@ index 0629bf1..000d503 100644
453 SCMP_ARCH_S390X 453 SCMP_ARCH_S390X
454+ SCMP_ARCH_RISCV32 454+ SCMP_ARCH_RISCV32
455 SCMP_ARCH_RISCV64 455 SCMP_ARCH_RISCV64
456 456
457 cdef enum scmp_filter_attr: 457 cdef enum scmp_filter_attr:
458diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx 458diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx
459index 1a9eb24..c94ad1d 100644 459index 2eeabc1..2895d78 100644
460--- a/src/python/seccomp.pyx 460--- a/src/python/seccomp.pyx
461+++ b/src/python/seccomp.pyx 461+++ b/src/python/seccomp.pyx
462@@ -214,6 +214,7 @@ cdef class Arch: 462@@ -214,6 +214,7 @@ cdef class Arch:
@@ -466,36 +466,29 @@ index 1a9eb24..c94ad1d 100644
466+ RISCV32 - 32-bit RISC-V 466+ RISCV32 - 32-bit RISC-V
467 RISCV64 - 64-bit RISC-V 467 RISCV64 - 64-bit RISC-V
468 """ 468 """
469 469
470@@ -238,6 +239,7 @@ cdef class Arch: 470@@ -238,6 +239,7 @@ cdef class Arch:
471 PPC64LE = libseccomp.SCMP_ARCH_PPC64LE 471 PPC64LE = libseccomp.SCMP_ARCH_PPC64LE
472 S390 = libseccomp.SCMP_ARCH_S390 472 S390 = libseccomp.SCMP_ARCH_S390
473 S390X = libseccomp.SCMP_ARCH_S390X 473 S390X = libseccomp.SCMP_ARCH_S390X
474+ RISCV32 = libseccomp.SCMP_ARCH_RISCV32 474+ RISCV32 = libseccomp.SCMP_ARCH_RISCV32
475 RISCV64 = libseccomp.SCMP_ARCH_RISCV64 475 RISCV64 = libseccomp.SCMP_ARCH_RISCV64
476 476
477 def __cinit__(self, arch=libseccomp.SCMP_ARCH_NATIVE): 477 def __cinit__(self, arch=libseccomp.SCMP_ARCH_NATIVE):
478diff --git a/src/syscalls.c b/src/syscalls.c 478diff --git a/src/syscalls.c b/src/syscalls.c
479index ddb84fa..34e08d9 100644 479index faddff0..15952ce 100644
480--- a/src/syscalls.c 480--- a/src/syscalls.c
481+++ b/src/syscalls.c 481+++ b/src/syscalls.c
482@@ -55,3 +55,4 @@ ARCH_DEF(sh) 482@@ -59,6 +59,7 @@ ARCH_DEF(sh)
483 ARCH_DEF(x32) 483 ARCH_DEF(x32)
484 ARCH_DEF(x86) 484 ARCH_DEF(x86)
485 ARCH_DEF(riscv64) 485 ARCH_DEF(riscv64)
486+ARCH_DEF(riscv32) 486+ARCH_DEF(riscv32)
487diff --git a/src/syscalls.csv b/src/syscalls.csv 487
488index fbd1058..0ee6c15 100644 488 /**
489--- a/src/syscalls.csv 489 * Resolve a syscall name to a number
490+++ b/src/syscalls.csv
491@@ -1,4 +1,4 @@
492-#syscall (v5.12.0-rc7 2021-04-17),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv64,s390,s390x,sh
493+#syscall (v5.12.0-rc7 2021-04-17),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv32,riscv64,s390,s390x,sh
494 accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,PNR,PNR,344
495 accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364,358
496 access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,33,33,33
497diff --git a/src/syscalls.h b/src/syscalls.h 490diff --git a/src/syscalls.h b/src/syscalls.h
498index 4f959af..49887ba 100644 491index 58a788c..c6b5db5 100644
499--- a/src/syscalls.h 492--- a/src/syscalls.h
500+++ b/src/syscalls.h 493+++ b/src/syscalls.h
501@@ -28,6 +28,7 @@ 494@@ -28,6 +28,7 @@
@@ -503,7 +496,7 @@ index 4f959af..49887ba 100644
503 #include "arch-x86.h" 496 #include "arch-x86.h"
504 #include "arch-riscv64.h" 497 #include "arch-riscv64.h"
505+#include "arch-riscv32.h" 498+#include "arch-riscv32.h"
506 499
507 /* NOTE: changes to the arch_syscall_table layout may require changes to the 500 /* NOTE: changes to the arch_syscall_table layout may require changes to the
508 * generate_syscalls_perf.sh and arch-syscall-validate scripts */ 501 * generate_syscalls_perf.sh and arch-syscall-validate scripts */
509@@ -49,6 +50,7 @@ struct arch_syscall_table { 502@@ -49,6 +50,7 @@ struct arch_syscall_table {
@@ -527,7 +520,7 @@ index ae445bf..063e6be 100644
527 break; 520 break;
528 default: 521 default:
529diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c 522diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c
530index 2679270..57092f3 100644 523index c759dd1..fd94dbf 100644
531--- a/tests/15-basic-resolver.c 524--- a/tests/15-basic-resolver.c
532+++ b/tests/15-basic-resolver.c 525+++ b/tests/15-basic-resolver.c
533@@ -45,6 +45,7 @@ unsigned int arch_list[] = { 526@@ -45,6 +45,7 @@ unsigned int arch_list[] = {
@@ -536,8 +529,8 @@ index 2679270..57092f3 100644
536 SCMP_ARCH_PARISC64, 529 SCMP_ARCH_PARISC64,
537+ SCMP_ARCH_RISCV32, 530+ SCMP_ARCH_RISCV32,
538 SCMP_ARCH_RISCV64, 531 SCMP_ARCH_RISCV64,
532 SCMP_ARCH_SH,
539 -1 533 -1
540 };
541diff --git a/tests/16-sim-arch_basic.c b/tests/16-sim-arch_basic.c 534diff --git a/tests/16-sim-arch_basic.c b/tests/16-sim-arch_basic.c
542index 4fcbb5c..662e081 100644 535index 4fcbb5c..662e081 100644
543--- a/tests/16-sim-arch_basic.c 536--- a/tests/16-sim-arch_basic.c
@@ -587,7 +580,7 @@ index 08f030c..ec73224 100644
587+ rc = seccomp_arch_add(ctx, seccomp_arch_resolve_name("riscv32")); 580+ rc = seccomp_arch_add(ctx, seccomp_arch_resolve_name("riscv32"));
588 if (rc != 0) 581 if (rc != 0)
589 goto out; 582 goto out;
590 583
591diff --git a/tests/23-sim-arch_all_le_basic.py b/tests/23-sim-arch_all_le_basic.py 584diff --git a/tests/23-sim-arch_all_le_basic.py b/tests/23-sim-arch_all_le_basic.py
592index 12bb243..1eebc20 100755 585index 12bb243..1eebc20 100755
593--- a/tests/23-sim-arch_all_le_basic.py 586--- a/tests/23-sim-arch_all_le_basic.py
@@ -622,10 +615,10 @@ index 77a5b89..2e860bf 100755
622 "ppc64le", 615 "ppc64le",
623+ "riscv32", 616+ "riscv32",
624 "riscv64"] 617 "riscv64"]
625 618
626 def test_arch(arch, init): 619 def test_arch(arch, init):
627diff --git a/tests/regression b/tests/regression 620diff --git a/tests/regression b/tests/regression
628index 53dab75..2869629 100755 621index d28b848..057ff67 100755
629--- a/tests/regression 622--- a/tests/regression
630+++ b/tests/regression 623+++ b/tests/regression
631@@ -26,7 +26,7 @@ GLBL_ARCH_LE_SUPPORT=" \ 624@@ -26,7 +26,7 @@ GLBL_ARCH_LE_SUPPORT=" \
@@ -644,9 +637,9 @@ index 53dab75..2869629 100755
644+ riscv32 \ 637+ riscv32 \
645 s390 \ 638 s390 \
646 sheb sh" 639 sheb sh"
647 640
648@@ -785,7 +786,7 @@ function run_test_live() { 641@@ -801,7 +802,7 @@ function run_test_live() {
649 642
650 # setup the arch specific return values 643 # setup the arch specific return values
651 case "$arch" in 644 case "$arch" in
652- x86|x86_64|x32|arm|aarch64|parisc|parisc64|ppc|ppc64|ppc64le|ppc|s390|s390x|riscv64|sh|sheb) 645- x86|x86_64|x32|arm|aarch64|parisc|parisc64|ppc|ppc64|ppc64le|ppc|s390|s390x|riscv64|sh|sheb)
@@ -669,10 +662,10 @@ index b6bd2bb..7789970 100644
669 printf("unknown\n"); 662 printf("unknown\n");
670 } 663 }
671diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c 664diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c
672index b95cdeb..49a89c7 100644 665index b682de7..4f759fc 100644
673--- a/tools/scmp_bpf_disasm.c 666--- a/tools/scmp_bpf_disasm.c
674+++ b/tools/scmp_bpf_disasm.c 667+++ b/tools/scmp_bpf_disasm.c
675@@ -510,6 +510,8 @@ int main(int argc, char *argv[]) 668@@ -508,6 +508,8 @@ int main(int argc, char *argv[])
676 arch = AUDIT_ARCH_S390X; 669 arch = AUDIT_ARCH_S390X;
677 else if (strcmp(optarg, "riscv64") == 0) 670 else if (strcmp(optarg, "riscv64") == 0)
678 arch = AUDIT_ARCH_RISCV64; 671 arch = AUDIT_ARCH_RISCV64;
@@ -719,7 +712,7 @@ index 6c2ca33..4d16e38 100644
719@@ -79,6 +79,13 @@ 712@@ -79,6 +79,13 @@
720 #define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 713 #define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
721 #endif /* AUDIT_ARCH_RISCV64 */ 714 #endif /* AUDIT_ARCH_RISCV64 */
722 715
723+#ifndef AUDIT_ARCH_RISCV32 716+#ifndef AUDIT_ARCH_RISCV32
724+#ifndef EM_RISCV 717+#ifndef EM_RISCV
725+#define EM_RISCV 243 718+#define EM_RISCV 243
@@ -728,7 +721,8 @@ index 6c2ca33..4d16e38 100644
728+#endif /* AUDIT_ARCH_RISCV32 */ 721+#endif /* AUDIT_ARCH_RISCV32 */
729+ 722+
730 extern uint32_t arch; 723 extern uint32_t arch;
731 724
732 uint16_t ttoh16(uint32_t arch, uint16_t val); 725 uint16_t ttoh16(uint32_t arch, uint16_t val);
733-- 726--
7342.32.0 7272.33.0
728
diff --git a/meta/recipes-support/libseccomp/files/0002-man-Add-RISCV64-to-arch-list.patch b/meta/recipes-support/libseccomp/files/0002-man-Add-RISCV64-to-arch-list.patch
new file mode 100644
index 0000000000..511d4576fc
--- /dev/null
+++ b/meta/recipes-support/libseccomp/files/0002-man-Add-RISCV64-to-arch-list.patch
@@ -0,0 +1,28 @@
1From e016ce3949caf34ee0f8fc6d976c52eb2fb019ce Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 28 Jul 2021 11:03:24 -0700
4Subject: [PATCH 2/4] man: Add RISCV64 to arch list
5
6Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 doc/man/man1/scmp_sys_resolver.1 | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/doc/man/man1/scmp_sys_resolver.1 b/doc/man/man1/scmp_sys_resolver.1
14index fc68d18..74d8a8a 100644
15--- a/doc/man/man1/scmp_sys_resolver.1
16+++ b/doc/man/man1/scmp_sys_resolver.1
17@@ -36,7 +36,7 @@ The architecture to use for resolving the system call. Valid
18 .I ARCH
19 values are "x86", "x86_64", "x32", "arm", "aarch64", "mips", "mipsel", "mips64",
20 "mipsel64", "mips64n32", "mipsel64n32", "parisc", "parisc64", "ppc", "ppc64",
21-"ppc64le", "riscv32", "s390", "s390x", "sheb" and "sh".
22+"ppc64le", "riscv64", "riscv32", "s390", "s390x", "sheb" and "sh".
23 .TP
24 .B \-t
25 If necessary, translate the system call name to the proper system call number,
26--
272.33.0
28
diff --git a/meta/recipes-support/libseccomp/files/0002-Regenerate-syscall-cvs-file-from-5.13-rc5-kernel.patch b/meta/recipes-support/libseccomp/files/0003-syscalls-update-the-syscall-defs-for-Linux-v5.15.0-r.patch
index 7ca861a7b2..150d9bd3a7 100644
--- a/meta/recipes-support/libseccomp/files/0002-Regenerate-syscall-cvs-file-from-5.13-rc5-kernel.patch
+++ b/meta/recipes-support/libseccomp/files/0003-syscalls-update-the-syscall-defs-for-Linux-v5.15.0-r.patch
@@ -1,46 +1,22 @@
1From ee4aba3f59b4bf52a74cb3917e64c704250de8ef Mon Sep 17 00:00:00 2001 1From 54d8136679f4a1238397f7b7a8b3e8cf4626f018 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Jun 2021 20:42:19 -0700 3Date: Thu, 30 Sep 2021 21:35:15 -0700
4Subject: [PATCH 2/2] Regenerate syscall cvs file from 5.13-rc5 kernel 4Subject: [PATCH 3/4] syscalls: update the syscall defs for Linux v5.15.0-rc3
5 5
6Include RISCV32 arch as well
6Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327] 7Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327]
8
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- 10---
9 include/seccomp-syscalls.h | 7 + 11 src/syscalls.csv | 959 ++++++++++++++++++++++++-----------------------
10 src/syscalls.csv | 952 +++++++++++++++++++------------------ 12 1 file changed, 480 insertions(+), 479 deletions(-)
11 2 files changed, 485 insertions(+), 474 deletions(-)
12
13diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h
14index c6ea5ca..b7651bf 100644
15--- a/include/seccomp-syscalls.h
16+++ b/include/seccomp-syscalls.h
17@@ -282,6 +282,7 @@
18 #define __PNR_clock_gettime -10248
19 #define __PNR_clock_nanosleep -10249
20 #define __PNR_gettimeofday -10250
21+#define __PNR_quotactl_path -10251
22 13
23 /*
24 * libseccomp syscall definitions
25@@ -1547,6 +1548,12 @@
26 #define __SNR_riscv_flush_icache __PNR_riscv_flush_icache
27 #endif
28
29+#ifdef __NR_quotactl_path
30+#define __SNR_quotactl_path __NR_quotactl_path
31+#else
32+#define __SNR_quotactl_path __PNR_quotactl_path
33+#endif
34+
35 #ifdef __NR_rmdir
36 #define __SNR_rmdir __NR_rmdir
37 #else
38diff --git a/src/syscalls.csv b/src/syscalls.csv 14diff --git a/src/syscalls.csv b/src/syscalls.csv
39index 0ee6c15..eec8d21 100644 15index 5bd0c9f..37ddb3d 100644
40--- a/src/syscalls.csv 16--- a/src/syscalls.csv
41+++ b/src/syscalls.csv 17+++ b/src/syscalls.csv
42@@ -1,474 +1,478 @@ 18@@ -1,479 +1,480 @@
43-#syscall (v5.12.0-rc7 2021-04-17),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv32,riscv64,s390,s390x,sh 19-#syscall (v5.14.0-rc7 2021-08-23),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv64,s390,s390x,sh
44-accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,PNR,PNR,344 20-accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,PNR,PNR,344
45-accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364,358 21-accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,364,364,358
46-access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,33,33,33 22-access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,33,33,33
@@ -210,6 +186,9 @@ index 0ee6c15..eec8d21 100644
210-kexec_load,283,246,528,347,104,311,270,274,300,300,268,268,104,277,277,283 186-kexec_load,283,246,528,347,104,311,270,274,300,300,268,268,104,277,277,283
211-keyctl,288,250,250,311,219,282,241,245,266,266,271,271,219,280,280,287 187-keyctl,288,250,250,311,219,282,241,245,266,266,271,271,219,280,280,287
212-kill,37,62,62,37,129,37,60,60,37,37,37,37,129,37,37,37 188-kill,37,62,62,37,129,37,60,60,37,37,37,37,129,37,37,37
189-landlock_add_rule,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445
190-landlock_create_ruleset,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444
191-landlock_restrict_self,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446
213-lchown,16,94,94,16,PNR,16,92,92,16,16,16,16,PNR,16,198,16 192-lchown,16,94,94,16,PNR,16,92,92,16,16,16,16,PNR,16,198,16
214-lchown32,198,PNR,PNR,198,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,198,PNR,198 193-lchown32,198,PNR,PNR,198,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,198,PNR,198
215-lgetxattr,230,192,192,230,9,228,184,184,242,242,213,213,9,228,228,230 194-lgetxattr,230,192,192,230,9,228,184,184,242,242,213,213,9,228,228,230
@@ -230,6 +209,7 @@ index 0ee6c15..eec8d21 100644
230-mbind,274,237,237,319,235,268,227,231,260,260,259,259,235,268,268,274 209-mbind,274,237,237,319,235,268,227,231,260,260,259,259,235,268,268,274
231-membarrier,375,324,324,389,283,358,318,322,343,343,365,365,283,356,356,378 210-membarrier,375,324,324,389,283,358,318,322,343,343,365,365,283,356,356,378
232-memfd_create,356,319,319,385,279,354,314,318,340,340,360,360,279,350,350,374 211-memfd_create,356,319,319,385,279,354,314,318,340,340,360,360,279,350,350,374
212-memfd_secret,447,447,447,PNR,447,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR
233-migrate_pages,294,256,256,400,238,287,246,250,272,272,258,258,238,287,287,294 213-migrate_pages,294,256,256,400,238,287,246,250,272,272,258,258,238,287,287,294
234-mincore,218,27,27,219,232,217,26,26,72,72,206,206,232,218,218,218 214-mincore,218,27,27,219,232,217,26,26,72,72,206,206,232,218,218,218
235-mkdir,39,83,83,39,PNR,39,81,81,39,39,39,39,PNR,39,39,39 215-mkdir,39,83,83,39,PNR,39,81,81,39,39,39,39,PNR,39,39,39
@@ -319,6 +299,7 @@ index 0ee6c15..eec8d21 100644
319-pwritev2,379,328,547,393,287,362,322,326,348,348,381,381,287,377,377,382 299-pwritev2,379,328,547,393,287,362,322,326,348,348,381,381,287,377,377,382
320-query_module,167,178,PNR,PNR,PNR,187,171,171,PNR,PNR,166,166,PNR,167,167,PNR 300-query_module,167,178,PNR,PNR,PNR,187,171,171,PNR,PNR,166,166,PNR,167,167,PNR
321-quotactl,131,179,179,131,60,131,172,172,131,131,131,131,60,131,131,131 301-quotactl,131,179,179,131,60,131,172,172,131,131,131,131,60,131,131,131
302-quotactl_fd,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443
322-read,3,0,0,3,63,3,0,0,3,3,3,3,63,3,3,3 303-read,3,0,0,3,63,3,0,0,3,3,3,3,63,3,3,3
323-readahead,225,187,187,225,213,223,179,179,207,207,191,191,213,222,222,225 304-readahead,225,187,187,225,213,223,179,179,207,207,191,191,213,222,222,225
324-readdir,89,PNR,PNR,PNR,PNR,89,PNR,PNR,PNR,PNR,89,89,PNR,89,89,89 305-readdir,89,PNR,PNR,PNR,PNR,89,PNR,PNR,PNR,PNR,89,89,PNR,89,89,89
@@ -514,7 +495,7 @@ index 0ee6c15..eec8d21 100644
514-waitpid,7,PNR,PNR,PNR,PNR,7,PNR,PNR,7,7,7,7,PNR,PNR,PNR,7 495-waitpid,7,PNR,PNR,PNR,PNR,7,PNR,PNR,7,7,7,7,PNR,PNR,PNR,7
515-write,4,1,1,4,64,4,1,1,4,4,4,4,64,4,4,4 496-write,4,1,1,4,64,4,1,1,4,4,4,4,64,4,4,4
516-writev,146,20,516,146,66,146,19,19,146,146,146,146,66,146,146,146 497-writev,146,20,516,146,66,146,19,19,146,146,146,146,66,146,146,146
517+#syscall (v5.13.0-rc5 2021-06-09),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv32,riscv64,s390,s390x,sh 498+#syscall (v5.15.0-rc3 2021-10-01),x86,x86_64,x32,arm,aarch64,mips,mips64,mips64n32,parisc,parisc64,ppc,ppc64,riscv32,riscv64,s390,s390x,sh
518+accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,202,PNR,PNR,344 499+accept,PNR,43,43,285,202,168,42,42,35,35,330,330,202,202,PNR,PNR,344
519+accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,242,364,364,358 500+accept4,364,288,288,366,242,334,293,297,320,320,344,344,242,242,364,364,358
520+access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,PNR,33,33,33 501+access,33,21,21,33,PNR,33,20,20,33,33,33,33,PNR,PNR,33,33,33
@@ -707,6 +688,7 @@ index 0ee6c15..eec8d21 100644
707+mbind,274,237,237,319,235,268,227,231,260,260,259,259,235,235,268,268,274 688+mbind,274,237,237,319,235,268,227,231,260,260,259,259,235,235,268,268,274
708+membarrier,375,324,324,389,283,358,318,322,343,343,365,365,283,283,356,356,378 689+membarrier,375,324,324,389,283,358,318,322,343,343,365,365,283,283,356,356,378
709+memfd_create,356,319,319,385,279,354,314,318,340,340,360,360,279,279,350,350,374 690+memfd_create,356,319,319,385,279,354,314,318,340,340,360,360,279,279,350,350,374
691+memfd_secret,447,447,447,PNR,447,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR,PNR
710+migrate_pages,294,256,256,400,238,287,246,250,272,272,258,258,238,238,287,287,294 692+migrate_pages,294,256,256,400,238,287,246,250,272,272,258,258,238,238,287,287,294
711+mincore,218,27,27,219,232,217,26,26,72,72,206,206,232,232,218,218,218 693+mincore,218,27,27,219,232,217,26,26,72,72,206,206,232,232,218,218,218
712+mkdir,39,83,83,39,PNR,39,81,81,39,39,39,39,PNR,PNR,39,39,39 694+mkdir,39,83,83,39,PNR,39,81,81,39,39,39,39,PNR,PNR,39,39,39
@@ -783,6 +765,7 @@ index 0ee6c15..eec8d21 100644
783+preadv2,378,327,546,392,286,361,321,325,347,347,380,380,286,286,376,376,381 765+preadv2,378,327,546,392,286,361,321,325,347,347,380,380,286,286,376,376,381
784+prlimit64,340,302,302,369,261,338,297,302,321,321,325,325,261,261,334,334,339 766+prlimit64,340,302,302,369,261,338,297,302,321,321,325,325,261,261,334,334,339
785+process_madvise,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440 767+process_madvise,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440
768+process_mrelease,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448
786+process_vm_readv,347,310,539,376,270,345,304,309,330,330,351,351,270,270,340,340,365 769+process_vm_readv,347,310,539,376,270,345,304,309,330,330,351,351,270,270,340,340,365
787+process_vm_writev,348,311,540,377,271,346,305,310,331,331,352,352,271,271,341,341,366 770+process_vm_writev,348,311,540,377,271,346,305,310,331,331,352,352,271,271,341,341,366
788+prof,44,PNR,PNR,PNR,PNR,44,PNR,PNR,PNR,PNR,44,44,PNR,PNR,PNR,PNR,PNR 771+prof,44,PNR,PNR,PNR,PNR,44,PNR,PNR,PNR,PNR,44,44,PNR,PNR,PNR,PNR,PNR
@@ -796,7 +779,7 @@ index 0ee6c15..eec8d21 100644
796+pwritev2,379,328,547,393,287,362,322,326,348,348,381,381,287,287,377,377,382 779+pwritev2,379,328,547,393,287,362,322,326,348,348,381,381,287,287,377,377,382
797+query_module,167,178,PNR,PNR,PNR,187,171,171,PNR,PNR,166,166,PNR,PNR,167,167,PNR 780+query_module,167,178,PNR,PNR,PNR,187,171,171,PNR,PNR,166,166,PNR,PNR,167,167,PNR
798+quotactl,131,179,179,131,60,131,172,172,131,131,131,131,60,60,131,131,131 781+quotactl,131,179,179,131,60,131,172,172,131,131,131,131,60,60,131,131,131
799+quotactl_path,PNR,PNR,PNR,PNR,443,PNR,PNR,PNR,PNR,PNR,PNR,PNR,443,443,PNR,PNR,PNR 782+quotactl_fd,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443
800+read,3,0,0,3,63,3,0,0,3,3,3,3,63,63,3,3,3 783+read,3,0,0,3,63,3,0,0,3,3,3,3,63,63,3,3,3
801+readahead,225,187,187,225,213,223,179,179,207,207,191,191,213,213,222,222,225 784+readahead,225,187,187,225,213,223,179,179,207,207,191,191,213,213,222,222,225
802+readdir,89,PNR,PNR,PNR,PNR,89,PNR,PNR,PNR,PNR,89,89,PNR,PNR,89,89,89 785+readdir,89,PNR,PNR,PNR,PNR,89,PNR,PNR,PNR,PNR,89,89,PNR,PNR,89,89,89
@@ -992,5 +975,6 @@ index 0ee6c15..eec8d21 100644
992+waitpid,7,PNR,PNR,PNR,PNR,7,PNR,PNR,7,7,7,7,PNR,PNR,PNR,PNR,7 975+waitpid,7,PNR,PNR,PNR,PNR,7,PNR,PNR,7,7,7,7,PNR,PNR,PNR,PNR,7
993+write,4,1,1,4,64,4,1,1,4,4,4,4,64,64,4,4,4 976+write,4,1,1,4,64,4,1,1,4,4,4,4,64,64,4,4,4
994+writev,146,20,516,146,66,146,19,19,146,146,146,146,66,66,146,146,146 977+writev,146,20,516,146,66,146,19,19,146,146,146,146,66,66,146,146,146
995-- 978--
9962.32.0 9792.33.0
980
diff --git a/meta/recipes-support/libseccomp/files/0004-syscalls-Add-quotactl_path.patch b/meta/recipes-support/libseccomp/files/0004-syscalls-Add-quotactl_path.patch
new file mode 100644
index 0000000000..bedf74844e
--- /dev/null
+++ b/meta/recipes-support/libseccomp/files/0004-syscalls-Add-quotactl_path.patch
@@ -0,0 +1,40 @@
1From d59e03b5a82b3e0debc3a3c77270bd160f4309f9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Jun 2021 20:42:19 -0700
4Subject: [PATCH 4/4] syscalls: Add quotactl_path
5
6Upstream-Status: Submitted [https://github.com/seccomp/libseccomp/pull/327]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 include/seccomp-syscalls.h | 7 +++++++
11 1 file changed, 7 insertions(+)
12
13diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h
14index 4ff814c..dd347d3 100644
15--- a/include/seccomp-syscalls.h
16+++ b/include/seccomp-syscalls.h
17@@ -284,6 +284,7 @@
18 #define __PNR_clock_nanosleep -10250
19 #define __PNR_gettimeofday -10251
20 #define __PNR_fcntl -10252
21+#define __PNR_quotactl_path -10253
22
23 /*
24 * libseccomp syscall definitions
25@@ -1557,6 +1558,12 @@
26 #define __SNR_riscv_flush_icache __PNR_riscv_flush_icache
27 #endif
28
29+#ifdef __NR_quotactl_path
30+#define __SNR_quotactl_path __NR_quotactl_path
31+#else
32+#define __SNR_quotactl_path __PNR_quotactl_path
33+#endif
34+
35 #ifdef __NR_rmdir
36 #define __SNR_rmdir __NR_rmdir
37 #else
38--
392.33.0
40
diff --git a/meta/recipes-support/libseccomp/libseccomp_2.5.1.bb b/meta/recipes-support/libseccomp/libseccomp_2.5.2.bb
index 74bface4a1..3ec6f135c5 100644
--- a/meta/recipes-support/libseccomp/libseccomp_2.5.1.bb
+++ b/meta/recipes-support/libseccomp/libseccomp_2.5.2.bb
@@ -8,12 +8,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c
8DEPENDS += "gperf-native" 8DEPENDS += "gperf-native"
9 9
10PV .= "+git${SRCPV}" 10PV .= "+git${SRCPV}"
11SRCREV = "5822e50c2920ce597d038077dea4a0eedf193f86" 11SRCREV = "2457dec1a90101d720e89e8027376742e2f3c327"
12 12
13SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=main \ 13SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=main \
14 file://0001-configure.ac-Bump-version-to-2.5.99.patch \ 14 file://0001-configure.ac-Bump-version-to-2.5.99.patch \
15 file://0001-arch-Add-riscv32-architecture-support.patch \ 15 file://0001-arch-Add-riscv32-architecture-support.patch \
16 file://0002-Regenerate-syscall-cvs-file-from-5.13-rc5-kernel.patch \ 16 file://0002-man-Add-RISCV64-to-arch-list.patch \
17 file://0003-syscalls-update-the-syscall-defs-for-Linux-v5.15.0-r.patch \
18 file://0004-syscalls-Add-quotactl_path.patch \
17 file://run-ptest \ 19 file://run-ptest \
18 " 20 "
19 21