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

Unified Diff: sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc

Issue 493603003: sandbox: Update known syscalls to kernel 3.17 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index f31695ffe4c15b7760615d263f20555249848169..dc3f182ac8568223580ddb9cf5513c1bf05a5827 100644
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -107,6 +107,9 @@ bool SyscallSets::IsFileSystem(int sysno) {
#if defined(__i386__) || defined(__arm__) || defined(__mips__)
case __NR_lstat64:
#endif
+#if !defined(__mips__)
+ case __NR_memfd_create:
+#endif
case __NR_mkdir:
case __NR_mkdirat:
case __NR_mknod:
@@ -117,6 +120,7 @@ bool SyscallSets::IsFileSystem(int sysno) {
case __NR_readlinkat:
case __NR_rename:
case __NR_renameat:
+ case __NR_renameat2:
case __NR_rmdir:
case __NR_stat: // EPERM not a valid errno.
#if defined(__i386__)
@@ -564,6 +568,15 @@ bool SyscallSets::IsPrctl(int sysno) {
}
}
+bool SyscallSets::IsSeccomp(int sysno) {
+ switch (sysno) {
+ case __NR_seccomp:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
switch (sysno) {
case __NR_sched_yield:
@@ -605,6 +618,7 @@ bool SyscallSets::IsKernelModule(int sysno) {
#endif
case __NR_delete_module:
case __NR_init_module:
+ case __NR_finit_module:
return true;
default:
return false;
@@ -697,9 +711,7 @@ bool SyscallSets::IsDebug(int sysno) {
case __NR_ptrace:
case __NR_process_vm_readv:
case __NR_process_vm_writev:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
case __NR_kcmp:
-#endif
return true;
default:
return false;
@@ -834,6 +846,8 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) {
case __NR_sched_setaffinity:
case __NR_sched_setparam:
case __NR_sched_setscheduler:
+ case __NR_sched_setattr:
jln (very slow on Chromium) 2014/08/21 23:36:05 Please, alphabetize.
+ case __NR_sched_getattr:
return true;
default:
return false;
@@ -915,6 +929,9 @@ bool SyscallSets::IsExtendedAttributes(int sysno) {
// TODO(jln): classify this better.
bool SyscallSets::IsMisc(int sysno) {
switch (sysno) {
+#if !defined(_mips_)
+ case __NR_getrandom:
+#endif
case __NR_name_to_handle_at:
case __NR_open_by_handle_at:
case __NR_perf_event_open:

Powered by Google App Engine
This is Rietveld 408576698