]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
src/shared/seccomp-util.c: Add mmap definitions for s390 13318/head
authorDan Streetman <ddstreet@canonical.com>
Thu, 25 Jul 2019 00:48:49 +0000 (20:48 -0400)
committerDan Streetman <ddstreet@canonical.com>
Tue, 13 Aug 2019 19:40:36 +0000 (15:40 -0400)
src/shared/seccomp-util.c

index 498e8ee84a64203f1e5bd38c5675ea8ccb11cb10..4e605523d9685665272dfc8936c78518fb01a960 100644 (file)
@@ -1521,6 +1521,7 @@ int seccomp_memory_deny_write_execute(void) {
                 switch (arch) {
 
                 case SCMP_ARCH_X86:
+                case SCMP_ARCH_S390:
                         filter_syscall = SCMP_SYS(mmap2);
                         block_syscall = SCMP_SYS(mmap);
                         shmat_syscall = SCMP_SYS(shmat);
@@ -1545,13 +1546,14 @@ int seccomp_memory_deny_write_execute(void) {
                 case SCMP_ARCH_X86_64:
                 case SCMP_ARCH_X32:
                 case SCMP_ARCH_AARCH64:
-                        filter_syscall = SCMP_SYS(mmap); /* amd64, x32, and arm64 have only mmap */
+                case SCMP_ARCH_S390X:
+                        filter_syscall = SCMP_SYS(mmap); /* amd64, x32, s390x, and arm64 have only mmap */
                         shmat_syscall = SCMP_SYS(shmat);
                         break;
 
                 /* Please add more definitions here, if you port systemd to other architectures! */
 
-#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__powerpc64__) && !defined(__arm__) && !defined(__aarch64__)
+#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__powerpc64__) && !defined(__arm__) && !defined(__aarch64__) && !defined(__s390__) && !defined(__s390x__)
 #warning "Consider adding the right mmap() syscall definitions here!"
 #endif
                 }