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/syscall.h

Issue 260793003: [MIPS] Add seccomp bpf support (Closed) Base URL: https://git.chromium.org/git/chromium/src.git@master
Patch Set: Update per code review Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/seccomp-bpf/syscall.h
diff --git a/sandbox/linux/seccomp-bpf/syscall.h b/sandbox/linux/seccomp-bpf/syscall.h
index f444d3a36303e52dd1e6498dcded12633b764c90..461ed39bc9f8ac2fd6016dfbd77d9056a02b6129 100644
--- a/sandbox/linux/seccomp-bpf/syscall.h
+++ b/sandbox/linux/seccomp-bpf/syscall.h
@@ -25,6 +25,18 @@ SANDBOX_EXPORT intptr_t SandboxSyscall(int nr,
intptr_t p4,
intptr_t p5);
+#if defined(__mips__)
+// This function basically does on MIPS what SandboxSyscall() is doing on
+// othere architectures. However, because of specificity of MIPS regarding
+// handelling syscall errors, SandboxSyscall() is made as a wrapper for this
+// function in order for SandboxSyscall() to behave more like on othere
+// architectures on places where return value from SandboxSyscall() is used
+// directly (like in the most tests).
jln (very slow on Chromium) 2014/06/03 01:00:33 "like in most tests"
nedeljko 2014/06/03 15:32:18 Done.
+intptr_t SandboxSyscallRaw(int nr,
jln (very slow on Chromium) 2014/06/03 01:00:33 Please, document |args| and |err_stat|
nedeljko 2014/06/03 15:32:18 Done.
+ const intptr_t *args,
jln (very slow on Chromium) 2014/06/03 01:00:33 Nit: chromium style is "type* variable".
nedeljko 2014/06/03 15:32:18 I was looking at the syscall.cc when I wrote this
+ intptr_t *err_stat);
+#endif // defined(__mips__)
+
// System calls can take up to six parameters. Traditionally, glibc
// implements this property by using variadic argument lists. This works, but
// confuses modern tools such as valgrind, because we are nominally passing

Powered by Google App Engine
This is Rietveld 408576698