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

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: Rename #define's and extract ARM private syscall logic. 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
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)) {
jln (very slow on Chromium) 2012/10/11 22:42:00 I don't understand why this would work. For instan
Jorge Lucangeli Obes 2012/10/12 17:58:23 Done.
+ 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,

Powered by Google App Engine
This is Rietveld 408576698