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

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

Issue 260793003: [MIPS] Add seccomp bpf support (Closed) Base URL: https://git.chromium.org/git/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 8 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/syscall_iterator.cc
diff --git a/sandbox/linux/seccomp-bpf/syscall_iterator.cc b/sandbox/linux/seccomp-bpf/syscall_iterator.cc
index 89cc1cb473cc911cd0c1254129624f13d422174c..3e624fc4115155fbfda676bf982ab600714d28e2 100644
--- a/sandbox/linux/seccomp-bpf/syscall_iterator.cc
+++ b/sandbox/linux/seccomp-bpf/syscall_iterator.cc
@@ -16,9 +16,15 @@ uint32_t SyscallIterator::Next() {
uint32_t val;
do {
+#if defined(__mips__) && (_MIPS_SIM == _MIPS_SIM_ABI32)
+ // |num_| has been initialized to 4000, which we assume is also MIN_SYSCALL.
+ // This is true for Mips O32 ABI.
+ COMPILE_ASSERT(MIN_SYSCALL == __NR_Linux, min_syscall_should_be_4000);
jln (very slow on Chromium) 2014/05/02 20:42:04 The syscall iterator should always start at 0, thi
nedeljko 2014/05/07 15:40:05 I initialized num_ to 0 in constructor in new patc
+#else
// |num_| has been initialized to 0, which we assume is also MIN_SYSCALL.
// This true for supported architectures (Intel and ARM EABI).
COMPILE_ASSERT(MIN_SYSCALL == 0u, min_syscall_should_always_be_zero);
+#endif
val = num_;
// First we iterate up to MAX_PUBLIC_SYSCALL, which is equal to MAX_SYSCALL

Powered by Google App Engine
This is Rietveld 408576698