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

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

Issue 357323003: Linux sandbox: add space for 8 parameters to the Syscall() class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove leading colon from the error message string Created 6 years, 5 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/syscall.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/syscall.cc
diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc
index 64c0b8eb9b41b708482571febc4d417b3e1110c4..0a028b72698a39226566ef093668de6f2154ecf7 100644
--- a/sandbox/linux/seccomp-bpf/syscall.cc
+++ b/sandbox/linux/seccomp-bpf/syscall.cc
@@ -8,6 +8,7 @@
#include <errno.h>
#include "base/basictypes.h"
+#include "base/logging.h"
namespace sandbox {
@@ -181,7 +182,9 @@ intptr_t Syscall::Call(int nr,
intptr_t p2,
intptr_t p3,
intptr_t p4,
- intptr_t p5) {
+ intptr_t p5,
+ intptr_t p6,
+ intptr_t p7) {
// We rely on "intptr_t" to be the exact size as a "void *". This is
// typically true, but just in case, we add a check. The language
// specification allows platforms some leeway in cases, where
@@ -192,6 +195,12 @@ intptr_t Syscall::Call(int nr,
COMPILE_ASSERT(sizeof(void*) == sizeof(intptr_t),
pointer_types_and_intptr_must_be_exactly_the_same_size);
+ // TODO(nedeljko): Enable use of more than six parameters on architectures
+ // where that makes sense.
+ DCHECK_EQ(p6, 0) << " Support for syscalls with more than six arguments not "
+ "added for this architecture";
+ DCHECK_EQ(p7, 0) << " Support for syscalls with more than six arguments not "
+ "added for this architecture";
const intptr_t args[6] = {p0, p1, p2, p3, p4, p5};
// Invoke our file-scope assembly code. The constraints have been picked
« no previous file with comments | « sandbox/linux/seccomp-bpf/syscall.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698