From b6dd7b58e145ca3ae9189fe981f7b8c7c91ceae6 Mon Sep 17 00:00:00 2001 From: Oleg Lyovin Date: Thu, 12 Oct 2023 18:14:29 +0300 Subject: [PATCH] privsep: allow __NR_mmap2 syscall The issue occured while compiled by musl toolchain: mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = ? +++ killed by SIGSYS +++ This patchs allows seccomp to make __NR_mmap2 syscall. Signed-off-by: Oleg Lyovin --- src/privsep-linux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/privsep-linux.c b/src/privsep-linux.c index 67ed0d73d..6201b207f 100644 --- a/src/privsep-linux.c +++ b/src/privsep-linux.c @@ -364,6 +364,9 @@ static struct sock_filter ps_seccomp_filter[] = { #ifdef __NR_mmap SECCOMP_ALLOW(__NR_mmap), #endif +#ifdef __NR_mmap2 + SECCOMP_ALLOW(__NR_mmap2), +#endif #ifdef __NR_munmap SECCOMP_ALLOW(__NR_munmap), #endif