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

Issue 11557025: Linux sandbox: add a new low-level broker process mechanism. (Closed)

Created:
8 years ago by jln (very slow on Chromium)
Modified:
8 years ago
CC:
chromium-reviews, agl, jln+watch_chromium.org
Visibility:
Public.

Description

Linux sandbox: add a new low-level broker process mechanism. We add a new low-level broker process mechanism that can be async signal safe and is suitable for use in the seccomp-bpf sandbox. Also fix UnixDomainSocket::SendMsg() to never generate a SIGPIPE. BUG=165837 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173064

Patch Set 1 #

Total comments: 13

Patch Set 2 : Overcome C++03 limitation by using a default parameter. #

Patch Set 3 : No SIGPIPE in sendmsg. #

Patch Set 4 : Address a few nits pointed out by Jorge. #

Patch Set 5 : Move implementation constants out of interface. #

Total comments: 7

Patch Set 6 : Add a BPF test that makes use of the broker process. #

Patch Set 7 : Address Jorge's comments. #

Total comments: 22

Patch Set 8 : Address most of Markus' comments. #

Patch Set 9 : Support openat() properly in test. #

Patch Set 10 : Support both RO and RW files in constructors. RW is still unsupported. #

Patch Set 11 : Add support for more flags and writing. #

Patch Set 12 : Add file writing test. #

Total comments: 22

Patch Set 13 : Address comments from Jorge. #

Patch Set 14 : Better support for flags. #

Total comments: 12

Patch Set 15 : More centralized flags checking. #

Patch Set 16 : Add copyright notice #

