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

Issue 14683004: Check that the PNaCl cache hash is truly derived from the bitcode content. (Closed)

Created:
7 years, 7 months ago by jvoung (off chromium)
Modified:
7 years, 6 months ago
CC:
chromium-reviews, piman+watch_chromium.org, raymes+watch_chromium.org, yusukes+watch_chromium.org, yzshen+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

Check that the PNaCl cache hash is truly derived from the bitcode content. Do this before putting anything in the translation cache. This catches errors where the user forgets to update the hash and only updated the bitcode content. If we move the hash into the bitcode header, such an error is *much* less likely, but could still happen if we have a bug in our drivers. We don't check when there is a cache hit. In the case of a cache hit, we do not even attempt to download the bitcode. Add a check for this in the pnacl_error_handling test. Add a UMA error code ERROR_PNACL_CACHE_HASH_MISMATCH BUG=https://code.google.com/p/nativeclient/issues/detail?id=3414

Patch Set 1 #

Patch Set 2 : minor cleanup #

Total comments: 10

Patch Set 3 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -9 lines) Patch
M chrome/chrome_renderer.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/pepper/chrome_ppapi_interfaces.cc View 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/renderer/pepper/ppb_nacl_hash_private_impl.h View 1 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/renderer/pepper/ppb_nacl_hash_private_impl.cc View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
M chrome/test/data/nacl/nacl_test_data.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/test/data/nacl/pnacl_error_handling/pnacl_bad_hash.nmf View 1 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/test/data/nacl/pnacl_error_handling/pnacl_error_handling.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
A ppapi/api/private/ppb_nacl_hash_private.idl View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A ppapi/c/private/ppb_nacl_hash_private.h View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin_error.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h View 3 chunks +7 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc View 1 2 5 chunks +53 lines, -9 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_options.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 6 chunks +13 lines, -0 lines 0 comments Download
M ppapi/ppapi_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/all_c_includes.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
jvoung (off chromium)
dmichael is this separation of ppapi/native_client/src/trusted/plugin from chrome's crypto useful (via a private "ppb" interface)? ...
7 years, 7 months ago (2013-04-30 22:46:30 UTC) #1
Derek Schuff
https://codereview.chromium.org/14683004/diff/11001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc (right): https://codereview.chromium.org/14683004/diff/11001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc#newcode956 ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:956: nacl_hash_private_interface_->Update(bitcode_hash_verifier_, The hash we put in the bitcode header ...
7 years, 7 months ago (2013-04-30 23:52:38 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/14683004/diff/11001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc (right): https://codereview.chromium.org/14683004/diff/11001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc#newcode956 ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:956: nacl_hash_private_interface_->Update(bitcode_hash_verifier_, On 2013/04/30 23:52:38, Derek Schuff wrote: > The ...
7 years, 7 months ago (2013-05-01 00:01:30 UTC) #3
dmichael (off chromium)
ppapi bits lgtm, thanks. I do like this approach. Any time you can put logic ...
7 years, 7 months ago (2013-05-01 17:22:15 UTC) #4
Derek Schuff
plugin/coordinator stuff LGTM for now. I think might make more sense to use the hash ...
7 years, 7 months ago (2013-05-01 17:32:10 UTC) #5
jvoung (off chromium)
On 2013/05/01 17:32:10, Derek Schuff wrote: > plugin/coordinator stuff LGTM for now. > I think ...
7 years, 7 months ago (2013-05-01 18:21:58 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl File ppapi/api/private/ppb_nacl_hash_private.idl (right): https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl#newcode15 ppapi/api/private/ppb_nacl_hash_private.idl:15: mem_t CreateSHA256Hash(); On 2013/05/01 17:22:15, dmichael wrote: > Should ...
7 years, 7 months ago (2013-05-01 18:22:59 UTC) #7
jvoung (off chromium)
+bradnelson for chrome/test/data/nacl OWNERS
7 years, 7 months ago (2013-05-01 18:24:00 UTC) #8
bradn
LGTM
7 years, 7 months ago (2013-05-01 18:26:40 UTC) #9
dmichael (off chromium)
https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl File ppapi/api/private/ppb_nacl_hash_private.idl (right): https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl#newcode24 ppapi/api/private/ppb_nacl_hash_private.idl:24: void Delete([inout] mem_t hasher); On 2013/05/01 18:23:00, jvoung (cr) ...
7 years, 7 months ago (2013-05-01 18:34:15 UTC) #10
jvoung (off chromium)
https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl File ppapi/api/private/ppb_nacl_hash_private.idl (right): https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl#newcode24 ppapi/api/private/ppb_nacl_hash_private.idl:24: void Delete([inout] mem_t hasher); On 2013/05/01 18:34:15, dmichael wrote: ...
7 years, 7 months ago (2013-05-01 19:18:43 UTC) #11
dmichael (off chromium)
On 2013/05/01 19:18:43, jvoung (cr) wrote: > https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl > File ppapi/api/private/ppb_nacl_hash_private.idl (right): > > https://codereview.chromium.org/14683004/diff/11001/ppapi/api/private/ppb_nacl_hash_private.idl#newcode24 ...
7 years, 7 months ago (2013-05-01 20:55:03 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jvoung@chromium.org/14683004/26001
7 years, 7 months ago (2013-05-01 21:59:37 UTC) #13
jvoung (off chromium)
On 2013/05/01 21:59:37, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 7 months ago (2013-05-01 22:22:10 UTC) #14
bradnelson
lgtm
7 years, 7 months ago (2013-05-01 22:42:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jvoung@chromium.org/14683004/26001
7 years, 7 months ago (2013-05-01 22:52:00 UTC) #16
commit-bot: I haz the power
7 years, 7 months ago (2013-05-02 00:23:07 UTC) #17
Retried try job too often on linux_aura for step(s) browser_tests
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura...

Powered by Google App Engine
This is Rietveld 408576698