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

Issue 2576843002: [win] Create ModuleDatabase and ModuleEventSinkImpl. (Closed)

Created:
4 years ago by chrisha
Modified:
3 years, 11 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[win] Create ModuleDatabase and ModuleEventSinkImpl. This creates the browser-side components of the ModuleDatabase. A future CL will hook up ModuleWatchers in each process to a singleton ModuleDatabase in the browser process. BUG=662084 Review-Url: https://codereview.chromium.org/2576843002 Cr-Original-Commit-Position: refs/heads/master@{#443651} Committed: https://chromium.googlesource.com/chromium/src/+/d97de8e6f3e1beba791dfdd6d7f2dd7160c45331 Review-Url: https://codereview.chromium.org/2576843002 Cr-Commit-Position: refs/heads/master@{#444241} Committed: https://chromium.googlesource.com/chromium/src/+/6de20f5d8a70cf65a5346eff0adcef7df500dde5

Patch Set 1 #

Total comments: 63

Patch Set 2 : Address grt's comments, merge CL 2579143002 #

Patch Set 3 : git cl format #

Patch Set 4 : Rework OnProcessStarted. #

Total comments: 119

Patch Set 5 : Address grt's comments. #

Total comments: 10

Patch Set 6 : Address comments for patchset 5. #

Patch Set 7 : Moar comments, fix typos. #

Total comments: 55

Patch Set 8 : Address grt's comments on patchset 7. #

Total comments: 7

Patch Set 9 : Fix grt's nits on patchset 8. #

Total comments: 32

Patch Set 10 : Address sky's comments. #

Patch Set 11 : Address sky@'s comments. #

Total comments: 5

Patch Set 12 : Fix clang warning. #

Patch Set 13 : Fix win-clang error. #

Patch Set 14 : Fix another win-clang error. #

Patch Set 15 : Yet another win-clang error. #

