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

Unified Diff: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc

Issue 11096012: Add a platform-specific syscall number iterator. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf.cc ('k') | sandbox/linux/seccomp-bpf/syscall_iterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
index 1422b5918d9a2d875bd5366a30f27a365995ac16..ffda1a85f20cc73da68fbd428ef7c2acf3387595 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
@@ -46,6 +46,11 @@ ErrorCode BlacklistNanosleepPolicy(int sysno) {
// FIXME: we should really not have to do that in a trivial policy
return ErrorCode(ENOSYS);
}
+#if defined(__arm__)
+ if (!Sandbox::isArmPrivateSyscall(sysno)) {
+ return ErrorCode(ENOSYS);
+ }
+#endif
switch (sysno) {
case __NR_nanosleep:
return ErrorCode(EACCES);
@@ -105,6 +110,11 @@ ErrorCode BlacklistNanosleepPolicySigsys(int sysno) {
// FIXME: we should really not have to do that in a trivial policy
return ErrorCode(ENOSYS);
}
+#if defined(__arm__)
+ if (!Sandbox::isArmPrivateSyscall(sysno)) {
+ return ErrorCode(ENOSYS);
+ }
+#endif
switch (sysno) {
case __NR_nanosleep:
return Sandbox::Trap(EnomemHandler,
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf.cc ('k') | sandbox/linux/seccomp-bpf/syscall_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698