 Chromium Code Reviews
 Chromium Code Reviews Issue 260793003:
  [MIPS] Add seccomp bpf support  (Closed) 
  Base URL: https://git.chromium.org/git/chromium/src.git@master
    
  
    Issue 260793003:
  [MIPS] Add seccomp bpf support  (Closed) 
  Base URL: https://git.chromium.org/git/chromium/src.git@master| 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 |