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

Issue 177113009: Support non-SFI mode in NaCl manifest file. (Closed)

Created:
6 years, 10 months ago by hidehiko
Modified:
6 years, 9 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, tzik, raymes+watch_chromium.org, teravest+watch_chromium.org, yzshen+watch_chromium.org, nfullagar1, piman+watch_chromium.org, noelallen1, binji, ihf+watch_chromium.org, hamaji, mazda, teravest
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Support non-SFI mode in NaCl manifest file. Currently, the flag to enable non-SFI mode is checked just before launching the plugin in the browser process. However, even if the flag is set, we may need to run the plugin in SFI mode. For example, trivially, if the plugin provides only SFI-mode binary. To handle such a case, this CL adds entries to NaCl manifest file so that a plugin developer can declare if their plugin provides SFI-mode/non-SFI mode binaries. In summary, NaCl works in non-SFI mode if; 1) --enable-nacl-nonsfi-mode is set to true, and 2) the plugin provides the binary for non-SFI mode. So, some checks are moved from the browser to the renderer. We need similar, but slightly different, a flag for non-SFI mode. Here is the naming rule: 1) enable_nonsfi_mode -> If non-SFI mode is enabled on the browser. (In more precise, if it is running on supported platform, and --enable-nacl-nonsfi-mode is set) 2) uses_nonsfi_mode -> If the specified plugin should run on non-SFI mode. This happens when the plugin provides the binary for non-SFI mode, and --enable-nacl-nonsfi-mode is set. Note that, in later CLs, we split non-SFI mode nacl_helper from the current nacl_helper with linking it to the newlib. Then, the uses_nonsfi_mode will become a flag to decide which helper the host should talk to. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734 TEST=Ran trybot. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255623

Patch Set 1 : #

Total comments: 27

Patch Set 2 : #

Patch Set 3 : Rebase #

