diff options
author | Ricky Zhou <rickyz@chromium.org> | 2016-02-12 15:27:42 -0800 |
---|---|---|
committer | Ricky Zhou <rickyz@chromium.org> | 2016-02-12 23:29:08 +0000 |
commit | 1430bbebd6e380a331ebe8de4cadf8149f2c4c42 (patch) | |
tree | b4c38496b6fd4322f31a4123bb40247462f26b41 /content | |
parent | 3411ba49d77eb776031675b3a678767632f7cb75 (diff) | |
download | chromium_src-1430bbebd6e380a331ebe8de4cadf8149f2c4c42.zip chromium_src-1430bbebd6e380a331ebe8de4cadf8149f2c4c42.tar.gz chromium_src-1430bbebd6e380a331ebe8de4cadf8149f2c4c42.tar.bz2 |
Use the suid helper for oom_score_adj on Chrome OS.
Reverts https://codereview.chromium.org/1560033003/ for Chrome OS.
Chrome OS has a kernel patch which restricts the permissions of
oom_score_adj.
BUG=576409
TBR=mdempsky@chromium.org
Review URL: https://codereview.chromium.org/1671233002
Cr-Commit-Position: refs/heads/master@{#373959}
(cherry picked from commit 64068c39982ad795f5041302500d85ce5fef54aa)
Review URL: https://codereview.chromium.org/1692183005 .
Cr-Commit-Position: refs/branch-heads/2623@{#388}
Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/zygote_host/zygote_host_impl_linux.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc index f439e06..5c964c5 100644 --- a/content/browser/zygote_host/zygote_host_impl_linux.cc +++ b/content/browser/zygote_host/zygote_host_impl_linux.cc @@ -163,6 +163,14 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) { use_suid_sandbox_for_adj_oom_score_ = !sandbox_binary_.empty() && using_suid_sandbox; +#if defined(OS_CHROMEOS) + // Chrome OS has a kernel patch that restricts oom_score_adj. See + // crbug.com/576409 for details. + if (!sandbox_binary_.empty() && using_namespace_sandbox) { + use_suid_sandbox_for_adj_oom_score_ = true; + } +#endif + // Start up the sandbox host process and get the file descriptor for the // renderers to talk to it. const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket(); |