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

Issue 209423004: Add NaClChromeMainInitForNonSfi (Closed)

Created:
6 years, 9 months ago by hamaji
Modified:
6 years, 8 months ago
Reviewers:
Mark Seaborn
CC:
native-client-reviews_googlegroups.com, hidehiko
Base URL:
https://chromium.googlesource.com/native_client/src/native_client.git@master
Visibility:
Public.

Description

Add NaClChromeMainInitForNonSfi This initializer does less initialization than the one for SFI NaCl. Particularly, NaClTlsInit will not be called so that we can disallow modify_ldt in non-SFI mode by seccomp. TEST=ninja -C out/Release nacl_helper BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M src/public/chrome_main.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/nacl_all_modules.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/trusted/service_runtime/nacl_all_modules.c View 3 chunks +12 lines, -1 line 6 comments Download
M src/trusted/service_runtime/sel_main_chrome.c View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
hamaji
Oops, I forgot to ask the review of this change. This is a preparation of ...
6 years, 9 months ago (2014-03-28 07:22:51 UTC) #1
Mark Seaborn
https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/nacl_all_modules.c File src/trusted/service_runtime/nacl_all_modules.c (right): https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/nacl_all_modules.c#newcode30 src/trusted/service_runtime/nacl_all_modules.c:30: void NaClAllModulesInitForNonSfi(void) { Just call whatever Init functions you ...
6 years, 9 months ago (2014-03-28 14:09:45 UTC) #2
hamaji
Thanks for the comment, Mark! I've closed this. I'll make another change to nacl_listener.cc
6 years, 8 months ago (2014-03-30 03:34:06 UTC) #3
hamaji
https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/nacl_all_modules.c File src/trusted/service_runtime/nacl_all_modules.c (right): https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/nacl_all_modules.c#newcode30 src/trusted/service_runtime/nacl_all_modules.c:30: void NaClAllModulesInitForNonSfi(void) { On 2014/03/28 14:09:45, Mark Seaborn wrote: ...
6 years, 8 months ago (2014-04-01 07:10:38 UTC) #4
hamaji
6 years, 8 months ago (2014-04-01 07:59:31 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/...
File src/trusted/service_runtime/nacl_all_modules.c (right):

https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/...
src/trusted/service_runtime/nacl_all_modules.c:30: void
NaClAllModulesInitForNonSfi(void) {
On 2014/04/01 07:10:38, hamaji wrote:
> On 2014/03/28 14:09:45, Mark Seaborn wrote:
> > Just call whatever Init functions you need directly on the Chrome side.  You
> can
> > change include_rules accordingly -- it's OK to whitelist things like SRPC
> since
> > src/trusted/plugin already uses that.  (SRPC will go away in the long term
so
> > we're not trying to clean up the embedding interface NaCl provides for it.)
> > 
> > This list of Init functions doesn't belong in the NaCl repo because the code
> > using the facilities you're initialising isn't in the NaCl repo.
> 
> I remembered a reason we need to call NaClChromeMainInit in Chrome side.
> NaClChromeMainArgsCreate has CHECK(g_initialized) and as this is a file static
> variable, we need to modify NaCl repository to set g_initialized and get rid
of
> NaClTlsInit.
> 
> Alternative solutions:
> 
> - Remove CHECK(g_initialized) from NaClChromeMainArgsCreate.
> - Copy NaClChromeMainArgsCreate to chrome side for non-SFI.
> 
> I assume the last option is OK? I'll make a CL to see if you like this.
> 
> 

I guess we don't need to call NaClChromeMainArgsCreate at all... Let me see.

https://codereview.chromium.org/209423004/diff/1/src/trusted/service_runtime/...
src/trusted/service_runtime/nacl_all_modules.c:32: NaClGlobalModuleInit();  /*
various global variables */
On 2014/04/01 07:10:38, hamaji wrote:
> On 2014/03/28 14:09:45, Mark Seaborn wrote:
> > I doubt you need this one.
> 
> Removed.

This comment was just a mistake...

Powered by Google App Engine
This is Rietveld 408576698