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

Issue 112074: Linux: Add support for chrooted renderers. (Closed)

Created:
11 years, 6 months ago by agl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Linux: Add support for chrooted renderers. http://code.google.com/p/chromium/wiki/LinuxSandboxIPC Without filesystem access from the renderers, we need another way of dealing with fontconfig and font loading. This add support for: * An "SBX_D" environment variable in the renderers which is used to signal the end of dynamic linking so that the chroot can be enforced. * A sandbox_host process, running outside the sandbox, to deal with fontconfig requests from the renderers. See the wiki page for the reasoning behind making it a separate process. * A new, custom SkFontHost for Skia. Because this is Chrome specific, it will live outside the upstream Skia tree. This FontHost can be configured either to drive fontconfig directly (for the browser process and for any unsandboxed renderers) or to use an IPC system. Since the same SkFontHost has to be linked into both the browser and renderer (they are the same binary), this switch has to be made at run time. Sandbox IPC calls are rare (a couple of dozen at page load time) and add about 50us of overhead for each call.

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+1106 lines, -20 lines) Patch
M base/process_util_linux.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/app/chrome_dll_main.cc View 1 chunk +0 lines, -14 lines 1 comment Download
M chrome/browser/browser_main.cc View 3 chunks +14 lines, -0 lines 2 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/render_sandbox_host_linux.h View 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/render_sandbox_host_linux.cc View 1 chunk +257 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_main_platform_delegate_linux.cc View 3 chunks +42 lines, -3 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig.cpp View 1 chunk +227 lines, -0 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig_direct.h View 1 chunk +44 lines, -0 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig_direct.cpp View 1 chunk +165 lines, -0 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig_impl.h View 1 chunk +60 lines, -0 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig_ipc.h View 1 chunk +74 lines, -0 lines 0 comments Download
A skia/ext/SkFontHost_fontconfig_ipc.cpp View 1 chunk +164 lines, -0 lines 2 comments Download
M skia/skia.gyp View 4 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
agl
This is not quite fully baked yet, but I thought I should get it out ...
11 years, 6 months ago (2009-05-29 20:47:51 UTC) #1
Evan Martin
Unfortunately, I think Darin will probably want to review this given that it involves new ...
11 years, 6 months ago (2009-05-29 22:04:43 UTC) #2
Evan Martin
Tony mentions we have a special "utility" process that extensions will use. But it probably ...
11 years, 6 months ago (2009-05-29 22:22:43 UTC) #3
Evan Martin
http://codereview.chromium.org/112074/diff/1/3 File chrome/app/chrome_dll_main.cc (left): http://codereview.chromium.org/112074/diff/1/3#oldcode412 Line 412: CHECK(chmod(fix_dir.value().c_str(), 0700) == 0); Let me fix this ...
11 years, 6 months ago (2009-05-29 22:23:03 UTC) #4
agl
http://codereview.chromium.org/112074/diff/1/4 File chrome/browser/browser_main.cc (right): http://codereview.chromium.org/112074/diff/1/4#newcode254 Line 254: Thanks. That was an artifact of merging. There ...
11 years, 6 months ago (2009-05-29 22:26:59 UTC) #5
Lei Zhang
11 years, 6 months ago (2009-06-04 01:30:43 UTC) #6
http://codereview.chromium.org/112074/diff/1/16
File skia/ext/SkFontHost_fontconfig_ipc.cpp (right):

http://codereview.chromium.org/112074/diff/1/16#newcode69
Line 69: memset(&msg, 0, sizeof(msg));
fta reports compile failure. http://paste.ubuntu.com/187812/

needs string.h

http://codereview.chromium.org/112074/diff/1/16#newcode121
Line 121: char filename_buf[PATH_MAX];
and limits.h

Powered by Google App Engine
This is Rietveld 408576698