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

Issue 11231021: Zygote: Initialize NSS fully (Closed)

Created:
8 years, 2 months ago by jln (very slow on Chromium)
Modified:
8 years, 1 month ago
Reviewers:
wtc, ddorwin, Ryan Sleevi
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, Jorge Lucangeli Obes, Ami GONE FROM CHROMIUM, Tom Finegan
Visibility:
Public.

Description

Linux: Initialize NSS fully in the Zygote. We fully initialize NSS in the Zygote. We do so after the setuid sandbox initialization, in order to assert that initializing NSS won't do something we don't like "behind our back". This allows to initialize NSS only once for every renderer. This also guarantees that we get initialized before the seccomp-bpf sandbox starts which in turn will allow us to tighten it in the future. BUG=156864

Patch Set 1 #

Total comments: 10

Patch Set 2 : #

Total comments: 6

Patch Set 3 : Update comment. #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M content/zygote/zygote_main_linux.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
jln (very slow on Chromium)
8 years, 2 months ago (2012-10-19 23:40:26 UTC) #1
Ryan Sleevi
I appreciate the quick turn around on the change, but I'm still not sure I ...
8 years, 2 months ago (2012-10-19 23:50:10 UTC) #2
ddorwin
This works for me in both chrome and content_browsertests. I can't speak to the correctness, ...
8 years, 2 months ago (2012-10-20 00:45:32 UTC) #3
jln (very slow on Chromium)
Hopefully that's more clear. https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc#newcode502 content/zygote/zygote_main_linux.cc:502: crypto::DisableNSSForkCheck(); On 2012/10/19 23:50:10, Ryan ...
8 years, 2 months ago (2012-10-20 00:51:29 UTC) #4
Ryan Sleevi
On 2012/10/20 00:51:29, Julien Tinnes wrote: > Hopefully that's more clear. > > https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc > ...
8 years, 2 months ago (2012-10-20 01:06:30 UTC) #5
jln (very slow on Chromium)
https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc#newcode493 content/zygote/zygote_main_linux.cc:493: #if defined(USE_NSS) On 2012/10/20 00:45:32, ddorwin wrote: > If ...
8 years, 2 months ago (2012-10-20 01:14:08 UTC) #6
Ryan Sleevi
On 2012/10/20 01:14:08, Julien Tinnes wrote: > https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc > File content/zygote/zygote_main_linux.cc (right): > > https://codereview.chromium.org/11231021/diff/1/content/zygote/zygote_main_linux.cc#newcode493 ...
8 years, 2 months ago (2012-10-20 01:18:38 UTC) #7
Ryan Sleevi
As noted in http://src.chromium.org/viewvc/chrome?view=rev&revision=78633 , the original intent was that NSS would only be initialized ...
8 years, 2 months ago (2012-10-20 01:20:19 UTC) #8
jln (very slow on Chromium)
On 2012/10/20 01:06:30, Ryan Sleevi wrote: > > I'm trying to understand the impact of ...
8 years, 2 months ago (2012-10-20 01:40:33 UTC) #9
wtc
Review comments on patch set 2: I also have concerns about this CL because I ...
8 years, 2 months ago (2012-10-23 18:52:28 UTC) #10
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/11231021/diff/10001/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://chromiumcodereview.appspot.com/11231021/diff/10001/content/zygote/zygote_main_linux.cc#newcode494 content/zygote/zygote_main_linux.cc:494: // Do some extra NSS initialization. We don't want ...
8 years, 2 months ago (2012-10-23 19:06:50 UTC) #11
Ryan Sleevi
On 2012/10/23 19:06:50, Julien Tinnes wrote: > I think that is the most important part. ...
8 years, 2 months ago (2012-10-23 19:12:28 UTC) #12
jln (very slow on Chromium)
On 2012/10/23 19:12:28, Ryan Sleevi wrote: > On 2012/10/23 19:06:50, Julien Tinnes wrote: > > ...
8 years, 2 months ago (2012-10-23 23:35:49 UTC) #13
Ryan Sleevi
As mentioned on the bug, I think we want to change this to be after ...
8 years, 1 month ago (2012-11-15 01:34:14 UTC) #14
Ryan Sleevi
8 years, 1 month ago (2012-11-15 01:57:32 UTC) #15
Note - from studying
http://mxr.mozilla.org/security/source/nsprpub/pr/src/pthreads/ptthread.c , NSS
is fully capable of handling systems where it lacks permissions to schedule
threads.

If the seccomp-bpf sandbox wasn't exploding on the policy violation, and instead
just blocked it (logging silently?), initializing NSS post-sandbox should be
fine.

Powered by Google App Engine
This is Rietveld 408576698