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

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

Issue 1975393002: Check stack pointer to be inside stack when unwinding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix renderer deadlock on Linux Created 4 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-helpers/baseline_policy.cc
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
index 2bf572c0b3cd84d640db6abbcb7dcadb511060e4..0c03a00b3f222a7043ec0d24bb039b407c011b66 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "base/debug/debugging_flags.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "sandbox/linux/bpf_dsl/bpf_dsl.h"
@@ -126,6 +127,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
#endif // defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) ||
// defined(MEMORY_SANITIZER)
+#if BUILDFLAG(ENABLE_PROFILING) && defined(__GLIBC__)
+ // Native heap profiler uses pthread_getattr_np() which calls
+ // sched_getaffinity.
+ if (sysno == __NR_sched_getaffinity) {
+ return Allow();
+ }
+#endif
+
if (IsBaselinePolicyAllowed(sysno)) {
return Allow();
}

Powered by Google App Engine
This is Rietveld 408576698