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

Unified Diff: content/renderer/renderer_main_platform_delegate_android.cc

Issue 759403002: Add --enable-seccomp-filter-sandbox to about:flags on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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 | « content/public/common/content_switches.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main_platform_delegate_android.cc
diff --git a/content/renderer/renderer_main_platform_delegate_android.cc b/content/renderer/renderer_main_platform_delegate_android.cc
index b4eef97b6babcd092d43ad4c86126c38b7814a19..8ef130375a7f62d9e6a790ef23f415e84985d6df 100644
--- a/content/renderer/renderer_main_platform_delegate_android.cc
+++ b/content/renderer/renderer_main_platform_delegate_android.cc
@@ -35,6 +35,12 @@ bool RendererMainPlatformDelegate::EnableSandbox() {
switches::kEnableSeccompFilterSandbox)) {
return true;
}
+ if (!sandbox::SandboxBPF::SupportsSeccompSandbox(
+ sandbox::SandboxBPF::SeccompLevel::MULTI_THREADED)) {
+ LOG(WARNING) << "Seccomp-BPF sandbox enabled without kernel support. "
+ << "Ignoring flag and proceeding without seccomp sandbox.";
+ return true;
+ }
sandbox::SandboxBPF sandbox(new SandboxBPFBasePolicyAndroid());
CHECK(
« no previous file with comments | « content/public/common/content_switches.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698