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

Issue 6731031: chroot to /proc instead of /tmp. This gets rid of a lot of unnecessary (Closed)

Created:
9 years, 9 months ago by jln (very slow on Chromium)
Modified:
8 years, 7 months ago
Reviewers:
agl, Markus (顧孟勤)
CC:
chromium-reviews
Visibility:
Public.

Description

chroot to /proc instead of /tmp. This gets rid of a lot of unnecessary complexity and fixes a race condition. (Original idea from Markus) The chroot helper will chroot to /proc/self/fdinfo (or /proc/self/fd). This is pretty safe because access to this directory is protected by the ptrace() check in the kernel and the helper is privileged. Moreover, as soon as the helper _exit() and becomes a zombie, the directory will be empty. Zygote should wait() for us to make everything deterministric. We also export SBX_HELPER_PID so that Zygote can specifically wait for the helper.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -124 lines) Patch
M sandbox/linux/suid/sandbox.c View 6 chunks +51 lines, -124 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Markus (顧孟勤)
LGTM http://codereview.chromium.org/6731031/diff/1/sandbox/linux/suid/sandbox.c File sandbox/linux/suid/sandbox.c (right): http://codereview.chromium.org/6731031/diff/1/sandbox/linux/suid/sandbox.c#newcode70 sandbox/linux/suid/sandbox.c:70: #define SAFE_DIR2 "/proc/self/fd" Do we ever need to ...
9 years, 9 months ago (2011-03-24 23:26:58 UTC) #1
jln (very slow on Chromium)
On Thu, Mar 24, 2011 at 4:26 PM, <markus@chromium.org> wrote: > LGTM > > > ...
9 years, 9 months ago (2011-03-24 23:33:48 UTC) #2
agl
9 years, 9 months ago (2011-03-25 14:05:21 UTC) #3
LGTM

http://codereview.chromium.org/6731031/diff/1/sandbox/linux/suid/sandbox.c
File sandbox/linux/suid/sandbox.c (right):

http://codereview.chromium.org/6731031/diff/1/sandbox/linux/suid/sandbox.c#ne...
sandbox/linux/suid/sandbox.c:79: char  *safedir = NULL;
double space.

Powered by Google App Engine
This is Rietveld 408576698