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

Issue 379019: NaCl mac sandbox file. To be used with sandbox-exec.

Created:
11 years, 1 month ago by neha
Modified:
11 years, 1 month ago
Reviewers:
bsy, Mark Mentovai, jeremy
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

NaCl mac sandbox file. To be used with sandbox-exec.

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -0 lines) Patch
A src/trusted/sandbox/mac/nacl-sandbox.sb View 1 chunk +42 lines, -0 lines 11 comments Download

Messages

Total messages: 3 (0 generated)
neha
11 years, 1 month ago (2009-11-10 01:22:09 UTC) #1
Mark Mentovai
Jeremy wrote Chrome's .sb files, I'm adding him to this in case he wants to ...
11 years, 1 month ago (2009-11-10 02:12:44 UTC) #2
jeremy
11 years, 1 month ago (2009-11-10 08:26:23 UTC) #3
Thanks for looking into this!

The Chrome renderer has pretty broad coverage in terms of system APIs and yet we
manage to keep the sandbox config file very small by "warming up" APIs that are
needed and only then enabling the Sandbox programmatically.

If that's not possible here I'd be grateful if you could explain the limitations
in more detail to give us a better picture.

http://codereview.chromium.org/379019/diff/1/2
File src/trusted/sandbox/mac/nacl-sandbox.sb (right):

http://codereview.chromium.org/379019/diff/1/2#newcode5
Line 5: ;; Run with sandbox-exec -f ./nacl-sandbox.sb -- sel_ldr -f module.nexe
In the rest of Chrome we turn on the Sandbox programmatically, could you do that
here too and add the code for that to this CL.

Also, rather than a whole custom sandbox definition, could you start off with
the contents of worker.sb and then add exceptions as needed.  This will also
help in the future when we hopefully have a common configuration we #include
from other configurations.

http://codereview.chromium.org/379019/diff/1/2#newcode8
Line 8: (debug deny)
Like Mark said, this is why I think it's best you start with worker.sb and add
exceptions as needed.

http://codereview.chromium.org/379019/diff/1/2#newcode10
Line 10: (allow file-read-data (regex #"Frameworks/SDL.framework"))
Are you sure you need this?  Can you load this programmatically before enabling
the Sandbox?  Same goes for the rest bellow - if you can access things before
turning on the Sandbox and remove these exceptions, that would be optimal.

http://codereview.chromium.org/379019/diff/1/2#newcode15
Line 15: (import "/usr/share/sandbox/bsd.sb")
Do you need all of this?  in Chrome we don't and we do alot of stuff in there. 
I recommend that you start from worker.sb and add exceptions as needed.

http://codereview.chromium.org/379019/diff/1/2#newcode28
Line 28: (allow mach-lookup (global-name
Why do you need all of these?  we make do without them in the renderer?

Powered by Google App Engine
This is Rietveld 408576698