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

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

Issue 278583005: Linux Sandbox: Add support for SECCOMP_RET_TRACE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test change 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/errorcode.cc
diff --git a/sandbox/linux/seccomp-bpf/errorcode.cc b/sandbox/linux/seccomp-bpf/errorcode.cc
index 648485282023247b26a7c85adb63ca885701542c..27a991a194c53ffb7d9984ffbc7f98d6122ba170 100644
--- a/sandbox/linux/seccomp-bpf/errorcode.cc
+++ b/sandbox/linux/seccomp-bpf/errorcode.cc
@@ -18,6 +18,11 @@ ErrorCode::ErrorCode(int err) {
error_type_ = ET_SIMPLE;
break;
default:
+ if (err & ERR_TRACE) {
jln (very slow on Chromium) 2014/05/20 03:02:10 We should also check that the rest of |err| does i
rickyz (Google) 2014/05/20 22:34:01 I changed the condition to (err & ~SECCOMP_RET_DAT
+ err_ = SECCOMP_RET_TRACE + (err & SECCOMP_RET_DATA);
+ error_type_ = ET_SIMPLE;
+ break;
+ }
SANDBOX_DIE("Invalid use of ErrorCode object");
}
}

Powered by Google App Engine
This is Rietveld 408576698