Total comments: 13

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -51 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/browser/nacl_host_message_filter.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M components/nacl/browser/nacl_process_host.h View 1 2 3 4 5 3 chunks +3 lines, -0 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 4 5 4 chunks +16 lines, -2 lines 0 comments Download
M components/nacl/common/nacl_host_messages.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/common/nacl_messages.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/common/nacl_types.h View 1 3 chunks +5 lines, -2 lines 0 comments Download
M components/nacl/common/nacl_types.cc View 1 3 chunks +3 lines, -1 line 0 comments Download
M components/nacl/loader/nacl_listener.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 2 3 4 5 4 chunks +12 lines, -0 lines 0 comments Download
M ppapi/api/private/ppb_nacl_private.idl View 1 2 3 4 5 3 chunks +6 lines, -0 lines 0 comments Download
M ppapi/c/private/ppb_nacl_private.h View 1 2 3 4 5 4 chunks +6 lines, -1 line 0 comments Download
M ppapi/native_client/src/trusted/plugin/json_manifest.h View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M ppapi/native_client/src/trusted/plugin/json_manifest.cc View 1 2 3 4 5 12 chunks +43 lines, -11 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/manifest.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/nacl_entry_points.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.h View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.cc View 1 2 3 4 5 10 chunks +30 lines, -15 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.h View 1 2 3 4 5 5 chunks +5 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.cc View 1 2 3 4 5 4 chunks +32 lines, -11 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
hidehiko
Dave, could you review ppapi/... files? Julien, could you review *_messages.h files? Mark, could you ...
6 years, 9 months ago (2014-02-27 07:14:48 UTC) #1
Mark Seaborn
https://codereview.chromium.org/177113009/diff/20001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/177113009/diff/20001/components/nacl/browser/nacl_process_host.cc#newcode243 components/nacl/browser/nacl_process_host.cc:243: bool enable_nonsfi, Can you rename this to "use_nonsfi_mode", so ...
6 years, 9 months ago (2014-02-27 17:10:21 UTC) #2
hidehiko
Thank you for your review. PTAL? https://codereview.chromium.org/177113009/diff/20001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/177113009/diff/20001/components/nacl/browser/nacl_process_host.cc#newcode243 components/nacl/browser/nacl_process_host.cc:243: bool enable_nonsfi, On ...
6 years, 9 months ago (2014-02-28 06:41:54 UTC) #3
hidehiko
Hi, friendly ping? On 2014/02/28 06:41:54, hidehiko wrote: > Thank you for your review. PTAL? ...
6 years, 9 months ago (2014-03-04 01:15:10 UTC) #4
Mark Seaborn
+jvoung for the manifest reading part. https://codereview.chromium.org/177113009/diff/20001/ppapi/native_client/src/trusted/plugin/service_runtime.h File ppapi/native_client/src/trusted/plugin/service_runtime.h (left): https://codereview.chromium.org/177113009/diff/20001/ppapi/native_client/src/trusted/plugin/service_runtime.h#oldcode213 ppapi/native_client/src/trusted/plugin/service_runtime.h:213: bool should_report_uma, On ...
6 years, 9 months ago (2014-03-04 04:03:32 UTC) #5
hidehiko
Thank you for your review, Mark. Jan, Julian, Dave, could you kindly take a look, ...
6 years, 9 months ago (2014-03-04 15:06:33 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode311 components/nacl/renderer/ppb_nacl_private_impl.cc:311: if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) { Btw, is this because the ...
6 years, 9 months ago (2014-03-04 16:24:17 UTC) #7
Mark Seaborn
https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode311 components/nacl/renderer/ppb_nacl_private_impl.cc:311: if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) { On 2014/03/04 16:24:18, jvoung (cr) ...
6 years, 9 months ago (2014-03-04 16:33:59 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode311 components/nacl/renderer/ppb_nacl_private_impl.cc:311: if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) { On 2014/03/04 16:34:00, Mark Seaborn ...
6 years, 9 months ago (2014-03-04 16:39:42 UTC) #9
Mark Seaborn
https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode311 components/nacl/renderer/ppb_nacl_private_impl.cc:311: if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) { On 2014/03/04 16:39:42, jvoung (cr) ...
6 years, 9 months ago (2014-03-04 17:29:06 UTC) #10
hidehiko
Thank you for review. PTAL? https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/177113009/diff/60001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode311 components/nacl/renderer/ppb_nacl_private_impl.cc:311: if (!sender->Send(new NaClHostMsg_NaClIsNonSFIEnabled(&enabled))) { ...
6 years, 9 months ago (2014-03-05 08:15:32 UTC) #11
jvoung (off chromium)
json changes LG
6 years, 9 months ago (2014-03-05 17:08:44 UTC) #12
Mark Seaborn
https://codereview.chromium.org/177113009/diff/90001/ppapi/api/private/ppb_nacl_private.idl File ppapi/api/private/ppb_nacl_private.idl (right): https://codereview.chromium.org/177113009/diff/90001/ppapi/api/private/ppb_nacl_private.idl#newcode200 ppapi/api/private/ppb_nacl_private.idl:200: PP_Bool IsNonSFIEnabled(); Could you name this "IsNonSFIModeEnabled" for consistency? ...
6 years, 9 months ago (2014-03-05 17:44:31 UTC) #13
Mark Seaborn
LGTM with the changes in my previous post.
6 years, 9 months ago (2014-03-05 17:45:05 UTC) #14
dmichael (off chromium)
ppapi lgtm
6 years, 9 months ago (2014-03-05 18:42:15 UTC) #15
hidehiko
Thank you for review! Julien, could you take a look at messages.h changes? https://codereview.chromium.org/177113009/diff/90001/ppapi/api/private/ppb_nacl_private.idl File ...
6 years, 9 months ago (2014-03-06 05:31:11 UTC) #16
jln (very slow on Chromium)
*_messages.h lgtm rubberstamp, based on the size of change and Mark's review. Please, let me ...
6 years, 9 months ago (2014-03-06 22:53:26 UTC) #17
hidehiko
Thank you for review! Sending to CQ... On 2014/03/06 22:53:26, jln wrote: > *_messages.h lgtm ...
6 years, 9 months ago (2014-03-07 01:53:33 UTC) #18
hidehiko
The CQ bit was checked by hidehiko@chromium.org
6 years, 9 months ago (2014-03-07 01:53:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/177113009/110001
6 years, 9 months ago (2014-03-07 01:58:09 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 01:58:17 UTC) #21
commit-bot: I haz the power
Failed to apply patch for ppapi/native_client/src/trusted/plugin/service_runtime.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-07 01:58:18 UTC) #22
hidehiko
The CQ bit was checked by hidehiko@chromium.org
6 years, 9 months ago (2014-03-07 05:07:03 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/177113009/130001
6 years, 9 months ago (2014-03-07 05:08:25 UTC) #24
hidehiko
The CQ bit was checked by hidehiko@chromium.org
6 years, 9 months ago (2014-03-07 05:54:43 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/177113009/130001
6 years, 9 months ago (2014-03-07 05:57:47 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 06:26:41 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-07 06:26:42 UTC) #28
hidehiko
The CQ bit was checked by hidehiko@chromium.org
6 years, 9 months ago (2014-03-07 06:27:44 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/177113009/130001
6 years, 9 months ago (2014-03-07 06:30:32 UTC) #30
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 15:44:49 UTC) #31
Message was sent while issue was closed.
Change committed as 255623

Powered by Google App Engine
This is Rietveld 408576698