aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntpsec/ntpsec/0002-ntpd-ntp_sandbox.c-match-riscv-to-aarch-in-seccomp-f.patch
blob: 705a87bdfaa4a68bba709a76b3619524cbca6356 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 0f94870b84e68448f16b1304058bde4628dafde5 Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alexk@zuma.ai>
Date: Thu, 30 Dec 2021 10:41:20 +0000
Subject: [PATCH 2/2] ntpd/ntp_sandbox.c: match riscv to aarch in seccomp
 filter

On Yocto Poky, faccessat (et al) are also used on riscv64:

  2018-03-09T12:35:32 ntpd[341]: ERR: SIGSYS: got a trap.
  2018-03-09T12:35:32 ntpd[341]: ERR: SIGSYS/seccomp bad syscall 48/0xc00000f3

Upstream-Status: Backport [https://gitlab.com/NTPsec/ntpsec/-/commit/0f94870b84e68448f16b1304058bde4628dafde5]
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alex Kiernan <alexk@zuma.ai>
---
 ntpd/ntp_sandbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ntpd/ntp_sandbox.c b/ntpd/ntp_sandbox.c
index 1ae82a671344..4a14ae224dc6 100644
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -451,7 +451,7 @@ int scmp_sc[] = {
 	/* gentoo 64-bit and 32-bit, Intel and Arm use mmap */
 	SCMP_SYS(mmap),
 #endif
-#if defined(__aarch64__)
+#if defined(__aarch64__) || defined(__riscv)
 	SCMP_SYS(faccessat),
 	SCMP_SYS(renameat),
 	SCMP_SYS(linkat),
-- 
2.34.1