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

Issue 99133015: Linux Sandbox: split the GPU policies to their own file. (Closed)

Created:
7 years ago by jln (very slow on Chromium)
Modified:
7 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, jln+watch_chromium.org, piman+watch_chromium.org
Visibility:
Public.

Description

Linux Sandbox: split the GPU policies to their own files. We split the GPU policies to their own independant files in order to make sandbox_seccomp_bpf_linux.cc more sane. Moreover, we clean up the logic so that the "WarmUp" process is an implementation of SandboxBPFBasePolicy::PreSandboxHook(). More work remains to clean-up the GPU policies, but this is an important first step. In addition, we put all Linux sandboxing related files in content/common in a new sandbox_linux directory. BUG=325535 R=jorgelo@chromium.org, mseaborn@chromium.org, piman@chromium.org, rsesek@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240509

Patch Set 1 : #

Patch Set 2 : Don't inline PreSandboxHook() #

Patch Set 3 : Cleanup InitGpuBrokerProcess. #

Total comments: 14

Patch Set 4 : Split the two GPU policies cleanly. #

Patch Set 5 : Remove obsolete InitGpuBrokerProcess argument. #

Total comments: 17

Patch Set 6 : Address nits. #

Patch Set 7 : Don't link extra files to NaCl. #

Total comments: 4

Patch Set 8 : Use IN_NACL_HELPER #

Patch Set 9 : Reupload because Appengine is broken. #

Total comments: 2

Patch Set 10 : Rename GPU BPF files. #

Patch Set 11 : Reupload because AppEngine is broken. #

Patch Set 12 : Rebase + alphabetize GYP file. #

Total comments: 6

