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

Unified Diff: sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc

Issue 550473002: Linux sandbox: whitelist allowed Futex operations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move Android futex definitions to the existing separate file. Created 6 years, 3 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-helpers/baseline_policy_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
index 3d92af01e52c8e588a5e44c91b7db091d96d98fe..f54882cd1fd7ba144f09c3a8943830da4cff4db0 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -271,6 +271,14 @@ BPF_DEATH_TEST_C(BaselinePolicy,
syscall(__NR_futex, NULL, FUTEX_CMP_REQUEUE_PI_PRIVATE, 0, NULL, NULL, 0);
_exit(1);
}
+
+BPF_DEATH_TEST_C(BaselinePolicy,
+ FutexWithUnlockPIPrivate,
+ DEATH_MESSAGE(GetFutexErrorMessageContentForTests()),
+ BaselinePolicy) {
+ syscall(__NR_futex, NULL, FUTEX_UNLOCK_PI_PRIVATE, 0, NULL, NULL, 0);
+ _exit(1);
+}
#endif // !defined(OS_ANDROID)
BPF_TEST_C(BaselinePolicy, PrctlDumpable, BaselinePolicy) {

Powered by Google App Engine
This is Rietveld 408576698