blob: 3bec2cea7768923841234118078cdc9b418f381c [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From a6c0847582305aaab122d54b635954829812922f Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alexk@zuma.ai>
3Date: Thu, 30 Dec 2021 09:32:26 +0000
4Subject: [PATCH 1/2] ntpd/ntp_sandbox.c: allow newfstatat on all archs for
5 glibc-2.34 in seccomp filter
6
7On Yocto Poky, newfstatat is used on (at least) arm64, x86_64 and
8riscv64:
9
10 2021-12-30T09:32:04 ntpd[341]: ERR: SIGSYS: got a trap.
11 2021-12-30T09:32:04 ntpd[341]: ERR: SIGSYS/seccomp bad syscall 262/0xc000003e
12
13Upstream-Status: Backport [https://gitlab.com/NTPsec/ntpsec/-/commit/a6c0847582305aaab122d54b635954829812922f]
14Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
15Signed-off-by: Alex Kiernan <alexk@zuma.ai>
16---
17 ntpd/ntp_sandbox.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/ntpd/ntp_sandbox.c b/ntpd/ntp_sandbox.c
21index 3d6bccdfcf77..1ae82a671344 100644
22--- a/ntpd/ntp_sandbox.c
23+++ b/ntpd/ntp_sandbox.c
24@@ -349,6 +349,7 @@ int scmp_sc[] = {
25 SCMP_SYS(lseek),
26 SCMP_SYS(membarrier), /* Needed on Alpine 3.11.3 */
27 SCMP_SYS(munmap),
28+ SCMP_SYS(newfstatat),
29 SCMP_SYS(open),
30 #ifdef __NR_openat
31 SCMP_SYS(openat), /* SUSE */
32@@ -452,7 +453,6 @@ int scmp_sc[] = {
33 #endif
34 #if defined(__aarch64__)
35 SCMP_SYS(faccessat),
36- SCMP_SYS(newfstatat),
37 SCMP_SYS(renameat),
38 SCMP_SYS(linkat),
39 SCMP_SYS(unlinkat),
40--
412.34.1
42