Unified diffs Side-by-side diffs Delta from patch set Stats (+810 lines, -1 line) Patch
M base/posix/unix_domain_socket.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sandbox/linux/sandbox_linux.gypi View 3 chunks +17 lines, -0 lines 0 comments Download
M sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +100 lines, -0 lines 0 comments Download
A sandbox/linux/services/broker_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +71 lines, -0 lines 0 comments Download
A sandbox/linux/services/broker_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +350 lines, -0 lines 0 comments Download
A sandbox/linux/services/broker_process_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +271 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
jln (very slow on Chromium)
This CL is not final yet, I need to add support for the sandboxing call ...
8 years ago (2012-12-13 01:54:23 UTC) #1
Jorge Lucangeli Obes
Some high-level comments. Will take another look in the shuttle. https://chromiumcodereview.appspot.com/11557025/diff/1/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/1/sandbox/linux/services/broker_process.cc#newcode22 ...
8 years ago (2012-12-13 02:14:53 UTC) #2
jln (very slow on Chromium)
Thanks! PTAL. https://chromiumcodereview.appspot.com/11557025/diff/1/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/1/sandbox/linux/services/broker_process.cc#newcode22 sandbox/linux/services/broker_process.cc:22: // string for the white list. On ...
8 years ago (2012-12-13 02:33:14 UTC) #3
Jorge Lucangeli Obes (Google)
I think you should add this in the first take. No use to land something ...
8 years ago (2012-12-13 04:28:52 UTC) #4
Jorge Lucangeli Obes
This looks good. I'd rather LGTM tomorrow after running the unit tests on ARM. https://chromiumcodereview.appspot.com/11557025/diff/8/sandbox/linux/services/broker_process.cc ...
8 years ago (2012-12-13 04:46:33 UTC) #5
Jorge Lucangeli Obes
On 2012/12/13 04:46:33, Jorge Lucangeli Obes wrote: > This looks good. I'd rather LGTM tomorrow ...
8 years ago (2012-12-13 04:47:08 UTC) #6
jln (very slow on Chromium)
Thanks. PTAL, I've added new tests and a few tweaks. There is now a test ...
8 years ago (2012-12-13 05:49:43 UTC) #7
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/11557025/diff/21001/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc File sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/21001/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc#newcode510 sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc:510: void *aux) { I would probably have moved the ...
8 years ago (2012-12-13 09:48:51 UTC) #8
Jorge Lucangeli Obes
There's one of the errno checks in UseOpenBroker that's failing mysteriously on daisy. I'm debugging ...
8 years ago (2012-12-13 16:57:58 UTC) #9
Jorge Lucangeli Obes
There's one of the errno checks in UseOpenBroker that's failing mysteriously on daisy. I'm debugging ...
8 years ago (2012-12-13 16:57:58 UTC) #10
jln (very slow on Chromium)
I've addressed most of your comments. I'll handle O_RDWR and other flags in a next ...
8 years ago (2012-12-13 19:27:17 UTC) #11
jln (very slow on Chromium)
Will: that CL is not finished yet, but the tiny change to base/ is final. ...
8 years ago (2012-12-13 19:47:00 UTC) #12
willchan no longer on Chromium
I'm inclined to believe you that this makes sense, but can you explain why and ...
8 years ago (2012-12-13 19:59:22 UTC) #13
jln (very slow on Chromium)
On 2012/12/13 19:59:22, willchan wrote: > I'm inclined to believe you that this makes sense, ...
8 years ago (2012-12-13 20:35:05 UTC) #14
willchan no longer on Chromium
lgtm
8 years ago (2012-12-13 20:38:54 UTC) #15
jln (very slow on Chromium)
jorgelo / markus: PTAL!
8 years ago (2012-12-13 23:27:31 UTC) #16
Jorge Lucangeli Obes
lgtm but please check the alignment comment. https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc#newcode32 sandbox/linux/services/broker_process.cc:32: // Make ...
8 years ago (2012-12-13 23:52:46 UTC) #17
Jorge Lucangeli Obes
unit tests pass on ARM
8 years ago (2012-12-13 23:53:01 UTC) #18
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc#newcode32 sandbox/linux/services/broker_process.cc:32: // Make sure that callers never pass a non ...
8 years ago (2012-12-14 00:07:28 UTC) #19
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc#newcode54 sandbox/linux/services/broker_process.cc:54: O_RDONLY | O_WRONLY | O_RDWR | These do look ...
8 years ago (2012-12-14 00:40:34 UTC) #20
jln (very slow on Chromium)
Thanks, PTAL! https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/20007/sandbox/linux/services/broker_process.cc#newcode54 sandbox/linux/services/broker_process.cc:54: O_RDONLY | O_WRONLY | O_RDWR | On ...
8 years ago (2012-12-14 01:11:28 UTC) #21
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/11557025/diff/21006/sandbox/linux/services/broker_process.cc File sandbox/linux/services/broker_process.cc (right): https://chromiumcodereview.appspot.com/11557025/diff/21006/sandbox/linux/services/broker_process.cc#newcode26 sandbox/linux/services/broker_process.cc:26: int UnspportedFlagsMask() { s/UnspportedFlagsMask/UnsupportedFlagsMask/g You might even consider calling ...
8 years ago (2012-12-14 01:36:23 UTC) #22
jln (very slow on Chromium)
Thank, PTAL! I've centralized the flags checking more. Hopefully this is much more clear now. ...
8 years ago (2012-12-14 02:01:19 UTC) #23
Markus (顧孟勤)
lgtm As I mentioned before, I don't think it's ideal. But it'll do for now. ...
8 years ago (2012-12-14 02:10:41 UTC) #24
Jorge Lucangeli Obes
Unit tests still passing.
8 years ago (2012-12-14 02:13:20 UTC) #25
jln (very slow on Chromium)
On 2012/12/14 02:10:41, Markus (顧孟勤) wrote: > lgtm > > As I mentioned before, I ...
8 years ago (2012-12-14 02:19:25 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jln@chromium.org/11557025/6021
8 years ago (2012-12-14 02:20:36 UTC) #27
commit-bot: I haz the power
Presubmit check for 11557025-6021 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-14 02:20:40 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jln@chromium.org/11557025/19015
8 years ago (2012-12-14 03:09:43 UTC) #29
commit-bot: I haz the power
Change committed as 173064
8 years ago (2012-12-14 03:18:30 UTC) #30
jln (very slow on Chromium)
8 years ago (2012-12-14 04:19:19 UTC) #31
Message was sent while issue was closed.
Reverted because of a compile failure on MAC. Re-landing in
https://codereview.chromium.org/11564030

Powered by Google App Engine
This is Rietveld 408576698