From: Zbigniew Jędrzejewski-Szmek Date: Sat, 15 Jul 2017 19:30:01 +0000 (+0000) Subject: seccomp: arm64 does not have mmap2 X-Git-Tag: v235~331^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79873bc850177050baa0c5165b119adafeebb891;p=thirdparty%2Fsystemd.git seccomp: arm64 does not have mmap2 I messed up when adding the definitions in 4278d1f5310f5acb4c6a6788233625234edb5145. Unfortunately I didn't have the hardware at hand and went by looking at the kernel headers. (cherry picked from commit 53196fafcb7b24b45ed4f48ab894d00a24a6d871) --- diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 1c3706a8cc6..5d8a6986b72 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -1223,10 +1223,6 @@ int seccomp_memory_deny_write_execute(void) { break; - case SCMP_ARCH_AARCH64: - block_syscall = SCMP_SYS(mmap); - /* fall through */ - case SCMP_ARCH_ARM: filter_syscall = SCMP_SYS(mmap2); /* arm has only mmap2 */ shmat_syscall = SCMP_SYS(shmat); @@ -1234,7 +1230,8 @@ int seccomp_memory_deny_write_execute(void) { case SCMP_ARCH_X86_64: case SCMP_ARCH_X32: - filter_syscall = SCMP_SYS(mmap); /* amd64 and x32 have only mmap */ + case SCMP_ARCH_AARCH64: + filter_syscall = SCMP_SYS(mmap); /* amd64, x32, and arm64 have only mmap */ shmat_syscall = SCMP_SYS(shmat); break;