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

Issue 10458040: Initial snapshot of the new BPF-enabled seccomp sandbox. This code is (Closed)

Created:
8 years, 6 months ago by Markus (顧孟勤)
Modified:
8 years, 6 months ago
CC:
Chris Evans, drewry_chromium.org, chromium-reviews, agl, jln+watch_chromium.org
Visibility:
Public.

Description

Initial snapshot of the new BPF-enabled seccomp sandbox. This code is still quite incomplete. In fact, it barely even compiles. You can use the Makefile to experiment with it, but we deliberately have not integrated it with the Chrome build system at this time. The main intention for checking in the code at this point is to give others a chance to take a look at the API. We made a few changes already, and I want to make sure I give everybody an opportunity to speak up, if they still want further revisions of the publicly exposed API. BUG=130662 TEST=build with Makefile, then run demo32 and demo64 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140407

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Total comments: 13

Patch Set 4 : #

Total comments: 38

Patch Set 5 : #

Total comments: 20

Patch Set 6 : #

Total comments: 15

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1083 lines, -0 lines) Patch
A sandbox/linux/seccomp_bpf/Makefile View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp_bpf/demo.cc View 1 2 3 4 1 chunk +308 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp_bpf/sandbox_bpf.h View 1 2 3 4 5 6 7 1 chunk +244 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp_bpf/sandbox_bpf.cc View 1 2 3 4 5 6 7 8 1 chunk +319 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp_bpf/util.h View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A sandbox/linux/seccomp_bpf/util.cc View 1 2 3 1 chunk +162 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
Markus (顧孟勤)
Feel free to critique, but at this stage I am more interested in comments on ...
8 years, 6 months ago (2012-05-30 19:10:53 UTC) #1
jln (very slow on Chromium)
I took a very quick high level look. I would recommend simplifying still a bit ...
8 years, 6 months ago (2012-05-30 20:31:20 UTC) #2
cevans
On Wed, May 30, 2012 at 1:31 PM, <jln@chromium.org> wrote: > I took a very ...
8 years, 6 months ago (2012-05-30 20:37:11 UTC) #3
Jorge Lucangeli Obes
On Wed, May 30, 2012 at 1:37 PM, Chris Evans <cevans@google.com> wrote: > On Wed, ...
8 years, 6 months ago (2012-05-30 20:43:05 UTC) #4
Markus (顧孟勤)
Please take another look. I have been stripping out all things that are conceivably complicated ...
8 years, 6 months ago (2012-05-31 01:00:58 UTC) #5
Markus (顧孟勤)
By Julien's request, I removed the C-style API for now. We might not ever need ...
8 years, 6 months ago (2012-05-31 01:16:40 UTC) #6
jln (very slow on Chromium)
Looks good in general. I didn't review some details yet and I didn't look at ...
8 years, 6 months ago (2012-05-31 21:01:05 UTC) #7
Will Drewry
skimming things https://chromiumcodereview.appspot.com/10458040/diff/8003/sandbox/linux/seccomp_bpf/demo.cc File sandbox/linux/seccomp_bpf/demo.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/8003/sandbox/linux/seccomp_bpf/demo.cc#newcode35 sandbox/linux/seccomp_bpf/demo.cc:35: static playground2::Sandbox::ErrorCode evaluator(int sysno) { is it ...
8 years, 6 months ago (2012-05-31 21:20:21 UTC) #8
Markus (顧孟勤)
I think, I addressed the majority of issues raised so far. PTAL
8 years, 6 months ago (2012-06-01 02:49:15 UTC) #9
Jorge Lucangeli Obes
https://chromiumcodereview.appspot.com/10458040/diff/8004/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/8004/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode172 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:172: // eventually. Definitely. In particular, we cannot keep "hot" ...
8 years, 6 months ago (2012-06-01 03:06:18 UTC) #10
Markus (顧孟勤)
I know, and I have a plan for how to do this (and I have ...
8 years, 6 months ago (2012-06-01 06:33:31 UTC) #11
Jorge Lucangeli Obes
On 2012/06/01 06:33:31, Markus (顧孟勤) wrote: > I know, and I have a plan for ...
8 years, 6 months ago (2012-06-01 14:41:30 UTC) #12
jln (very slow on Chromium)
LGTM I am in favor in landing this so that we can all continue working ...
8 years, 6 months ago (2012-06-01 19:30:29 UTC) #13
cevans
On Fri, Jun 1, 2012 at 12:30 PM, <jln@chromium.org> wrote: > LGTM > > I ...
8 years, 6 months ago (2012-06-01 19:34:34 UTC) #14
Chris Evans
Here are some quick comments. This looks like a good base we can build on. ...
8 years, 6 months ago (2012-06-01 20:07:55 UTC) #15
jln (very slow on Chromium)
On 2012/06/01 20:07:55, Chris Evans wrote: > Here are some quick comments. > > This ...
8 years, 6 months ago (2012-06-01 20:15:58 UTC) #16
Markus (顧孟勤)
I think we are starting to reach the point of diminishing returns. But I do ...
8 years, 6 months ago (2012-06-01 21:38:52 UTC) #17
Chris Evans
Another quick round. https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode11 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:11: Redundant newline. https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode27 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:27: Sandbox::SandboxStatus Sandbox::supportsSeccompSandbox(int ...
8 years, 6 months ago (2012-06-01 22:48:23 UTC) #18
Chris Evans
On Fri, Jun 1, 2012 at 2:38 PM, <markus@chromium.org> wrote: > I think we are ...
8 years, 6 months ago (2012-06-01 22:52:51 UTC) #19
Markus (顧孟勤)
On Fri, Jun 1, 2012 at 3:52 PM, Chris Evans <cevans@chromium.org> wrote: > You do ...
8 years, 6 months ago (2012-06-01 23:00:45 UTC) #20
cevans
On Fri, Jun 1, 2012 at 4:00 PM, Markus Gutschke <markus@chromium.org> wrote: > On Fri, ...
8 years, 6 months ago (2012-06-01 23:05:13 UTC) #21
Markus (顧孟勤)
This can be made to work with a multi-threaded zygote, but it will make the ...
8 years, 6 months ago (2012-06-01 23:32:43 UTC) #22
Markus (顧孟勤)
https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode11 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:11: On 2012/06/01 22:48:23, Chris Evans wrote: > Redundant newline. ...
8 years, 6 months ago (2012-06-01 23:46:33 UTC) #23
cevans
On Fri, Jun 1, 2012 at 4:46 PM, <markus@chromium.org> wrote: > > https://chromiumcodereview.**appspot.com/10458040/diff/** > 18001/sandbox/linux/seccomp_**bpf/sandbox_bpf.cc<https://chromiumcodereview.appspot.com/10458040/diff/18001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc> ...
8 years, 6 months ago (2012-06-02 03:21:12 UTC) #24
Markus (顧孟勤)
On Fri, Jun 1, 2012 at 8:21 PM, Chris Evans <cevans@google.com> wrote: > From the ...
8 years, 6 months ago (2012-06-02 03:45:58 UTC) #25
Markus (顧孟勤)
I still need an official LGTM. Is there anything that is holding it up? If ...
8 years, 6 months ago (2012-06-04 17:52:49 UTC) #26
cevans
On Mon, Jun 4, 2012 at 10:52 AM, Markus Gutschke <markus@chromium.org>wrote: > I still need ...
8 years, 6 months ago (2012-06-04 18:37:30 UTC) #27
Chris Evans
https://chromiumcodereview.appspot.com/10458040/diff/20003/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/20003/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode48 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:48: isSingleThreaded(proc_fd)) { Don't we go straight to STATUS_AVAILABLE at ...
8 years, 6 months ago (2012-06-04 19:17:25 UTC) #28
Markus (顧孟勤)
PTAL https://chromiumcodereview.appspot.com/10458040/diff/20003/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/20003/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode48 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:48: isSingleThreaded(proc_fd)) { OK, I changed the code. This ...
8 years, 6 months ago (2012-06-04 21:13:40 UTC) #29
Jorge Lucangeli Obes
lgtm https://chromiumcodereview.appspot.com/10458040/diff/34001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc File sandbox/linux/seccomp_bpf/sandbox_bpf.cc (right): https://chromiumcodereview.appspot.com/10458040/diff/34001/sandbox/linux/seccomp_bpf/sandbox_bpf.cc#newcode232 sandbox/linux/seccomp_bpf/sandbox_bpf.cc:232: // eventually. We'll probably want to fix this ...
8 years, 6 months ago (2012-06-04 22:16:14 UTC) #30
Jorge Lucangeli Obes
BTW are you planning on fixing the (valid) lint errors?
8 years, 6 months ago (2012-06-04 22:17:47 UTC) #31
Chris Evans
LGTM with 3 nits. Action the nits and I don't need to re-review. Thanks :D ...
8 years, 6 months ago (2012-06-04 22:21:55 UTC) #32
Markus (顧孟勤)
On 2012/06/04 22:17:47, Jorge Lucangeli Obes wrote: > BTW are you planning on fixing the ...
8 years, 6 months ago (2012-06-04 22:24:43 UTC) #33
Jorge Lucangeli Obes
On 2012/06/04 22:24:43, Markus (顧孟勤) wrote: > On 2012/06/04 22:17:47, Jorge Lucangeli Obes wrote: > ...
8 years, 6 months ago (2012-06-04 22:27:59 UTC) #34
Markus (顧孟勤)
8 years, 6 months ago (2012-06-04 22:37:29 UTC) #35
Whew. It's committed. Open the floodgates :-)

Now, jln and everybody else can send CLs too...

On Mon, Jun 4, 2012 at 3:27 PM, <jorgelo@chromium.org> wrote:

> On 2012/06/04 22:24:43, Markus (顧孟勤) wrote:
>
>> On 2012/06/04 22:17:47, Jorge Lucangeli Obes wrote:
>> > BTW are you planning on fixing the (valid) lint errors?
>>
>
>  Which ones are you thinking of in particular?
>>
>
>  I fixed the C-style casts, except for one case where they seemed really
>> counter-productive.
>>
>
>  The errors about missing NL at end of file seem incorrect, as far as I can
>>
> tell.
>
>> The NL is there.
>>
> Cool =)
>
>  There are a handful of other lint errors that are clearly not appropriate
>> to
>> this code.
>>
> Agreed.
>
>  There are two cases of missing spaces; I'll upload a new patch with these
>> changes.
>>
> Perfect.
>
>  There are a couple of complaints about asterisks being in the wrong
>> place. If
>> you really insist on it, I can fix that. But it is annoying in low-level
>> code
>>
> as
>
>> it keep conflicting with the conventions used by everybody else --
>> especially
>>
> by
>
>> kernel headers that we need to reference.
>>
> I don't really care about those.
>
>> What else is there?
>>
>
> Was mostly thinking about the newlines and spaces. So we're good. Thanks!
>
>
https://chromiumcodereview.**appspot.com/10458040/<https://chromiumcodereview...
>

Powered by Google App Engine
This is Rietveld 408576698