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

Issue 7677036: Enable the service runtime to use a zero-based sandbox on Linux. (Closed)

Created:
9 years, 4 months ago by Brad Chen
Modified:
9 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Enable the service runtime to use a zero-based sandbox on Linux. 32-bit ARM and x86 only for now. I will do x86-64 once these changes have settled. I have tested these changes by copying the modified .c files into a Chromium build. There are still some tests that are not building properly, but I didn't want to delay getting this part out for review. BUG=chromium:92964, nativeclient:480 TEST=manual for now Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=6521

Patch Set 1 #

Total comments: 23

Patch Set 2 : Answer early feedback, fix known build problems #

Patch Set 3 : Better protection for low pages #

Patch Set 4 : Now should green all nacl bots #

Patch Set 5 : Use mmap instead of mprotect on low pages #

Patch Set 6 : Fix usage of mmap to protect lower memory #

Patch Set 7 : minor fixes for the bots #

Patch Set 8 : more fixes for bots #

Total comments: 48

Patch Set 9 : Fixes for Mark and Bennet's reviews #

Total comments: 8

Patch Set 10 : Fixes for Bennet's review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -36 lines) Patch
M src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c View 1 2 3 4 5 6 7 8 9 2 chunks +53 lines, -15 lines 0 comments Download
M src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c View 1 2 3 4 5 6 7 8 9 2 chunks +99 lines, -21 lines 0 comments Download
M src/trusted/service_runtime/build.scons View 1 chunk +1 line, -0 lines 0 comments Download
M src/trusted/service_runtime/linux/sel_memory.c View 1 2 3 4 5 6 7 8 2 chunks +44 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/service_runtime.gyp View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M tests/multiple_sandboxes/nacl.scons View 1 1 chunk +3 lines, -0 lines 0 comments Download
M tests/unittests/trusted/service_runtime/build.scons View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Brad Chen
I will have some additional fixes for building tests before this is ready for commit.
9 years, 4 months ago (2011-08-18 22:42:04 UTC) #1
Mark Seaborn
On 18 August 2011 15:42, <bradchen@google.com> wrote: > Reviewers: bsy, bbudge1, Mark Seaborn, > > ...
9 years, 4 months ago (2011-08-18 22:54:52 UTC) #2
sehr (please use chromium)
Mostly because I've been pushing that we can get a significantly higher performance x86-64 sandbox ...
9 years, 4 months ago (2011-08-18 23:04:00 UTC) #3
Mark Seaborn
> I will have some additional fixes for building tests before this is > ready ...
9 years, 4 months ago (2011-08-18 23:09:45 UTC) #4
Mark Seaborn
On 18 August 2011 16:03, David Sehr <sehr@google.com> wrote: > Mostly because I've been pushing ...
9 years, 4 months ago (2011-08-18 23:14:14 UTC) #5
sehr (please use chromium)
Yes, precisely. Removing basically all the overhead of data sandboxing by removing the r15 constraint ...
9 years, 4 months ago (2011-08-18 23:17:28 UTC) #6
Mark Seaborn
On 18 August 2011 16:17, David Sehr <sehr@google.com> wrote: > Yes, precisely. Removing basically all ...
9 years, 4 months ago (2011-08-18 23:29:45 UTC) #7
Brad Chen
Thanks for the early feedback. PTAL I've uploaded additional changes such that "scons --mode=opt-linux,nacl" now ...
9 years, 4 months ago (2011-08-19 00:24:35 UTC) #8
Brad Chen
I've uploaded improved code to protect low pages. On 2011/08/19 00:24:35, Brad Chen wrote: > ...
9 years, 4 months ago (2011-08-19 16:14:04 UTC) #9
Brad Chen
Bennet, Mark, please prepare yourselves psychologically to spend some time reviewing this early next week. ...
9 years, 4 months ago (2011-08-20 14:57:18 UTC) #10
Brad Chen
The problems I noted with my mmap calls are now fixed. Please have a look. ...
9 years, 4 months ago (2011-08-23 01:22:58 UTC) #11
Mark Seaborn
Just style issues really... http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode50 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:50: /* It should be within ...
9 years, 4 months ago (2011-08-23 18:26:36 UTC) #12
bsy
a bug and some nits. http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode53 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:53: if (0 == *mem ...
9 years, 4 months ago (2011-08-23 18:31:23 UTC) #13
bsy
another suggestion http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode59 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:59: } if we find memory, we should ...
9 years, 4 months ago (2011-08-23 18:43:19 UTC) #14
bbudge
One small code style suggestion. http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c File src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c (right): http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c#newcode136 src/trusted/service_runtime/arch/x86_32/sel_addrspace_x86_32.c:136: } else { You ...
9 years, 4 months ago (2011-08-23 18:50:20 UTC) #15
Brad Chen
PTAL http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18001/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode50 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:50: /* It should be within a few pages ...
9 years, 4 months ago (2011-08-23 21:15:09 UTC) #16
bsy
nits. o/w lgtm if bots are happy. http://codereview.chromium.org/7677036/diff/18002/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18002/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode55 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:55: "Can't handle ...
9 years, 4 months ago (2011-08-23 21:34:20 UTC) #17
Brad Chen
Done. Waiting for try jobs to finish. Also, will have to revisit Chrome-side code to ...
9 years, 4 months ago (2011-08-23 22:28:59 UTC) #18
Brad Chen
... including review feedback. http://codereview.chromium.org/7677036/diff/18002/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c File src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c (right): http://codereview.chromium.org/7677036/diff/18002/src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c#newcode55 src/trusted/service_runtime/arch/arm/sel_addrspace_arm.c:55: "Can't handle sandbox at high ...
9 years, 4 months ago (2011-08-23 22:29:52 UTC) #19
commit-bot: I haz the power
9 years, 4 months ago (2011-08-24 15:16:33 UTC) #20
Change committed as 6521

Powered by Google App Engine
This is Rietveld 408576698