Patch Set 16 : Fix small bug. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1576 lines, -100 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_database_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +243 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_database_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +355 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_database_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +529 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_event_sink_impl_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_event_sink_impl_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +210 lines, -0 lines 0 comments Download
A chrome/browser/conflicts/module_event_sink_impl_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +86 lines, -0 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/conflicts/module_database_win.mojom View 1 1 chunk +0 lines, -14 lines 0 comments Download
A + chrome/common/conflicts/module_event_sink_win.mojom View 1 1 chunk +23 lines, -27 lines 0 comments Download
D chrome/common/conflicts/module_event_win.mojom View 1 1 chunk +0 lines, -27 lines 0 comments Download
M chrome/common/conflicts/module_watcher_win.h View 1 2 3 4 5 4 chunks +29 lines, -6 lines 0 comments Download
M chrome/common/conflicts/module_watcher_win.cc View 1 2 3 4 5 6 7 5 chunks +16 lines, -21 lines 0 comments Download
M chrome/common/conflicts/module_watcher_win_unittest.cc View 1 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 65 (27 generated)
chrisha
pmonette: PTAL? grt: If you have time? sky: As an OWNER?
4 years ago (2016-12-14 20:58:31 UTC) #2
sky
You'll also need a security reviewer. https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_impl_win.cc File chrome/browser/conflicts/module_database_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_impl_win.cc#newcode34 chrome/browser/conflicts/module_database_impl_win.cc:34: DCHECK_EQ(0u, process_id_); Won't ...
4 years ago (2016-12-14 21:58:08 UTC) #3
grt (UTC plus 2)
some comments for you, sir! https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_impl_win.cc File chrome/browser/conflicts/module_database_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_impl_win.cc#newcode21 chrome/browser/conflicts/module_database_impl_win.cc:21: base::WrapUnique(new ModuleDatabaseImpl(module_database)); base::MakeUnique<ModuleDatabaseImpl>(module_database) and ...
4 years ago (2016-12-15 09:07:12 UTC) #4
chrisha
Much rework after discussions with wfh@ regarding security. Please take another look at your leisure ...
4 years ago (2016-12-19 20:15:37 UTC) #7
grt (UTC plus 2)
whew! https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/1/chrome/browser/conflicts/module_database_win.cc#newcode65 chrome/browser/conflicts/module_database_win.cc:65: // worth crashing if this data is slightly ...
4 years ago (2016-12-20 11:11:35 UTC) #8
chrisha
Thanks for the awesomely detailed review Greg. Addressed most issues, politely declined a few. Detailed ...
4 years ago (2016-12-20 19:46:25 UTC) #10
grt (UTC plus 2)
https://codereview.chromium.org/2576843002/diff/60001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/60001/chrome/browser/conflicts/module_database_win.cc#newcode10 chrome/browser/conflicts/module_database_win.cc:10: #include "base/strings/utf_string_conversions.h" On 2016/12/20 19:46:23, chrisha (slow) wrote: > ...
4 years ago (2016-12-20 21:09:53 UTC) #11
chrisha
Okay. Bit the bullet and moved to identifying processes by (process_id, creation_time). Also made modules ...
4 years ago (2016-12-21 20:15:00 UTC) #12
grt (UTC plus 2)
i'm pretty satisfied. your turn, will! https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_database_win.cc#newcode198 chrome/browser/conflicts/module_database_win.cc:198: return; nit: omit ...
4 years ago (2016-12-22 14:19:07 UTC) #13
grt (UTC plus 2)
forgot to mention: nice CL!
4 years ago (2016-12-22 14:19:24 UTC) #14
chrisha
Thanks grt. wfh, your turn! https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_database_win.cc#newcode198 chrome/browser/conflicts/module_database_win.cc:198: return; On 2016/12/22 14:19:06, ...
3 years, 11 months ago (2017-01-03 21:34:48 UTC) #15
grt (UTC plus 2)
https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode35 chrome/browser/conflicts/module_event_sink_impl_win.cc:35: static_cast<uint64_t>(creation_ft.dwLowDateTime); On 2017/01/03 21:34:48, chrisha (slow) wrote: > On ...
3 years, 11 months ago (2017-01-04 08:41:42 UTC) #16
chrisha
https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode100 chrome/browser/conflicts/module_event_sink_impl_win.cc:100: address = load_address + e_lfanew + offsetof(IMAGE_NT_HEADERS, FileHeader) + ...
3 years, 11 months ago (2017-01-04 16:28:37 UTC) #17
grt (UTC plus 2)
LGTM! https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/120001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode100 chrome/browser/conflicts/module_event_sink_impl_win.cc:100: address = load_address + e_lfanew + offsetof(IMAGE_NT_HEADERS, FileHeader) ...
3 years, 11 months ago (2017-01-04 21:27:11 UTC) #18
sky
https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc#newcode98 chrome/browser/conflicts/module_database_win.cc:98: size_t i = FindLoadAddressIndexByAddress(module_load_address, Did you consider returning an ...
3 years, 11 months ago (2017-01-05 00:30:45 UTC) #19
chrisha
Responded to your comments inline, sky. Thanks for the review. https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc#newcode98 ...
3 years, 11 months ago (2017-01-06 20:35:48 UTC) #20
sky
https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc#newcode133 chrome/browser/conflicts/module_database_win.cc:133: DCHECK_LE(0u, bit_index); On 2017/01/06 20:35:47, chrisha (slow) wrote: > ...
3 years, 11 months ago (2017-01-06 21:05:40 UTC) #21
chrisha
PTAL? sky: Bit the bullet and refactored to a std::map. wfh: For security review of ...
3 years, 11 months ago (2017-01-11 16:34:18 UTC) #22
sky
Thanks for converting to a map, it seems better to me, I hope you agree. ...
3 years, 11 months ago (2017-01-11 18:48:52 UTC) #23
Will Harris
security lgtm - with one question https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode49 chrome/browser/conflicts/module_event_sink_impl_win.cc:49: length = ::GetModuleFileNameEx(process, ...
3 years, 11 months ago (2017-01-11 21:25:38 UTC) #24
chrisha
Thanks wfh. https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode49 chrome/browser/conflicts/module_event_sink_impl_win.cc:49: length = ::GetModuleFileNameEx(process, module, temp_path.data(), On 2017/01/11 ...
3 years, 11 months ago (2017-01-11 21:46:22 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/200001
3 years, 11 months ago (2017-01-11 21:47:30 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/150460)
3 years, 11 months ago (2017-01-11 23:12:38 UTC) #30
grt (UTC plus 2)
still lgtm https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/160001/chrome/browser/conflicts/module_database_win.cc#newcode283 chrome/browser/conflicts/module_database_win.cc:283: return const_cast<ProcessInfo*>(&(*it)); On 2017/01/11 16:34:17, chrisha (slow) ...
3 years, 11 months ago (2017-01-12 10:54:29 UTC) #31
chrisha
https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_database_win.cc File chrome/browser/conflicts/module_database_win.cc (right): https://codereview.chromium.org/2576843002/diff/200001/chrome/browser/conflicts/module_database_win.cc#newcode265 chrome/browser/conflicts/module_database_win.cc:265: auto result = modules_.emplace( On 2017/01/12 10:54:29, grt (UTC ...
3 years, 11 months ago (2017-01-12 14:59:25 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/220001
3 years, 11 months ago (2017-01-12 15:24:14 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/151013)
3 years, 11 months ago (2017-01-12 17:04:01 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/240001
3 years, 11 months ago (2017-01-12 20:09:28 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/362994)
3 years, 11 months ago (2017-01-12 20:54:38 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/260001
3 years, 11 months ago (2017-01-12 21:44:47 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/328348)
3 years, 11 months ago (2017-01-12 22:39:34 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/280001
3 years, 11 months ago (2017-01-13 14:51:16 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/292731)
3 years, 11 months ago (2017-01-13 16:55:08 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/280001
3 years, 11 months ago (2017-01-13 17:53:52 UTC) #54
commit-bot: I haz the power
Committed patchset #15 (id:280001) as https://chromium.googlesource.com/chromium/src/+/d97de8e6f3e1beba791dfdd6d7f2dd7160c45331
3 years, 11 months ago (2017-01-13 20:37:46 UTC) #57
pkalinnikov
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/2634073002/ by pkalinnikov@chromium.org. ...
3 years, 11 months ago (2017-01-16 13:29:20 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576843002/300001
3 years, 11 months ago (2017-01-18 00:57:26 UTC) #62
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 02:04:23 UTC) #65
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/6de20f5d8a70cf65a5346eff0adc...

Powered by Google App Engine
This is Rietveld 408576698