Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 0f94870b84e68448f16b1304058bde4628dafde5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kiernan <alexk@zuma.ai> |
| 3 | Date: Thu, 30 Dec 2021 10:41:20 +0000 |
| 4 | Subject: [PATCH 2/2] ntpd/ntp_sandbox.c: match riscv to aarch in seccomp |
| 5 | filter |
| 6 | |
| 7 | On Yocto Poky, faccessat (et al) are also used on riscv64: |
| 8 | |
| 9 | 2018-03-09T12:35:32 ntpd[341]: ERR: SIGSYS: got a trap. |
| 10 | 2018-03-09T12:35:32 ntpd[341]: ERR: SIGSYS/seccomp bad syscall 48/0xc00000f3 |
| 11 | |
| 12 | Upstream-Status: Backport [https://gitlab.com/NTPsec/ntpsec/-/commit/0f94870b84e68448f16b1304058bde4628dafde5] |
| 13 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
| 14 | Signed-off-by: Alex Kiernan <alexk@zuma.ai> |
| 15 | --- |
| 16 | ntpd/ntp_sandbox.c | 2 +- |
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/ntpd/ntp_sandbox.c b/ntpd/ntp_sandbox.c |
| 20 | index 1ae82a671344..4a14ae224dc6 100644 |
| 21 | --- a/ntpd/ntp_sandbox.c |
| 22 | +++ b/ntpd/ntp_sandbox.c |
| 23 | @@ -451,7 +451,7 @@ int scmp_sc[] = { |
| 24 | /* gentoo 64-bit and 32-bit, Intel and Arm use mmap */ |
| 25 | SCMP_SYS(mmap), |
| 26 | #endif |
| 27 | -#if defined(__aarch64__) |
| 28 | +#if defined(__aarch64__) || defined(__riscv) |
| 29 | SCMP_SYS(faccessat), |
| 30 | SCMP_SYS(renameat), |
| 31 | SCMP_SYS(linkat), |
| 32 | -- |
| 33 | 2.34.1 |
| 34 | |