Merge ~paelzer/ubuntu/+source/libseccomp:lp-1755250-add-statx into ubuntu/+source/libseccomp:ubuntu/bionic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: a43676bfbc622ab3e1feb39c788ee5f9dface526
Merge reported by: Christian Ehrhardt 
Merged at revision: a43676bfbc622ab3e1feb39c788ee5f9dface526
Proposed branch: ~paelzer/ubuntu/+source/libseccomp:lp-1755250-add-statx
Merge into: ubuntu/+source/libseccomp:ubuntu/bionic-devel
Diff against target: 1499 lines (+1460/-0)
6 files modified
debian/changelog (+7/-0)
debian/patches/lp-1755250-add-the-statx-syscall.patch (+308/-0)
debian/patches/lp-1815415-arch-update-syscalls-for-Linux-4.9.patch (+536/-0)
debian/patches/lp-1815415-arch-update-syscalls-for-Linux-v4.15.patch (+499/-0)
debian/patches/lp-1815415-update-the-syscall-tables-to-4.10.patch (+106/-0)
debian/patches/series (+4/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
xantares (community) Approve
Seth Arnold (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+362906@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Build is fine in PPA [1]
Tests are funning (not completed yet) in Bileto ticket [2]

I have added test instructions for the case to the Bugs SRU Template

For the sake of the "sec" in libseccomp I'd want a review by the security team as well this time - so adding a review slot for them.

Furthermore I polished and modified the sugegsted patch (headers) so I'd like an ack fromt he reporter as well - adding that.

[1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3640
[2]: https://bileto.ubuntu.com/#/ticket/3640

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Tyler and I took a look at this patch and thought it looked good.

We also thought that a similar patch should be included at the same time:

https://github.com/seccomp/libseccomp/commit/c842c2f6c203ad9da37ca60219172aa0be68d26a

If we're going to go through the work of validating a new version, now would be a good time to bring these in as well.

(I don't know if that means the review result should be Approve, because there's nothing wrong here, or Needs Fixing, because we'd also like a bit more work to be done. Sorry.)

Thanks

review: Approve
Revision history for this message
xantares (xantares09) wrote :
review: Approve
77e9482... by Christian Ehrhardt 

- d/p/lp-1815415-*: Add syscalls up to kernel 4.15 (LP: #1815415)

Signed-off-by: Christian Ehrhardt <email address hidden>

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

As requested by Seth/Tyler I also spawned bug 1815415 to include also the other syscalls until 4.15 as well (that is the latest in upstream libseccomp and what Bionic was released with).

I pushed this now to the branch that is on the MP here as well as the PPA that we test from.
The testcase I had from xantares still works fine for me with this new version.

I'd therefore ask Seth/Tyler for a re-review and furthermore hope they have some input on [1] to help verifying this when it becomes an SRU update in -proposed.

[1]: https://bugs.launchpad.net/ubuntu/+source/libseccomp/+bug/1815415/comments/2

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Little benefit: as the series of changes is now complete all patches apply as-is without any backporting noise :-)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI - Autopkgtest sniff tests are good in [1] except the known flaky systemd tests.

[1]: https://bileto.ubuntu.com/excuses/3640/bionic.html

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Patches match upstream, good dep3 headers.

I just wonder about the bionic version you chose: 2.3.1-2.1ubuntu5

Shouldn't that have been 2.3.1-2.1ubuntu4.1 instead?

If yes, easy change. If no, you know what you are doing :)

preemptive +1

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

All pre-checks and tests complete, and uploaded to the SRU review queue

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ebc9a74..b08702c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+libseccomp (2.3.1-2.1ubuntu5) bionic; urgency=medium
7+
8+ * d/p/lp-1755250-add-the-statx-syscall.patch: add statx support (LP: #1755250)
9+ * d/p/lp-1815415-*: Add syscalls up to kernel 4.15 (LP: #1815415)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 08 Feb 2019 09:17:23 +0100
12+
13 libseccomp (2.3.1-2.1ubuntu4) bionic; urgency=medium
14
15 * debian/tests/data/open.fail_filter: The libseccomp autopkgtests were
16diff --git a/debian/patches/lp-1755250-add-the-statx-syscall.patch b/debian/patches/lp-1755250-add-the-statx-syscall.patch
17new file mode 100644
18index 0000000..3bda165
19--- /dev/null
20+++ b/debian/patches/lp-1755250-add-the-statx-syscall.patch
21@@ -0,0 +1,308 @@
22+From 4793ea990ea80ee26ed63e2a20723fdb417abf5b Mon Sep 17 00:00:00 2001
23+From: Tobias Klauser <tklauser@distanz.ch>
24+Date: Fri, 20 Oct 2017 09:39:40 +0200
25+Subject: [PATCH] arch: add the statx syscall
26+
27+Fixes #88
28+
29+Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
30+[PM: fixed the incorrect x32 definition]
31+Signed-off-by: Paul Moore <paul@paul-moore.com>
32+
33+Origin: upstream, https://github.com/seccomp/libseccomp/commit/4793ea990ea80ee26ed63e2a20723fdb417abf5b
34+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1755250
35+Last-Update: 2019-02-10
36+
37+
38+---
39+ src/arch-aarch64-syscalls.c | 3 ++-
40+ src/arch-arm-syscalls.c | 3 ++-
41+ src/arch-mips-syscalls.c | 3 ++-
42+ src/arch-mips64-syscalls.c | 3 ++-
43+ src/arch-mips64n32-syscalls.c | 3 ++-
44+ src/arch-parisc-syscalls.c | 3 ++-
45+ src/arch-ppc-syscalls.c | 3 ++-
46+ src/arch-ppc64-syscalls.c | 3 ++-
47+ src/arch-s390-syscalls.c | 3 ++-
48+ src/arch-s390x-syscalls.c | 3 ++-
49+ src/arch-x32-syscalls.c | 3 ++-
50+ src/arch-x86-syscalls.c | 3 ++-
51+ src/arch-x86_64-syscalls.c | 3 ++-
52+ 13 files changed, 26 insertions(+), 13 deletions(-)
53+
54+diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
55+index d907182..157aedc 100644
56+--- a/src/arch-aarch64-syscalls.c
57++++ b/src/arch-aarch64-syscalls.c
58+@@ -26,7 +26,7 @@
59+ #include "arch.h"
60+ #include "arch-aarch64.h"
61+
62+-/* NOTE: based on Linux 4.10-rc6+ */
63++/* NOTE: based on Linux 4.14 */
64+ const struct arch_syscall_def aarch64_syscall_table[] = { \
65+ { "_llseek", __PNR__llseek },
66+ { "_newselect", __PNR__newselect },
67+@@ -392,6 +392,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
68+ { "stat64", __PNR_stat64 },
69+ { "statfs", 43 },
70+ { "statfs64", __PNR_statfs64 },
71++ { "statx", 291 },
72+ { "stime", __PNR_stime },
73+ { "stty", __PNR_stty },
74+ { "subpage_prot", __PNR_subpage_prot },
75+diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
76+index 6f40caa..43e2cc5 100644
77+--- a/src/arch-arm-syscalls.c
78++++ b/src/arch-arm-syscalls.c
79+@@ -37,7 +37,7 @@
80+ #define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE
81+ #endif
82+
83+-/* NOTE: based on Linux 4.9 */
84++/* NOTE: based on Linux 4.14 */
85+ const struct arch_syscall_def arm_syscall_table[] = { \
86+ /* NOTE: arm_sync_file_range() and sync_file_range2() share values */
87+ { "_llseek", (__SCMP_NR_BASE + 140) },
88+@@ -404,6 +404,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
89+ { "stat64", (__SCMP_NR_BASE + 195) },
90+ { "statfs", (__SCMP_NR_BASE + 99) },
91+ { "statfs64", (__SCMP_NR_BASE + 266) },
92++ { "statx", (__SCMP_NR_BASE + 397) },
93+ { "stime", __PNR_stime },
94+ { "stty", __PNR_stty },
95+ { "subpage_prot", __PNR_subpage_prot },
96+diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
97+index e53f565..a5264c8 100644
98+--- a/src/arch-mips-syscalls.c
99++++ b/src/arch-mips-syscalls.c
100+@@ -30,7 +30,7 @@
101+ /* O32 ABI */
102+ #define __SCMP_NR_BASE 4000
103+
104+-/* NOTE: based on Linux 4.9 */
105++/* NOTE: based on Linux 4.14 */
106+ const struct arch_syscall_def mips_syscall_table[] = { \
107+ { "_llseek", (__SCMP_NR_BASE + 140) },
108+ { "_newselect", (__SCMP_NR_BASE + 142) },
109+@@ -396,6 +396,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
110+ { "stat64", (__SCMP_NR_BASE + 213) },
111+ { "statfs", (__SCMP_NR_BASE + 99) },
112+ { "statfs64", (__SCMP_NR_BASE + 255) },
113++ { "statx", (__SCMP_NR_BASE + 366) },
114+ { "stime", (__SCMP_NR_BASE + 25) },
115+ { "stty", (__SCMP_NR_BASE + 31) },
116+ { "subpage_prot", __PNR_subpage_prot },
117+diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c
118+index 248acaf..bc16b1d 100644
119+--- a/src/arch-mips64-syscalls.c
120++++ b/src/arch-mips64-syscalls.c
121+@@ -30,7 +30,7 @@
122+ /* 64 ABI */
123+ #define __SCMP_NR_BASE 5000
124+
125+-/* NOTE: based on Linux 4.9 */
126++/* NOTE: based on Linux 4.14 */
127+ const struct arch_syscall_def mips64_syscall_table[] = { \
128+ { "_llseek", __PNR__llseek },
129+ { "_newselect", (__SCMP_NR_BASE + 22) },
130+@@ -396,6 +396,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
131+ { "stat64", __PNR_stat64 },
132+ { "statfs", (__SCMP_NR_BASE + 134) },
133+ { "statfs64", __PNR_statfs64 },
134++ { "statx", (__SCMP_NR_BASE + 326) },
135+ { "stime", __PNR_stime },
136+ { "stty", __PNR_stty },
137+ { "subpage_prot", __PNR_subpage_prot },
138+diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c
139+index 1525f8b..fa89bc2 100644
140+--- a/src/arch-mips64n32-syscalls.c
141++++ b/src/arch-mips64n32-syscalls.c
142+@@ -30,7 +30,7 @@
143+ /* N32 ABI */
144+ #define __SCMP_NR_BASE 6000
145+
146+-/* NOTE: based on Linux 4.9 */
147++/* NOTE: based on Linux 4.14 */
148+ const struct arch_syscall_def mips64n32_syscall_table[] = { \
149+ { "_llseek", __PNR__llseek },
150+ { "_newselect", (__SCMP_NR_BASE + 22) },
151+@@ -396,6 +396,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
152+ { "stat64", __PNR_stat64 },
153+ { "statfs", (__SCMP_NR_BASE + 134) },
154+ { "statfs64", (__SCMP_NR_BASE + 217) },
155++ { "statx", (__SCMP_NR_BASE + 330) },
156+ { "stime", __PNR_stime },
157+ { "stty", __PNR_stty },
158+ { "subpage_prot", __PNR_subpage_prot },
159+diff --git a/src/arch-parisc-syscalls.c b/src/arch-parisc-syscalls.c
160+index 153c112..7e9d9ab 100644
161+--- a/src/arch-parisc-syscalls.c
162++++ b/src/arch-parisc-syscalls.c
163+@@ -10,7 +10,7 @@
164+ #include "arch.h"
165+ #include "arch-parisc.h"
166+
167+-/* NOTE: based on Linux 4.9 */
168++/* NOTE: based on Linux 4.14 */
169+ const struct arch_syscall_def parisc_syscall_table[] = { \
170+ { "_llseek", 140 },
171+ { "_newselect", 142 },
172+@@ -376,6 +376,7 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
173+ { "stat64", 101 },
174+ { "statfs", 99 },
175+ { "statfs64", 298 },
176++ { "statx", 349 },
177+ { "stime", 25 },
178+ { "stty", __PNR_stty },
179+ { "subpage_prot", __PNR_subpage_prot },
180+diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
181+index c117da9..fe0cdfb 100644
182+--- a/src/arch-ppc-syscalls.c
183++++ b/src/arch-ppc-syscalls.c
184+@@ -27,7 +27,7 @@
185+ #include "arch.h"
186+ #include "arch-ppc.h"
187+
188+-/* NOTE: based on Linux 4.10-rc6+ */
189++/* NOTE: based on Linux 4.14 */
190+ const struct arch_syscall_def ppc_syscall_table[] = { \
191+ { "_llseek", 140 },
192+ { "_newselect", 142 },
193+@@ -393,6 +393,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
194+ { "stat64", 195 },
195+ { "statfs", 99 },
196+ { "statfs64", 252 },
197++ { "statx", 383},
198+ { "stime", 25 },
199+ { "stty", 31 },
200+ { "subpage_prot", 310 },
201+diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
202+index bbd5876..dc09610 100644
203+--- a/src/arch-ppc64-syscalls.c
204++++ b/src/arch-ppc64-syscalls.c
205+@@ -27,7 +27,7 @@
206+ #include "arch.h"
207+ #include "arch-ppc64.h"
208+
209+-/* NOTE: based on Linux 4.10-rc6+ */
210++/* NOTE: based on Linux 4.14 */
211+ const struct arch_syscall_def ppc64_syscall_table[] = { \
212+ { "_llseek", 140 },
213+ { "_newselect", 142 },
214+@@ -393,6 +393,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
215+ { "stat64", __PNR_stat64 },
216+ { "statfs", 99 },
217+ { "statfs64", 252 },
218++ { "statx", 383},
219+ { "stime", 25 },
220+ { "stty", 31 },
221+ { "subpage_prot", 310 },
222+diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c
223+index 959b42f..8a6cecc 100644
224+--- a/src/arch-s390-syscalls.c
225++++ b/src/arch-s390-syscalls.c
226+@@ -10,7 +10,7 @@
227+ #include "arch.h"
228+ #include "arch-s390.h"
229+
230+-/* NOTE: based on Linux 4.9 */
231++/* NOTE: based on Linux 4.14 */
232+ const struct arch_syscall_def s390_syscall_table[] = { \
233+ { "_llseek", 140 },
234+ { "_newselect", 142 },
235+@@ -376,6 +376,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \
236+ { "stat64", 195 },
237+ { "statfs", 99 },
238+ { "statfs64", 265 },
239++ { "statx", 379 },
240+ { "stime", 25 },
241+ { "stty", __PNR_stty },
242+ { "subpage_prot", __PNR_subpage_prot },
243+diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c
244+index f6a2759..728dfc4 100644
245+--- a/src/arch-s390x-syscalls.c
246++++ b/src/arch-s390x-syscalls.c
247+@@ -10,7 +10,7 @@
248+ #include "arch.h"
249+ #include "arch-s390x.h"
250+
251+-/* NOTE: based on Linux 4.9 */
252++/* NOTE: based on Linux 4.14 */
253+ const struct arch_syscall_def s390x_syscall_table[] = { \
254+ { "_llseek", __PNR__llseek },
255+ { "_newselect", __PNR__newselect },
256+@@ -376,6 +376,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
257+ { "stat64", __PNR_stat64 },
258+ { "statfs", 99 },
259+ { "statfs64", 265 },
260++ { "statx", 379 },
261+ { "stime", __PNR_stime },
262+ { "stty", __PNR_stty },
263+ { "subpage_prot", __PNR_subpage_prot },
264+diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c
265+index 64e180a..bb3e077 100644
266+--- a/src/arch-x32-syscalls.c
267++++ b/src/arch-x32-syscalls.c
268+@@ -26,7 +26,7 @@
269+ #include "arch.h"
270+ #include "arch-x32.h"
271+
272+-/* NOTE: based on Linux 4.5-rc4 */
273++/* NOTE: based on Linux 4.14 */
274+ const struct arch_syscall_def x32_syscall_table[] = { \
275+ { "_llseek", __PNR__llseek },
276+ { "_newselect", __PNR__newselect },
277+@@ -392,6 +392,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
278+ { "stat64", __PNR_stat64 },
279+ { "statfs", (X32_SYSCALL_BIT + 137) },
280+ { "statfs64", __PNR_statfs64 },
281++ { "statx", (X32_SYSCALL_BIT + 332) },
282+ { "stime", __PNR_stime },
283+ { "stty", __PNR_stty },
284+ { "subpage_prot", __PNR_subpage_prot },
285+diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
286+index 5443095..81a52a3 100644
287+--- a/src/arch-x86-syscalls.c
288++++ b/src/arch-x86-syscalls.c
289+@@ -26,7 +26,7 @@
290+ #include "arch.h"
291+ #include "arch-x86.h"
292+
293+-/* NOTE: based on Linux 4.9 */
294++/* NOTE: based on Linux 4.14 */
295+ const struct arch_syscall_def x86_syscall_table[] = { \
296+ { "_llseek", 140 },
297+ { "_newselect", 142 },
298+@@ -392,6 +392,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
299+ { "stat64", 195 },
300+ { "statfs", 99 },
301+ { "statfs64", 268 },
302++ { "statx", 383 },
303+ { "stime", 25 },
304+ { "stty", 31 },
305+ { "subpage_prot", __PNR_subpage_prot },
306+diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
307+index 6c389b8..1da2530 100644
308+--- a/src/arch-x86_64-syscalls.c
309++++ b/src/arch-x86_64-syscalls.c
310+@@ -26,7 +26,7 @@
311+ #include "arch.h"
312+ #include "arch-x86_64.h"
313+
314+-/* NOTE: based on Linux 4.9 */
315++/* NOTE: based on Linux 4.14 */
316+ const struct arch_syscall_def x86_64_syscall_table[] = { \
317+ { "_llseek", __PNR__llseek },
318+ { "_newselect", __PNR__newselect },
319+@@ -392,6 +392,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
320+ { "stat64", __PNR_stat64 },
321+ { "statfs", 137 },
322+ { "statfs64", __PNR_statfs64 },
323++ { "statx", 332 },
324+ { "stime", __PNR_stime },
325+ { "stty", __PNR_stty },
326+ { "subpage_prot", __PNR_subpage_prot },
327+--
328+2.17.1
329+
330diff --git a/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-4.9.patch b/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-4.9.patch
331new file mode 100644
332index 0000000..47d66ec
333--- /dev/null
334+++ b/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-4.9.patch
335@@ -0,0 +1,536 @@
336+From d9102f12fd39bd77151a1f630fcfc8c80f86c55c Mon Sep 17 00:00:00 2001
337+From: Justin Cormack <justin.cormack@docker.com>
338+Date: Mon, 26 Dec 2016 17:59:12 +0000
339+Subject: [PATCH] arch: update syscalls for Linux 4.9
340+
341+Add support for the following syscalls added in Linux v4.9:
342+
343+- preadv2 and pwritev2
344+- pkey_mprotect, pkey_alloc, pkey_free
345+
346+Signed-off-by: Justin Cormack <justin.cormack@docker.com>
347+[PM: update subject line, description, and some whitespace]
348+Signed-off-by: Paul Moore <paul@paul-moore.com>
349+
350+Origin: upstream, https://github.com/seccomp/libseccomp/commit/d9102f12fd39bd77151a1f630fcfc8c80f86c55c
351+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1815415
352+Last-Update: 2019-02-10
353+
354+---
355+ include/seccomp.h.in | 15 +++++++++++++++
356+ src/arch-aarch64-syscalls.c | 7 ++++++-
357+ src/arch-arm-syscalls.c | 7 ++++++-
358+ src/arch-mips-syscalls.c | 7 ++++++-
359+ src/arch-mips64-syscalls.c | 7 ++++++-
360+ src/arch-mips64n32-syscalls.c | 7 ++++++-
361+ src/arch-parisc-syscalls.c | 7 ++++++-
362+ src/arch-ppc-syscalls.c | 7 ++++++-
363+ src/arch-ppc64-syscalls.c | 7 ++++++-
364+ src/arch-s390-syscalls.c | 7 ++++++-
365+ src/arch-s390x-syscalls.c | 7 ++++++-
366+ src/arch-x32-syscalls.c | 5 +++++
367+ src/arch-x86-syscalls.c | 7 ++++++-
368+ src/arch-x86_64-syscalls.c | 7 ++++++-
369+ 14 files changed, 92 insertions(+), 12 deletions(-)
370+
371+diff --git a/include/seccomp.h.in b/include/seccomp.h.in
372+index 5b9057f..5fc687c 100644
373+--- a/include/seccomp.h.in
374++++ b/include/seccomp.h.in
375+@@ -1609,6 +1609,21 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd);
376+ #define __NR_userfaultfd __PNR_userfaultfd
377+ #endif /* __NR_userfaultfd */
378+
379++#define __PNR_pkey_mprotect -10201
380++#ifndef __NR_pkey_mprotect
381++#define __NR_pkey_mprotect __PNR_pkey_mprotect
382++#endif /* __NR_pkey_mprotect */
383++
384++#define __PNR_pkey_alloc -10202
385++#ifndef __NR_pkey_alloc
386++#define __NR_pkey_alloc __PNR_pkey_alloc
387++#endif /* __NR_pkey_alloc */
388++
389++#define __PNR_pkey_free -10203
390++#ifndef __NR_pkey_free
391++#define __NR_pkey_free __PNR_pkey_free
392++#endif /* __NR_pkey_free */
393++
394+ #ifdef __cplusplus
395+ }
396+ #endif
397+diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
398+index 357f290..6c04ad5 100644
399+--- a/src/arch-aarch64-syscalls.c
400++++ b/src/arch-aarch64-syscalls.c
401+@@ -26,7 +26,7 @@
402+ #include "arch.h"
403+ #include "arch-aarch64.h"
404+
405+-/* NOTE: based on Linux 4.5-rc4 */
406++/* NOTE: based on Linux 4.9 */
407+ const struct arch_syscall_def aarch64_syscall_table[] = { \
408+ { "_llseek", __PNR__llseek },
409+ { "_newselect", __PNR__newselect },
410+@@ -254,11 +254,15 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
411+ { "pipe", __PNR_pipe },
412+ { "pipe2", 59 },
413+ { "pivot_root", 41 },
414++ { "pkey_alloc", __PNR_pkey_alloc },
415++ { "pkey_free", __PNR_pkey_free },
416++ { "pkey_mprotect", __PNR_pkey_mprotect },
417+ { "poll", __PNR_poll },
418+ { "ppoll", 73 },
419+ { "prctl", 167 },
420+ { "pread64", 67 },
421+ { "preadv", 69 },
422++ { "preadv2", 392 },
423+ { "prlimit64", 261 },
424+ { "process_vm_readv", 270 },
425+ { "process_vm_writev", 271 },
426+@@ -269,6 +273,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
427+ { "putpmsg", __PNR_putpmsg },
428+ { "pwrite64", 68 },
429+ { "pwritev", 70 },
430++ { "pwritev2", 393 },
431+ { "query_module", __PNR_query_module },
432+ { "quotactl", 60 },
433+ { "read", 63 },
434+diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
435+index d1349a1..e7e2d31 100644
436+--- a/src/arch-arm-syscalls.c
437++++ b/src/arch-arm-syscalls.c
438+@@ -37,7 +37,7 @@
439+ #define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE
440+ #endif
441+
442+-/* NOTE: based on Linux 4.5-rc4 */
443++/* NOTE: based on Linux 4.9 */
444+ const struct arch_syscall_def arm_syscall_table[] = { \
445+ /* NOTE: arm_sync_file_range() and sync_file_range2() share values */
446+ { "_llseek", (__SCMP_NR_BASE + 140) },
447+@@ -266,11 +266,15 @@ const struct arch_syscall_def arm_syscall_table[] = { \
448+ { "pipe", (__SCMP_NR_BASE + 42) },
449+ { "pipe2", (__SCMP_NR_BASE + 359) },
450+ { "pivot_root", (__SCMP_NR_BASE + 218) },
451++ { "pkey_alloc", (__SCMP_NR_BASE + 395) },
452++ { "pkey_free", (__SCMP_NR_BASE + 396) },
453++ { "pkey_mprotect", (__SCMP_NR_BASE + 394) },
454+ { "poll", (__SCMP_NR_BASE + 168) },
455+ { "ppoll", (__SCMP_NR_BASE + 336) },
456+ { "prctl", (__SCMP_NR_BASE + 172) },
457+ { "pread64", (__SCMP_NR_BASE + 180) },
458+ { "preadv", (__SCMP_NR_BASE + 361) },
459++ { "preadv2", (__SCMP_NR_BASE + 392) },
460+ { "prlimit64", (__SCMP_NR_BASE + 369) },
461+ { "process_vm_readv", (__SCMP_NR_BASE + 376) },
462+ { "process_vm_writev", (__SCMP_NR_BASE + 377) },
463+@@ -281,6 +285,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
464+ { "putpmsg", __PNR_putpmsg },
465+ { "pwrite64", (__SCMP_NR_BASE + 181) },
466+ { "pwritev", (__SCMP_NR_BASE + 362) },
467++ { "pwritev2", (__SCMP_NR_BASE + 393) },
468+ { "query_module", __PNR_query_module },
469+ { "quotactl", (__SCMP_NR_BASE + 131) },
470+ { "read", (__SCMP_NR_BASE + 3) },
471+diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
472+index 2cd86cd..dada5a9 100644
473+--- a/src/arch-mips-syscalls.c
474++++ b/src/arch-mips-syscalls.c
475+@@ -30,7 +30,7 @@
476+ /* O32 ABI */
477+ #define __SCMP_NR_BASE 4000
478+
479+-/* NOTE: based on Linux 4.5-rc4 */
480++/* NOTE: based on Linux 4.9 */
481+ const struct arch_syscall_def mips_syscall_table[] = { \
482+ { "_llseek", (__SCMP_NR_BASE + 140) },
483+ { "_newselect", (__SCMP_NR_BASE + 142) },
484+@@ -258,11 +258,15 @@ const struct arch_syscall_def mips_syscall_table[] = { \
485+ { "pipe", (__SCMP_NR_BASE + 42) },
486+ { "pipe2", (__SCMP_NR_BASE + 328) },
487+ { "pivot_root", (__SCMP_NR_BASE + 216) },
488++ { "pkey_alloc", (__SCMP_NR_BASE + 364) },
489++ { "pkey_free", (__SCMP_NR_BASE + 365) },
490++ { "pkey_mprotect", (__SCMP_NR_BASE + 363) },
491+ { "poll", (__SCMP_NR_BASE + 188) },
492+ { "ppoll", (__SCMP_NR_BASE + 302) },
493+ { "prctl", (__SCMP_NR_BASE + 192) },
494+ { "pread64", (__SCMP_NR_BASE + 200) },
495+ { "preadv", (__SCMP_NR_BASE + 330) },
496++ { "preadv2", (__SCMP_NR_BASE + 361) },
497+ { "prlimit64", (__SCMP_NR_BASE + 338) },
498+ { "process_vm_readv", (__SCMP_NR_BASE + 345) },
499+ { "process_vm_writev", (__SCMP_NR_BASE + 346) },
500+@@ -273,6 +277,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
501+ { "putpmsg", (__SCMP_NR_BASE + 209) },
502+ { "pwrite64", (__SCMP_NR_BASE + 201) },
503+ { "pwritev", (__SCMP_NR_BASE + 331) },
504++ { "pwritev2", (__SCMP_NR_BASE + 362) },
505+ { "query_module", (__SCMP_NR_BASE + 187) },
506+ { "quotactl", (__SCMP_NR_BASE + 131) },
507+ { "read", (__SCMP_NR_BASE + 3) },
508+diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c
509+index 80db447..bbf8906 100644
510+--- a/src/arch-mips64-syscalls.c
511++++ b/src/arch-mips64-syscalls.c
512+@@ -30,7 +30,7 @@
513+ /* 64 ABI */
514+ #define __SCMP_NR_BASE 5000
515+
516+-/* NOTE: based on Linux 4.5-rc4 */
517++/* NOTE: based on Linux 4.9 */
518+ const struct arch_syscall_def mips64_syscall_table[] = { \
519+ { "_llseek", __PNR__llseek },
520+ { "_newselect", (__SCMP_NR_BASE + 22) },
521+@@ -258,11 +258,15 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
522+ { "pipe", (__SCMP_NR_BASE + 21) },
523+ { "pipe2", (__SCMP_NR_BASE + 287) },
524+ { "pivot_root", (__SCMP_NR_BASE + 151) },
525++ { "pkey_alloc", (__SCMP_NR_BASE + 324) },
526++ { "pkey_free", (__SCMP_NR_BASE + 325) },
527++ { "pkey_mprotect", (__SCMP_NR_BASE + 323) },
528+ { "poll", (__SCMP_NR_BASE + 7) },
529+ { "ppoll", (__SCMP_NR_BASE + 261) },
530+ { "prctl", (__SCMP_NR_BASE + 153) },
531+ { "pread64", (__SCMP_NR_BASE + 16) },
532+ { "preadv", (__SCMP_NR_BASE + 289) },
533++ { "preadv2", (__SCMP_NR_BASE + 321) },
534+ { "prlimit64", (__SCMP_NR_BASE + 297) },
535+ { "process_vm_readv", (__SCMP_NR_BASE + 304) },
536+ { "process_vm_writev", (__SCMP_NR_BASE + 305) },
537+@@ -273,6 +277,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
538+ { "putpmsg", (__SCMP_NR_BASE + 175) },
539+ { "pwrite64", (__SCMP_NR_BASE + 17) },
540+ { "pwritev", (__SCMP_NR_BASE + 290) },
541++ { "pwritev2", (__SCMP_NR_BASE + 322) },
542+ { "query_module", (__SCMP_NR_BASE + 171) },
543+ { "quotactl", (__SCMP_NR_BASE + 172) },
544+ { "read", (__SCMP_NR_BASE + 0) },
545+diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c
546+index 5cf03d2..3484882 100644
547+--- a/src/arch-mips64n32-syscalls.c
548++++ b/src/arch-mips64n32-syscalls.c
549+@@ -30,7 +30,7 @@
550+ /* N32 ABI */
551+ #define __SCMP_NR_BASE 6000
552+
553+-/* NOTE: based on Linux 4.5-rc4 */
554++/* NOTE: based on Linux 4.9 */
555+ const struct arch_syscall_def mips64n32_syscall_table[] = { \
556+ { "_llseek", __PNR__llseek },
557+ { "_newselect", (__SCMP_NR_BASE + 22) },
558+@@ -258,11 +258,15 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
559+ { "pipe", (__SCMP_NR_BASE + 21) },
560+ { "pipe2", (__SCMP_NR_BASE + 291) },
561+ { "pivot_root", (__SCMP_NR_BASE + 151) },
562++ { "pkey_alloc", (__SCMP_NR_BASE + 328) },
563++ { "pkey_free", (__SCMP_NR_BASE + 329) },
564++ { "pkey_mprotect", (__SCMP_NR_BASE + 327) },
565+ { "poll", (__SCMP_NR_BASE + 7) },
566+ { "ppoll", (__SCMP_NR_BASE + 265) },
567+ { "prctl", (__SCMP_NR_BASE + 153) },
568+ { "pread64", (__SCMP_NR_BASE + 16) },
569+ { "preadv", (__SCMP_NR_BASE + 293) },
570++ { "preadv2", (__SCMP_NR_BASE + 325) },
571+ { "prlimit64", (__SCMP_NR_BASE + 302) },
572+ { "process_vm_readv", (__SCMP_NR_BASE + 309) },
573+ { "process_vm_writev", (__SCMP_NR_BASE + 310) },
574+@@ -273,6 +277,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
575+ { "putpmsg", (__SCMP_NR_BASE + 175) },
576+ { "pwrite64", (__SCMP_NR_BASE + 17) },
577+ { "pwritev", (__SCMP_NR_BASE + 294) },
578++ { "pwritev2", (__SCMP_NR_BASE + 326) },
579+ { "query_module", (__SCMP_NR_BASE + 171) },
580+ { "quotactl", (__SCMP_NR_BASE + 172) },
581+ { "read", (__SCMP_NR_BASE + 0) },
582+diff --git a/src/arch-parisc-syscalls.c b/src/arch-parisc-syscalls.c
583+index ad50820..4690577 100644
584+--- a/src/arch-parisc-syscalls.c
585++++ b/src/arch-parisc-syscalls.c
586+@@ -10,7 +10,7 @@
587+ #include "arch.h"
588+ #include "arch-parisc.h"
589+
590+-/* NOTE: based on Linux 4.5-rc4 */
591++/* NOTE: based on Linux 4.9 */
592+ const struct arch_syscall_def parisc_syscall_table[] = { \
593+ { "_llseek", 140 },
594+ { "_newselect", 142 },
595+@@ -238,11 +238,15 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
596+ { "pipe", 42 },
597+ { "pipe2", 313 },
598+ { "pivot_root", 67 },
599++ { "pkey_alloc", __PNR_pkey_alloc },
600++ { "pkey_free", __PNR_pkey_free },
601++ { "pkey_mprotect", __PNR_pkey_mprotect },
602+ { "poll", 168 },
603+ { "ppoll", 274 },
604+ { "prctl", 172 },
605+ { "pread64", 108 },
606+ { "preadv", 315 },
607++ { "preadv2", 347 },
608+ { "prlimit64", 321 },
609+ { "process_vm_readv", 330 },
610+ { "process_vm_writev", 331 },
611+@@ -253,6 +257,7 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
612+ { "putpmsg", 197 },
613+ { "pwrite64", 109 },
614+ { "pwritev", 316 },
615++ { "pwritev2", 348 },
616+ { "query_module", 167 },
617+ { "quotactl", 131 },
618+ { "read", 3 },
619+diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
620+index 2bd8a36..26b4ff1 100644
621+--- a/src/arch-ppc-syscalls.c
622++++ b/src/arch-ppc-syscalls.c
623+@@ -27,7 +27,7 @@
624+ #include "arch.h"
625+ #include "arch-ppc.h"
626+
627+-/* NOTE: based on Linux 4.5-rc4 */
628++/* NOTE: based on Linux 4.9 */
629+ const struct arch_syscall_def ppc_syscall_table[] = { \
630+ { "_llseek", 140 },
631+ { "_newselect", 142 },
632+@@ -255,11 +255,15 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
633+ { "pipe", 42 },
634+ { "pipe2", 317 },
635+ { "pivot_root", 203 },
636++ { "pkey_alloc", __PNR_pkey_alloc },
637++ { "pkey_free", __PNR_pkey_free },
638++ { "pkey_mprotect", __PNR_pkey_mprotect },
639+ { "poll", 167 },
640+ { "ppoll", 281 },
641+ { "prctl", 171 },
642+ { "pread64", 179 },
643+ { "preadv", 320 },
644++ { "preadv2", 380 },
645+ { "prlimit64", 325 },
646+ { "process_vm_readv", 351 },
647+ { "process_vm_writev", 352 },
648+@@ -270,6 +274,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
649+ { "putpmsg", 188 },
650+ { "pwrite64", 180 },
651+ { "pwritev", 321 },
652++ { "pwritev2", 381 },
653+ { "query_module", 166 },
654+ { "quotactl", 131 },
655+ { "read", 3 },
656+diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
657+index 73621a1..3ebd086 100644
658+--- a/src/arch-ppc64-syscalls.c
659++++ b/src/arch-ppc64-syscalls.c
660+@@ -27,7 +27,7 @@
661+ #include "arch.h"
662+ #include "arch-ppc64.h"
663+
664+-/* NOTE: based on Linux 4.5-rc4 */
665++/* NOTE: based on Linux 4.9 */
666+ const struct arch_syscall_def ppc64_syscall_table[] = { \
667+ { "_llseek", 140 },
668+ { "_newselect", 142 },
669+@@ -255,11 +255,15 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
670+ { "pipe", 42 },
671+ { "pipe2", 317 },
672+ { "pivot_root", 203 },
673++ { "pkey_alloc", __PNR_pkey_alloc },
674++ { "pkey_free", __PNR_pkey_free },
675++ { "pkey_mprotect", __PNR_pkey_mprotect },
676+ { "poll", 167 },
677+ { "ppoll", 281 },
678+ { "prctl", 171 },
679+ { "pread64", 179 },
680+ { "preadv", 320 },
681++ { "preadv2", 380 },
682+ { "prlimit64", 325 },
683+ { "process_vm_readv", 351 },
684+ { "process_vm_writev", 352 },
685+@@ -270,6 +274,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
686+ { "putpmsg", 188 },
687+ { "pwrite64", 180 },
688+ { "pwritev", 321 },
689++ { "pwritev2", 381 },
690+ { "query_module", 166 },
691+ { "quotactl", 131 },
692+ { "read", 3 },
693+diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c
694+index a04673a..84253a6 100644
695+--- a/src/arch-s390-syscalls.c
696++++ b/src/arch-s390-syscalls.c
697+@@ -10,7 +10,7 @@
698+ #include "arch.h"
699+ #include "arch-s390.h"
700+
701+-/* NOTE: based on Linux 4.5-rc4 */
702++/* NOTE: based on Linux 4.9 */
703+ const struct arch_syscall_def s390_syscall_table[] = { \
704+ { "_llseek", 140 },
705+ { "_newselect", 142 },
706+@@ -238,11 +238,15 @@ const struct arch_syscall_def s390_syscall_table[] = { \
707+ { "pipe", 42 },
708+ { "pipe2", 325 },
709+ { "pivot_root", 217 },
710++ { "pkey_alloc", __PNR_pkey_alloc },
711++ { "pkey_free", __PNR_pkey_free },
712++ { "pkey_mprotect", __PNR_pkey_mprotect },
713+ { "poll", 168 },
714+ { "ppoll", 302 },
715+ { "prctl", 172 },
716+ { "pread64", 180 },
717+ { "preadv", 328 },
718++ { "preadv2", 376 },
719+ { "prlimit64", 334 },
720+ { "process_vm_readv", 340 },
721+ { "process_vm_writev", 341 },
722+@@ -253,6 +257,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \
723+ { "putpmsg", 189 },
724+ { "pwrite64", 181 },
725+ { "pwritev", 329 },
726++ { "pwritev2", 377 },
727+ { "query_module", 167 },
728+ { "quotactl", 131 },
729+ { "read", 3 },
730+diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c
731+index 9825c63..cc9763d 100644
732+--- a/src/arch-s390x-syscalls.c
733++++ b/src/arch-s390x-syscalls.c
734+@@ -10,7 +10,7 @@
735+ #include "arch.h"
736+ #include "arch-s390x.h"
737+
738+-/* NOTE: based on Linux 4.5-rc4 */
739++/* NOTE: based on Linux 4.9 */
740+ const struct arch_syscall_def s390x_syscall_table[] = { \
741+ { "_llseek", __PNR__llseek },
742+ { "_newselect", __PNR__newselect },
743+@@ -238,11 +238,15 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
744+ { "pipe", 42 },
745+ { "pipe2", 325 },
746+ { "pivot_root", 217 },
747++ { "pkey_alloc", __PNR_pkey_alloc },
748++ { "pkey_free", __PNR_pkey_free },
749++ { "pkey_mprotect", __PNR_pkey_mprotect },
750+ { "poll", 168 },
751+ { "ppoll", 302 },
752+ { "prctl", 172 },
753+ { "pread64", 180 },
754+ { "preadv", 328 },
755++ { "preadv2", 376 },
756+ { "prlimit64", 334 },
757+ { "process_vm_readv", 340 },
758+ { "process_vm_writev", 341 },
759+@@ -253,6 +257,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
760+ { "putpmsg", 189 },
761+ { "pwrite64", 181 },
762+ { "pwritev", 329 },
763++ { "pwritev2", 377 },
764+ { "query_module", 167 },
765+ { "quotactl", 131 },
766+ { "read", 3 },
767+diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c
768+index 80dd38b..5b9970b 100644
769+--- a/src/arch-x32-syscalls.c
770++++ b/src/arch-x32-syscalls.c
771+@@ -254,11 +254,15 @@ const struct arch_syscall_def x32_syscall_table[] = { \
772+ { "pipe", (X32_SYSCALL_BIT + 22) },
773+ { "pipe2", (X32_SYSCALL_BIT + 293) },
774+ { "pivot_root", (X32_SYSCALL_BIT + 155) },
775++ { "pkey_alloc", (X32_SYSCALL_BIT + 330) },
776++ { "pkey_free", (X32_SYSCALL_BIT + 331) },
777++ { "pkey_mprotect", (X32_SYSCALL_BIT + 329) },
778+ { "poll", (X32_SYSCALL_BIT + 7) },
779+ { "ppoll", (X32_SYSCALL_BIT + 271) },
780+ { "prctl", (X32_SYSCALL_BIT + 157) },
781+ { "pread64", (X32_SYSCALL_BIT + 17) },
782+ { "preadv", (X32_SYSCALL_BIT + 534) },
783++ { "preadv2", (X32_SYSCALL_BIT + 546) },
784+ { "prlimit64", (X32_SYSCALL_BIT + 302) },
785+ { "process_vm_readv", (X32_SYSCALL_BIT + 539) },
786+ { "process_vm_writev", (X32_SYSCALL_BIT + 540) },
787+@@ -269,6 +273,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
788+ { "putpmsg", (X32_SYSCALL_BIT + 182) },
789+ { "pwrite64", (X32_SYSCALL_BIT + 18) },
790+ { "pwritev", (X32_SYSCALL_BIT + 535) },
791++ { "pwritev2", (X32_SYSCALL_BIT + 547) },
792+ { "query_module", __PNR_query_module },
793+ { "quotactl", (X32_SYSCALL_BIT + 179) },
794+ { "read", (X32_SYSCALL_BIT + 0) },
795+diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
796+index 58e0597..00684ac 100644
797+--- a/src/arch-x86-syscalls.c
798++++ b/src/arch-x86-syscalls.c
799+@@ -26,7 +26,7 @@
800+ #include "arch.h"
801+ #include "arch-x86.h"
802+
803+-/* NOTE: based on Linux 4.5-rc4 */
804++/* NOTE: based on Linux 4.9 */
805+ const struct arch_syscall_def x86_syscall_table[] = { \
806+ { "_llseek", 140 },
807+ { "_newselect", 142 },
808+@@ -254,11 +254,15 @@ const struct arch_syscall_def x86_syscall_table[] = { \
809+ { "pipe", 42 },
810+ { "pipe2", 331 },
811+ { "pivot_root", 217 },
812++ { "pkey_alloc", 381 },
813++ { "pkey_free", 382 },
814++ { "pkey_mprotect", 380 },
815+ { "poll", 168 },
816+ { "ppoll", 309 },
817+ { "prctl", 172 },
818+ { "pread64", 180 },
819+ { "preadv", 333 },
820++ { "preadv2", 378 },
821+ { "prlimit64", 340 },
822+ { "process_vm_readv", 347 },
823+ { "process_vm_writev", 348 },
824+@@ -269,6 +273,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
825+ { "putpmsg", 189 },
826+ { "pwrite64", 181 },
827+ { "pwritev", 334 },
828++ { "pwritev2", 379 },
829+ { "query_module", 167 },
830+ { "quotactl", 131 },
831+ { "read", 3 },
832+diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
833+index 2dd9818..655cf5f 100644
834+--- a/src/arch-x86_64-syscalls.c
835++++ b/src/arch-x86_64-syscalls.c
836+@@ -26,7 +26,7 @@
837+ #include "arch.h"
838+ #include "arch-x86_64.h"
839+
840+-/* NOTE: based on Linux 4.5-rc4 */
841++/* NOTE: based on Linux 4.9 */
842+ const struct arch_syscall_def x86_64_syscall_table[] = { \
843+ { "_llseek", __PNR__llseek },
844+ { "_newselect", __PNR__newselect },
845+@@ -254,11 +254,15 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
846+ { "pipe", 22 },
847+ { "pipe2", 293 },
848+ { "pivot_root", 155 },
849++ { "pkey_alloc", 330 },
850++ { "pkey_free", 331 },
851++ { "pkey_mprotect", 329 },
852+ { "poll", 7 },
853+ { "ppoll", 271 },
854+ { "prctl", 157 },
855+ { "pread64", 17 },
856+ { "preadv", 295 },
857++ { "preadv2", 327 },
858+ { "prlimit64", 302 },
859+ { "process_vm_readv", 310 },
860+ { "process_vm_writev", 311 },
861+@@ -269,6 +273,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
862+ { "putpmsg", 182 },
863+ { "pwrite64", 18 },
864+ { "pwritev", 296 },
865++ { "pwritev2", 328 },
866+ { "query_module", 178 },
867+ { "quotactl", 179 },
868+ { "read", 0 },
869+--
870+2.17.1
871+
872diff --git a/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-v4.15.patch b/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-v4.15.patch
873new file mode 100644
874index 0000000..a7382d2
875--- /dev/null
876+++ b/debian/patches/lp-1815415-arch-update-syscalls-for-Linux-v4.15.patch
877@@ -0,0 +1,499 @@
878+From c842c2f6c203ad9da37ca60219172aa0be68d26a Mon Sep 17 00:00:00 2001
879+From: Paul Moore <paul@paul-moore.com>
880+Date: Wed, 10 Jan 2018 12:16:28 -0500
881+Subject: [PATCH] arch: update the syscalls for Linux v4.15-rc7
882+
883+Signed-off-by: Paul Moore <paul@paul-moore.com>
884+
885+Origin: upstream, https://github.com/seccomp/libseccomp/commit/c842c2f6c203ad9da37ca60219172aa0be68d26a
886+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1815415
887+Last-Update: 2019-02-10
888+
889+---
890+ include/seccomp.h.in | 19 +++++++++++++++++++
891+ src/arch-aarch64-syscalls.c | 5 ++++-
892+ src/arch-arm-syscalls.c | 5 ++++-
893+ src/arch-mips-syscalls.c | 5 ++++-
894+ src/arch-mips64-syscalls.c | 5 ++++-
895+ src/arch-mips64n32-syscalls.c | 5 ++++-
896+ src/arch-parisc-syscalls.c | 5 ++++-
897+ src/arch-ppc-syscalls.c | 5 ++++-
898+ src/arch-ppc64-syscalls.c | 5 ++++-
899+ src/arch-s390-syscalls.c | 5 ++++-
900+ src/arch-s390x-syscalls.c | 5 ++++-
901+ src/arch-x32-syscalls.c | 5 ++++-
902+ src/arch-x86-syscalls.c | 7 +++++--
903+ src/arch-x86_64-syscalls.c | 5 ++++-
904+ 14 files changed, 72 insertions(+), 14 deletions(-)
905+
906+diff --git a/include/seccomp.h.in b/include/seccomp.h.in
907+index 56ae73e..2a789d6 100644
908+--- a/include/seccomp.h.in
909++++ b/include/seccomp.h.in
910+@@ -1662,6 +1662,25 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd);
911+ #define __NR_pkey_free __PNR_pkey_free
912+ #endif /* __NR_pkey_free */
913+
914++#define __PNR_get_tls -10204
915++#ifndef __NR_get_tls
916++#ifdef __ARM_NR_get_tls
917++#define __NR_get_tls __ARM_NR_get_tls
918++#else
919++#define __NR_get_tls __PNR_get_tls
920++#endif
921++#endif /* __NR_get_tls */
922++
923++#define __PNR_s390_guarded_storage -10205
924++#ifndef __NR_s390_guarded_storage
925++#define __NR_s390_guarded_storage __PNR_s390_guarded_storage
926++#endif /* __NR_s390_guarded_storage */
927++
928++#define __PNR_s390_sthyi -10206
929++#ifndef __NR_s390_sthyi
930++#define __NR_s390_sthyi __PNR_s390_sthyi
931++#endif /* __NR_s390_sthyi */
932++
933+ #ifdef __cplusplus
934+ }
935+ #endif
936+diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
937+index 157aedc..406df70 100644
938+--- a/src/arch-aarch64-syscalls.c
939++++ b/src/arch-aarch64-syscalls.c
940+@@ -26,7 +26,7 @@
941+ #include "arch.h"
942+ #include "arch-aarch64.h"
943+
944+-/* NOTE: based on Linux 4.14 */
945++/* NOTE: based on Linux 4.15-rc7 */
946+ const struct arch_syscall_def aarch64_syscall_table[] = { \
947+ { "_llseek", __PNR__llseek },
948+ { "_newselect", __PNR__newselect },
949+@@ -122,6 +122,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
950+ { "get_mempolicy", 236 },
951+ { "get_robust_list", 100 },
952+ { "get_thread_area", __PNR_get_thread_area },
953++ { "get_tls", __PNR_get_tls },
954+ { "getcpu", 168 },
955+ { "getcwd", 17 },
956+ { "getdents", __PNR_getdents },
957+@@ -304,9 +305,11 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
958+ { "rt_sigtimedwait", 137 },
959+ { "rt_tgsigqueueinfo", 240 },
960+ { "rtas", __PNR_rtas },
961++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
962+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
963+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
964+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
965++ { "s390_sthyi", __PNR_s390_sthyi },
966+ { "sched_get_priority_max", 125 },
967+ { "sched_get_priority_min", 126 },
968+ { "sched_getaffinity", 123 },
969+diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
970+index 43e2cc5..e3fdc55 100644
971+--- a/src/arch-arm-syscalls.c
972++++ b/src/arch-arm-syscalls.c
973+@@ -37,7 +37,7 @@
974+ #define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE
975+ #endif
976+
977+-/* NOTE: based on Linux 4.14 */
978++/* NOTE: based on Linux 4.15-rc7 */
979+ const struct arch_syscall_def arm_syscall_table[] = { \
980+ /* NOTE: arm_sync_file_range() and sync_file_range2() share values */
981+ { "_llseek", (__SCMP_NR_BASE + 140) },
982+@@ -134,6 +134,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
983+ { "get_mempolicy", (__SCMP_NR_BASE + 320) },
984+ { "get_robust_list", (__SCMP_NR_BASE + 339) },
985+ { "get_thread_area", __PNR_get_thread_area },
986++ { "get_tls", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 6)) },
987+ { "getcpu", (__SCMP_NR_BASE + 345) },
988+ { "getcwd", (__SCMP_NR_BASE + 183) },
989+ { "getdents", (__SCMP_NR_BASE + 141) },
990+@@ -316,9 +317,11 @@ const struct arch_syscall_def arm_syscall_table[] = { \
991+ { "rt_sigtimedwait", (__SCMP_NR_BASE + 177) },
992+ { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 363) },
993+ { "rtas", __PNR_rtas },
994++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
995+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
996+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
997+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
998++ { "s390_sthyi", __PNR_s390_sthyi },
999+ { "sched_get_priority_max", (__SCMP_NR_BASE + 159) },
1000+ { "sched_get_priority_min", (__SCMP_NR_BASE + 160) },
1001+ { "sched_getaffinity", (__SCMP_NR_BASE + 242) },
1002+diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
1003+index a5264c8..2dee53f 100644
1004+--- a/src/arch-mips-syscalls.c
1005++++ b/src/arch-mips-syscalls.c
1006+@@ -30,7 +30,7 @@
1007+ /* O32 ABI */
1008+ #define __SCMP_NR_BASE 4000
1009+
1010+-/* NOTE: based on Linux 4.14 */
1011++/* NOTE: based on Linux 4.15-rc7 */
1012+ const struct arch_syscall_def mips_syscall_table[] = { \
1013+ { "_llseek", (__SCMP_NR_BASE + 140) },
1014+ { "_newselect", (__SCMP_NR_BASE + 142) },
1015+@@ -126,6 +126,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
1016+ { "get_mempolicy", (__SCMP_NR_BASE + 269) },
1017+ { "get_robust_list", (__SCMP_NR_BASE + 310) },
1018+ { "get_thread_area", __PNR_get_thread_area },
1019++ { "get_tls", __PNR_get_tls },
1020+ { "getcpu", (__SCMP_NR_BASE + 312) },
1021+ { "getcwd", (__SCMP_NR_BASE + 203) },
1022+ { "getdents", (__SCMP_NR_BASE + 141) },
1023+@@ -308,9 +309,11 @@ const struct arch_syscall_def mips_syscall_table[] = { \
1024+ { "rt_sigtimedwait", (__SCMP_NR_BASE + 197) },
1025+ { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 332) },
1026+ { "rtas", __PNR_rtas },
1027++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1028+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1029+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1030+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1031++ { "s390_sthyi", __PNR_s390_sthyi },
1032+ { "sched_get_priority_max", (__SCMP_NR_BASE + 163) },
1033+ { "sched_get_priority_min", (__SCMP_NR_BASE + 164) },
1034+ { "sched_getaffinity", (__SCMP_NR_BASE + 240) },
1035+diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c
1036+index bc16b1d..97c6874 100644
1037+--- a/src/arch-mips64-syscalls.c
1038++++ b/src/arch-mips64-syscalls.c
1039+@@ -30,7 +30,7 @@
1040+ /* 64 ABI */
1041+ #define __SCMP_NR_BASE 5000
1042+
1043+-/* NOTE: based on Linux 4.14 */
1044++/* NOTE: based on Linux 4.15-rc7 */
1045+ const struct arch_syscall_def mips64_syscall_table[] = { \
1046+ { "_llseek", __PNR__llseek },
1047+ { "_newselect", (__SCMP_NR_BASE + 22) },
1048+@@ -126,6 +126,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
1049+ { "get_mempolicy", (__SCMP_NR_BASE + 228) },
1050+ { "get_robust_list", (__SCMP_NR_BASE + 269) },
1051+ { "get_thread_area", __PNR_get_thread_area },
1052++ { "get_tls", __PNR_get_tls },
1053+ { "getcpu", (__SCMP_NR_BASE + 271) },
1054+ { "getcwd", (__SCMP_NR_BASE + 77) },
1055+ { "getdents", (__SCMP_NR_BASE + 76) },
1056+@@ -308,9 +309,11 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
1057+ { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) },
1058+ { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 291) },
1059+ { "rtas", __PNR_rtas },
1060++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1061+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1062+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1063+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1064++ { "s390_sthyi", __PNR_s390_sthyi },
1065+ { "sched_get_priority_max", (__SCMP_NR_BASE + 143) },
1066+ { "sched_get_priority_min", (__SCMP_NR_BASE + 144) },
1067+ { "sched_getaffinity", (__SCMP_NR_BASE + 196) },
1068+diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c
1069+index fa89bc2..a22d643 100644
1070+--- a/src/arch-mips64n32-syscalls.c
1071++++ b/src/arch-mips64n32-syscalls.c
1072+@@ -30,7 +30,7 @@
1073+ /* N32 ABI */
1074+ #define __SCMP_NR_BASE 6000
1075+
1076+-/* NOTE: based on Linux 4.14 */
1077++/* NOTE: based on Linux 4.15-rc7 */
1078+ const struct arch_syscall_def mips64n32_syscall_table[] = { \
1079+ { "_llseek", __PNR__llseek },
1080+ { "_newselect", (__SCMP_NR_BASE + 22) },
1081+@@ -126,6 +126,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
1082+ { "get_mempolicy", (__SCMP_NR_BASE + 232) },
1083+ { "get_robust_list", (__SCMP_NR_BASE + 273) },
1084+ { "get_thread_area", __PNR_get_thread_area },
1085++ { "get_tls", __PNR_get_tls },
1086+ { "getcpu", (__SCMP_NR_BASE + 275) },
1087+ { "getcwd", (__SCMP_NR_BASE + 77) },
1088+ { "getdents", (__SCMP_NR_BASE + 76) },
1089+@@ -308,9 +309,11 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
1090+ { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) },
1091+ { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 295) },
1092+ { "rtas", __PNR_rtas },
1093++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1094+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1095+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1096+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1097++ { "s390_sthyi", __PNR_s390_sthyi },
1098+ { "sched_get_priority_max", (__SCMP_NR_BASE + 143) },
1099+ { "sched_get_priority_min", (__SCMP_NR_BASE + 144) },
1100+ { "sched_getaffinity", (__SCMP_NR_BASE + 196) },
1101+diff --git a/src/arch-parisc-syscalls.c b/src/arch-parisc-syscalls.c
1102+index 7e9d9ab..e84b533 100644
1103+--- a/src/arch-parisc-syscalls.c
1104++++ b/src/arch-parisc-syscalls.c
1105+@@ -10,7 +10,7 @@
1106+ #include "arch.h"
1107+ #include "arch-parisc.h"
1108+
1109+-/* NOTE: based on Linux 4.14 */
1110++/* NOTE: based on Linux 4.15-rc7 */
1111+ const struct arch_syscall_def parisc_syscall_table[] = { \
1112+ { "_llseek", 140 },
1113+ { "_newselect", 142 },
1114+@@ -106,6 +106,7 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
1115+ { "get_mempolicy", 261 },
1116+ { "get_robust_list", 290 },
1117+ { "get_thread_area", 214 },
1118++ { "get_tls", __PNR_get_tls },
1119+ { "getcpu", 296 },
1120+ { "getcwd", 110 },
1121+ { "getdents", 141 },
1122+@@ -288,9 +289,11 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
1123+ { "rt_sigtimedwait", 177 },
1124+ { "rt_tgsigqueueinfo", 317 },
1125+ { "rtas", __PNR_rtas },
1126++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1127+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1128+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1129+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1130++ { "s390_sthyi", __PNR_s390_sthyi },
1131+ { "sched_get_priority_max", 159 },
1132+ { "sched_get_priority_min", 160 },
1133+ { "sched_getaffinity", 212 },
1134+diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
1135+index fe0cdfb..7ff7fca 100644
1136+--- a/src/arch-ppc-syscalls.c
1137++++ b/src/arch-ppc-syscalls.c
1138+@@ -27,7 +27,7 @@
1139+ #include "arch.h"
1140+ #include "arch-ppc.h"
1141+
1142+-/* NOTE: based on Linux 4.14 */
1143++/* NOTE: based on Linux 4.15-rc7 */
1144+ const struct arch_syscall_def ppc_syscall_table[] = { \
1145+ { "_llseek", 140 },
1146+ { "_newselect", 142 },
1147+@@ -123,6 +123,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
1148+ { "get_mempolicy", 260 },
1149+ { "get_robust_list", 299 },
1150+ { "get_thread_area", __PNR_get_thread_area },
1151++ { "get_tls", __PNR_get_tls },
1152+ { "getcpu", 302 },
1153+ { "getcwd", 182 },
1154+ { "getdents", 141 },
1155+@@ -305,9 +306,11 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
1156+ { "rt_sigtimedwait", 176 },
1157+ { "rt_tgsigqueueinfo", 322 },
1158+ { "rtas", 255 },
1159++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1160+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1161+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1162+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1163++ { "s390_sthyi", __PNR_s390_sthyi },
1164+ { "sched_get_priority_max", 159 },
1165+ { "sched_get_priority_min", 160 },
1166+ { "sched_getaffinity", 223 },
1167+diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
1168+index dc09610..ee094bc 100644
1169+--- a/src/arch-ppc64-syscalls.c
1170++++ b/src/arch-ppc64-syscalls.c
1171+@@ -27,7 +27,7 @@
1172+ #include "arch.h"
1173+ #include "arch-ppc64.h"
1174+
1175+-/* NOTE: based on Linux 4.14 */
1176++/* NOTE: based on Linux 4.15-rc7 */
1177+ const struct arch_syscall_def ppc64_syscall_table[] = { \
1178+ { "_llseek", 140 },
1179+ { "_newselect", 142 },
1180+@@ -123,6 +123,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
1181+ { "get_mempolicy", 260 },
1182+ { "get_robust_list", 299 },
1183+ { "get_thread_area", __PNR_get_thread_area },
1184++ { "get_tls", __PNR_get_tls },
1185+ { "getcpu", 302 },
1186+ { "getcwd", 182 },
1187+ { "getdents", 141 },
1188+@@ -305,9 +306,11 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
1189+ { "rt_sigtimedwait", 176 },
1190+ { "rt_tgsigqueueinfo", 322 },
1191+ { "rtas", 255 },
1192++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1193+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1194+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1195+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1196++ { "s390_sthyi", __PNR_s390_sthyi },
1197+ { "sched_get_priority_max", 159 },
1198+ { "sched_get_priority_min", 160 },
1199+ { "sched_getaffinity", 223 },
1200+diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c
1201+index 8a6cecc..6024eaf 100644
1202+--- a/src/arch-s390-syscalls.c
1203++++ b/src/arch-s390-syscalls.c
1204+@@ -10,7 +10,7 @@
1205+ #include "arch.h"
1206+ #include "arch-s390.h"
1207+
1208+-/* NOTE: based on Linux 4.14 */
1209++/* NOTE: based on Linux 4.15-rc7 */
1210+ const struct arch_syscall_def s390_syscall_table[] = { \
1211+ { "_llseek", 140 },
1212+ { "_newselect", 142 },
1213+@@ -106,6 +106,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \
1214+ { "get_mempolicy", 269 },
1215+ { "get_robust_list", 305 },
1216+ { "get_thread_area", __PNR_get_thread_area },
1217++ { "get_tls", __PNR_get_tls },
1218+ { "getcpu", 311 },
1219+ { "getcwd", 183 },
1220+ { "getdents", 141 },
1221+@@ -288,9 +289,11 @@ const struct arch_syscall_def s390_syscall_table[] = { \
1222+ { "rt_sigtimedwait", 177 },
1223+ { "rt_tgsigqueueinfo", 330 },
1224+ { "rtas", __PNR_rtas },
1225++ { "s390_guarded_storage", 378 },
1226+ { "s390_pci_mmio_read", 353 },
1227+ { "s390_pci_mmio_write", 352 },
1228+ { "s390_runtime_instr", 342 },
1229++ { "s390_sthyi", 380 },
1230+ { "sched_get_priority_max", 159 },
1231+ { "sched_get_priority_min", 160 },
1232+ { "sched_getaffinity", 240 },
1233+diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c
1234+index 728dfc4..74d1e57 100644
1235+--- a/src/arch-s390x-syscalls.c
1236++++ b/src/arch-s390x-syscalls.c
1237+@@ -10,7 +10,7 @@
1238+ #include "arch.h"
1239+ #include "arch-s390x.h"
1240+
1241+-/* NOTE: based on Linux 4.14 */
1242++/* NOTE: based on Linux 4.15-rc7 */
1243+ const struct arch_syscall_def s390x_syscall_table[] = { \
1244+ { "_llseek", __PNR__llseek },
1245+ { "_newselect", __PNR__newselect },
1246+@@ -106,6 +106,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
1247+ { "get_mempolicy", 269 },
1248+ { "get_robust_list", 305 },
1249+ { "get_thread_area", __PNR_get_thread_area },
1250++ { "get_tls", __PNR_get_tls },
1251+ { "getcpu", 311 },
1252+ { "getcwd", 183 },
1253+ { "getdents", 141 },
1254+@@ -288,9 +289,11 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
1255+ { "rt_sigtimedwait", 177 },
1256+ { "rt_tgsigqueueinfo", 330 },
1257+ { "rtas", __PNR_rtas },
1258++ { "s390_guarded_storage", 378 },
1259+ { "s390_pci_mmio_read", 353 },
1260+ { "s390_pci_mmio_write", 352 },
1261+ { "s390_runtime_instr", 342 },
1262++ { "s390_sthyi", 380 },
1263+ { "sched_get_priority_max", 159 },
1264+ { "sched_get_priority_min", 160 },
1265+ { "sched_getaffinity", 240 },
1266+diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c
1267+index bb3e077..8a6cd64 100644
1268+--- a/src/arch-x32-syscalls.c
1269++++ b/src/arch-x32-syscalls.c
1270+@@ -26,7 +26,7 @@
1271+ #include "arch.h"
1272+ #include "arch-x32.h"
1273+
1274+-/* NOTE: based on Linux 4.14 */
1275++/* NOTE: based on Linux 4.15-rc7 */
1276+ const struct arch_syscall_def x32_syscall_table[] = { \
1277+ { "_llseek", __PNR__llseek },
1278+ { "_newselect", __PNR__newselect },
1279+@@ -122,6 +122,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
1280+ { "get_mempolicy", (X32_SYSCALL_BIT + 239) },
1281+ { "get_robust_list", (X32_SYSCALL_BIT + 531) },
1282+ { "get_thread_area", __PNR_get_thread_area },
1283++ { "get_tls", __PNR_get_tls },
1284+ { "getcpu", (X32_SYSCALL_BIT + 309) },
1285+ { "getcwd", (X32_SYSCALL_BIT + 79) },
1286+ { "getdents", (X32_SYSCALL_BIT + 78) },
1287+@@ -304,9 +305,11 @@ const struct arch_syscall_def x32_syscall_table[] = { \
1288+ { "rt_sigtimedwait", (X32_SYSCALL_BIT + 523) },
1289+ { "rt_tgsigqueueinfo", (X32_SYSCALL_BIT + 536) },
1290+ { "rtas", __PNR_rtas },
1291++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1292+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1293+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1294+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1295++ { "s390_sthyi", __PNR_s390_sthyi },
1296+ { "sched_get_priority_max", (X32_SYSCALL_BIT + 146) },
1297+ { "sched_get_priority_min", (X32_SYSCALL_BIT + 147) },
1298+ { "sched_getaffinity", (X32_SYSCALL_BIT + 204) },
1299+diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
1300+index 81a52a3..abce705 100644
1301+--- a/src/arch-x86-syscalls.c
1302++++ b/src/arch-x86-syscalls.c
1303+@@ -26,7 +26,7 @@
1304+ #include "arch.h"
1305+ #include "arch-x86.h"
1306+
1307+-/* NOTE: based on Linux 4.14 */
1308++/* NOTE: based on Linux 4.15-rc7 */
1309+ const struct arch_syscall_def x86_syscall_table[] = { \
1310+ { "_llseek", 140 },
1311+ { "_newselect", 142 },
1312+@@ -41,7 +41,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
1313+ { "alarm", 27 },
1314+ { "arm_fadvise64_64", __PNR_arm_fadvise64_64 },
1315+ { "arm_sync_file_range", __PNR_arm_sync_file_range },
1316+- { "arch_prctl", __PNR_arch_prctl },
1317++ { "arch_prctl", 384 },
1318+ { "bdflush", 134 },
1319+ { "bind", 361 },
1320+ { "bpf", 357 },
1321+@@ -122,6 +122,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
1322+ { "get_mempolicy", 275 },
1323+ { "get_robust_list", 312 },
1324+ { "get_thread_area", 244 },
1325++ { "get_tls", __PNR_get_tls },
1326+ { "getcpu", 318 },
1327+ { "getcwd", 183 },
1328+ { "getdents", 141 },
1329+@@ -304,9 +305,11 @@ const struct arch_syscall_def x86_syscall_table[] = { \
1330+ { "rt_sigtimedwait", 177 },
1331+ { "rt_tgsigqueueinfo", 335 },
1332+ { "rtas", __PNR_rtas },
1333++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1334+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1335+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1336+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1337++ { "s390_sthyi", __PNR_s390_sthyi },
1338+ { "sched_get_priority_max", 159 },
1339+ { "sched_get_priority_min", 160 },
1340+ { "sched_getaffinity", 242 },
1341+diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
1342+index 1da2530..203dafa 100644
1343+--- a/src/arch-x86_64-syscalls.c
1344++++ b/src/arch-x86_64-syscalls.c
1345+@@ -26,7 +26,7 @@
1346+ #include "arch.h"
1347+ #include "arch-x86_64.h"
1348+
1349+-/* NOTE: based on Linux 4.14 */
1350++/* NOTE: based on Linux 4.15-rc7 */
1351+ const struct arch_syscall_def x86_64_syscall_table[] = { \
1352+ { "_llseek", __PNR__llseek },
1353+ { "_newselect", __PNR__newselect },
1354+@@ -122,6 +122,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
1355+ { "get_mempolicy", 239 },
1356+ { "get_robust_list", 274 },
1357+ { "get_thread_area", 211 },
1358++ { "get_tls", __PNR_get_tls },
1359+ { "getcpu", 309 },
1360+ { "getcwd", 79 },
1361+ { "getdents", 78 },
1362+@@ -304,9 +305,11 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
1363+ { "rt_sigtimedwait", 128 },
1364+ { "rt_tgsigqueueinfo", 297 },
1365+ { "rtas", __PNR_rtas },
1366++ { "s390_guarded_storage", __PNR_s390_guarded_storage },
1367+ { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read },
1368+ { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write },
1369+ { "s390_runtime_instr", __PNR_s390_runtime_instr },
1370++ { "s390_sthyi", __PNR_s390_sthyi },
1371+ { "sched_get_priority_max", 146 },
1372+ { "sched_get_priority_min", 147 },
1373+ { "sched_getaffinity", 204 },
1374+--
1375+2.17.1
1376+
1377diff --git a/debian/patches/lp-1815415-update-the-syscall-tables-to-4.10.patch b/debian/patches/lp-1815415-update-the-syscall-tables-to-4.10.patch
1378new file mode 100644
1379index 0000000..3ff3089
1380--- /dev/null
1381+++ b/debian/patches/lp-1815415-update-the-syscall-tables-to-4.10.patch
1382@@ -0,0 +1,106 @@
1383+From 116b3c1a2e1db53cc35b74f30c080f5265faa674 Mon Sep 17 00:00:00 2001
1384+From: Paul Moore <paul@paul-moore.com>
1385+Date: Thu, 2 Feb 2017 18:30:44 -0500
1386+Subject: [PATCH] arch: update the syscall tables to 4.10-rc6+
1387+
1388+Signed-off-by: Paul Moore <paul@paul-moore.com>
1389+
1390+Origin: upstream, https://github.com/seccomp/libseccomp/commit/116b3c1a2e1db53cc35b74f30c080f5265faa674
1391+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1815415
1392+Last-Update: 2019-02-10
1393+
1394+---
1395+ src/arch-aarch64-syscalls.c | 12 ++++++------
1396+ src/arch-ppc-syscalls.c | 4 ++--
1397+ src/arch-ppc64-syscalls.c | 4 ++--
1398+ 3 files changed, 10 insertions(+), 10 deletions(-)
1399+
1400+diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
1401+index 84f5d60..d907182 100644
1402+--- a/src/arch-aarch64-syscalls.c
1403++++ b/src/arch-aarch64-syscalls.c
1404+@@ -26,7 +26,7 @@
1405+ #include "arch.h"
1406+ #include "arch-aarch64.h"
1407+
1408+-/* NOTE: based on Linux 4.9 */
1409++/* NOTE: based on Linux 4.10-rc6+ */
1410+ const struct arch_syscall_def aarch64_syscall_table[] = { \
1411+ { "_llseek", __PNR__llseek },
1412+ { "_newselect", __PNR__newselect },
1413+@@ -254,15 +254,15 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
1414+ { "pipe", __PNR_pipe },
1415+ { "pipe2", 59 },
1416+ { "pivot_root", 41 },
1417+- { "pkey_alloc", __PNR_pkey_alloc },
1418+- { "pkey_free", __PNR_pkey_free },
1419+- { "pkey_mprotect", __PNR_pkey_mprotect },
1420++ { "pkey_alloc", 289 },
1421++ { "pkey_free", 290 },
1422++ { "pkey_mprotect", 288 },
1423+ { "poll", __PNR_poll },
1424+ { "ppoll", 73 },
1425+ { "prctl", 167 },
1426+ { "pread64", 67 },
1427+ { "preadv", 69 },
1428+- { "preadv2", 392 },
1429++ { "preadv2", 286 },
1430+ { "prlimit64", 261 },
1431+ { "process_vm_readv", 270 },
1432+ { "process_vm_writev", 271 },
1433+@@ -273,7 +273,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
1434+ { "putpmsg", __PNR_putpmsg },
1435+ { "pwrite64", 68 },
1436+ { "pwritev", 70 },
1437+- { "pwritev2", 393 },
1438++ { "pwritev2", 287 },
1439+ { "query_module", __PNR_query_module },
1440+ { "quotactl", 60 },
1441+ { "read", 63 },
1442+diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
1443+index 85570bd..c117da9 100644
1444+--- a/src/arch-ppc-syscalls.c
1445++++ b/src/arch-ppc-syscalls.c
1446+@@ -27,7 +27,7 @@
1447+ #include "arch.h"
1448+ #include "arch-ppc.h"
1449+
1450+-/* NOTE: based on Linux 4.9 */
1451++/* NOTE: based on Linux 4.10-rc6+ */
1452+ const struct arch_syscall_def ppc_syscall_table[] = { \
1453+ { "_llseek", 140 },
1454+ { "_newselect", 142 },
1455+@@ -177,7 +177,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
1456+ { "ioprio_set", 273 },
1457+ { "ipc", 117 },
1458+ { "kcmp", 354 },
1459+- { "kexec_file_load", __PNR_kexec_file_load },
1460++ { "kexec_file_load", 382 },
1461+ { "kexec_load", 268 },
1462+ { "keyctl", 271 },
1463+ { "kill", 37 },
1464+diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
1465+index 47cb56c..bbd5876 100644
1466+--- a/src/arch-ppc64-syscalls.c
1467++++ b/src/arch-ppc64-syscalls.c
1468+@@ -27,7 +27,7 @@
1469+ #include "arch.h"
1470+ #include "arch-ppc64.h"
1471+
1472+-/* NOTE: based on Linux 4.9 */
1473++/* NOTE: based on Linux 4.10-rc6+ */
1474+ const struct arch_syscall_def ppc64_syscall_table[] = { \
1475+ { "_llseek", 140 },
1476+ { "_newselect", 142 },
1477+@@ -177,7 +177,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
1478+ { "ioprio_set", 273 },
1479+ { "ipc", 117 },
1480+ { "kcmp", 354 },
1481+- { "kexec_file_load", __PNR_kexec_file_load },
1482++ { "kexec_file_load", 382 },
1483+ { "kexec_load", 268 },
1484+ { "keyctl", 271 },
1485+ { "kill", 37 },
1486+--
1487+2.17.1
1488+
1489diff --git a/debian/patches/series b/debian/patches/series
1490index b67edab..2458a01 100644
1491--- a/debian/patches/series
1492+++ b/debian/patches/series
1493@@ -1,2 +1,6 @@
1494 28-parisc_support.patch
1495 add-log-action.patch
1496+lp-1815415-arch-update-syscalls-for-Linux-4.9.patch
1497+lp-1815415-update-the-syscall-tables-to-4.10.patch
1498+lp-1755250-add-the-statx-syscall.patch
1499+lp-1815415-arch-update-syscalls-for-Linux-v4.15.patch

Subscribers

People subscribed via source and target branches