Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc

Issue 1988303003: [Android] Permit __NR_msync under the seccomp sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h " 5 #include "content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h "
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/net.h> 9 #include <linux/net.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #if defined(__x86_64__) || defined(__aarch64__) 71 #if defined(__x86_64__) || defined(__aarch64__)
72 case __NR_newfstatat: 72 case __NR_newfstatat:
73 case __NR_getdents64: 73 case __NR_getdents64:
74 #elif defined(__i386__) || defined(__arm__) || defined(__mips__) 74 #elif defined(__i386__) || defined(__arm__) || defined(__mips__)
75 case __NR_fstatat64: 75 case __NR_fstatat64:
76 case __NR_getdents: 76 case __NR_getdents:
77 #endif 77 #endif
78 case __NR_getpriority: 78 case __NR_getpriority:
79 case __NR_ioctl: 79 case __NR_ioctl:
80 case __NR_mremap: 80 case __NR_mremap:
81 case __NR_msync:
81 // File system access cannot be restricted with seccomp-bpf on Android, 82 // File system access cannot be restricted with seccomp-bpf on Android,
82 // since the JVM classloader and other Framework features require file 83 // since the JVM classloader and other Framework features require file
83 // access. It may be possible to restrict the filesystem with SELinux. 84 // access. It may be possible to restrict the filesystem with SELinux.
84 // Currently we rely on the app/service UID isolation to create a 85 // Currently we rely on the app/service UID isolation to create a
85 // filesystem "sandbox". 86 // filesystem "sandbox".
86 #if !defined(ARCH_CPU_ARM64) 87 #if !defined(ARCH_CPU_ARM64)
87 case __NR_open: 88 case __NR_open:
88 #endif 89 #endif
89 case __NR_openat: 90 case __NR_openat:
90 case __NR_pread64: 91 case __NR_pread64:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 146 }
146 #endif 147 #endif
147 148
148 if (override_and_allow) 149 if (override_and_allow)
149 return Allow(); 150 return Allow();
150 151
151 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); 152 return SandboxBPFBasePolicy::EvaluateSyscall(sysno);
152 } 153 }
153 154
154 } // namespace content 155 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698