Patch Set 13 : Address nits from Mark. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+642 lines, -1837 lines) Patch
M components/nacl.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_sandbox_host_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/OWNERS View 1 chunk +0 lines, -5 lines 0 comments Download
M content/common/child_process_sandbox_support_impl_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/child_process_sandbox_support_impl_shm_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
D content/common/sandbox_bpf_base_policy_linux.h View 1 chunk +0 lines, -40 lines 0 comments Download
D content/common/sandbox_bpf_base_policy_linux.cc View 1 chunk +0 lines, -36 lines 0 comments Download
D content/common/sandbox_init_linux.cc View 1 chunk +0 lines, -21 lines 0 comments Download
D content/common/sandbox_linux.h View 1 chunk +0 lines, -108 lines 0 comments Download
D content/common/sandbox_linux.cc View 1 chunk +0 lines, -299 lines 0 comments Download
A + content/common/sandbox_linux/OWNERS View 1 chunk +1 line, -1 line 0 comments Download
A + content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -21 lines 0 comments Download
A content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc View 1 2 3 4 5 6 7 8 9 1 chunk +226 lines, -0 lines 0 comments Download
A content/common/sandbox_linux/bpf_gpu_policy_linux.h View 1 2 3 4 5 6 7 8 9 1 chunk +57 lines, -0 lines 0 comments Download
A content/common/sandbox_linux/bpf_gpu_policy_linux.cc View 1 2 3 4 5 6 7 8 9 1 chunk +247 lines, -0 lines 0 comments Download
A + content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h View 1 2 3 4 5 3 chunks +12 lines, -3 lines 0 comments Download
A + content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
A + content/common/sandbox_linux/sandbox_init_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/common/sandbox_linux/sandbox_linux.h View 2 chunks +3 lines, -4 lines 0 comments Download
A + content/common/sandbox_linux/sandbox_linux.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A + content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +43 lines, -416 lines 0 comments Download
D content/common/sandbox_seccomp_bpf_linux.h View 1 chunk +0 lines, -53 lines 0 comments Download
D content/common/sandbox_seccomp_bpf_linux.cc View 1 chunk +0 lines, -803 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -7 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/ppapi_plugin/ppapi_plugin_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/renderer_main_platform_delegate_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/utility/utility_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/worker/worker_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/zygote/zygote_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/zygote/zygote_main_linux.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
jln (very slow on Chromium)
Jorge, can you please take a look ? Robert: if you have some time, please ...
7 years ago (2013-12-12 01:32:18 UTC) #1
jln (very slow on Chromium)
Note: this has been quickly tested on a "Daisy" device: about:gpu says "sandboxed true".
7 years ago (2013-12-12 01:33:32 UTC) #2
jln (very slow on Chromium)
I had to bump the "move detection" threshold for this CL. The review tool is ...
7 years ago (2013-12-12 01:44:26 UTC) #3
jln (very slow on Chromium)
I'll actually fold the next CL into this to split sandbox_bpf_gpu_policy_linux.cc in two parts.
7 years ago (2013-12-12 19:31:26 UTC) #4
Robert Sesek
https://chromiumcodereview.appspot.com/99133015/diff/120001/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h File content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h (right): https://chromiumcodereview.appspot.com/99133015/diff/120001/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h#newcode35 content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h:35: virtual bool PreSandboxHook(); nit: blank line before comment and ...
7 years ago (2013-12-12 21:33:47 UTC) #5
Jorge Lucangeli Obes
https://chromiumcodereview.appspot.com/99133015/diff/80001/components/nacl.gyp File components/nacl.gyp (right): https://chromiumcodereview.appspot.com/99133015/diff/80001/components/nacl.gyp#newcode194 components/nacl.gyp:194: '../content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc', Do we want to keep the sandbox_ prefixes ...
7 years ago (2013-12-12 21:37:21 UTC) #6
Robert Sesek
https://chromiumcodereview.appspot.com/99133015/diff/80001/content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.cc File content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.cc (right): https://chromiumcodereview.appspot.com/99133015/diff/80001/content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.cc#newcode133 content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.cc:133: void set_broker_process(BrokerProcess* broker_process) { On 2013/12/12 21:37:21, Jorge Lucangeli ...
7 years ago (2013-12-12 21:41:42 UTC) #7
jln (very slow on Chromium)
Thanks, PTAL! https://chromiumcodereview.appspot.com/99133015/diff/80001/components/nacl.gyp File components/nacl.gyp (right): https://chromiumcodereview.appspot.com/99133015/diff/80001/components/nacl.gyp#newcode194 components/nacl.gyp:194: '../content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc', On 2013/12/12 21:37:21, Jorge Lucangeli Obes ...
7 years ago (2013-12-12 22:15:14 UTC) #8
jln (very slow on Chromium)
Mark: can you approve components/nacl.gyp ? Also, what do you think of https://chromiumcodereview.appspot.com/99133015/diff2/140001:220001/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc to keep ...
7 years ago (2013-12-12 23:38:00 UTC) #9
Jorge Lucangeli Obes
lgtm
7 years ago (2013-12-12 23:53:13 UTC) #10
jln (very slow on Chromium)
Antoine: could you approve this CL as content/ OWNER? I'm moving the Linux sandbox files ...
7 years ago (2013-12-12 23:56:37 UTC) #11
Mark Seaborn
https://chromiumcodereview.appspot.com/99133015/diff/220001/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc File content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc (right): https://chromiumcodereview.appspot.com/99133015/diff/220001/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc#newcode297 content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc:297: #if !defined(NACL_LINUX) This is abusing the NACL_LINUX macro somewhat. ...
7 years ago (2013-12-13 00:03:47 UTC) #12
piman
On 2013/12/12 23:56:37, jln wrote: > Antoine: could you approve this CL as content/ OWNER? ...
7 years ago (2013-12-13 00:03:58 UTC) #13
jln (very slow on Chromium)
Thanks Mark. PTAL! https://chromiumcodereview.appspot.com/99133015/diff/220001/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc File content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc (right): https://chromiumcodereview.appspot.com/99133015/diff/220001/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc#newcode297 content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc:297: #if !defined(NACL_LINUX) On 2013/12/13 00:03:48, Mark ...
7 years ago (2013-12-13 00:20:42 UTC) #14
Jorge Lucangeli Obes
Tested on leon (x86_64 Intel) and GPU is sandboxed. https://chromiumcodereview.appspot.com/99133015/diff/160002/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc File content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc (right): https://chromiumcodereview.appspot.com/99133015/diff/160002/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc#newcode342 content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc:342: ...
7 years ago (2013-12-13 00:24:39 UTC) #15
jln (very slow on Chromium)
Thanks for the test Jorge! https://chromiumcodereview.appspot.com/99133015/diff/160002/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc File content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc (right): https://chromiumcodereview.appspot.com/99133015/diff/160002/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc#newcode342 content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc:342: ignore_result(IsChromeOS); On 2013/12/13 00:24:40, ...
7 years ago (2013-12-13 00:26:22 UTC) #16
Mark Seaborn
LGTM for NaCl parts https://chromiumcodereview.appspot.com/99133015/diff/320001/components/nacl.gyp File components/nacl.gyp (right): https://chromiumcodereview.appspot.com/99133015/diff/320001/components/nacl.gyp#newcode184 components/nacl.gyp:184: # Allow .cc files to ...
7 years ago (2013-12-13 01:08:47 UTC) #17
jln (very slow on Chromium)
Thanks Mark! https://codereview.chromium.org/99133015/diff/320001/components/nacl.gyp File components/nacl.gyp (right): https://codereview.chromium.org/99133015/diff/320001/components/nacl.gyp#newcode184 components/nacl.gyp:184: # Allow .cc files to know if ...
7 years ago (2013-12-13 01:31:31 UTC) #18
Robert Sesek
LGTM https://chromiumcodereview.appspot.com/99133015/diff/120001/content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.h File content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.h (right): https://chromiumcodereview.appspot.com/99133015/diff/120001/content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.h#newcode36 content/common/sandbox_linux/sandbox_bpf_gpu_policy_linux.h:36: bool (*broker_sandboxer_callback)(void), On 2013/12/12 22:15:14, jln wrote: > ...
7 years ago (2013-12-13 01:39:15 UTC) #19
jln (very slow on Chromium)
Committed patchset #13 manually as r240509 (presubmit successful).
7 years ago (2013-12-13 01:46:05 UTC) #20
scottmg
7 years ago (2013-12-13 06:19:47 UTC) #21
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/114483003/ by scottmg@chromium.org.

The reason for reverting is: Appears to have caused failures on linux dbg test
1.

Powered by Google App Engine
This is Rietveld 408576698