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

Issue 1977833003: Add a buildflag to use the handle verifier in a per module mode. (Closed)

Created:
4 years, 7 months ago by Sébastien Marchand
Modified:
4 years, 6 months ago
CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a buildflag to use the handle verifier in a per module mode. The HandleVerifier prevent you from using any ScopedHandle during a module initialization (i.e. if a DLL use one in DllMain this will call back into its host executable that hasn't been initialized yet and things will derail). In this CL I'm adding a build flag to make it possible to use it in a single module mode.. Committed: https://crrev.com/a89708a5c1bfe778ed1615f0bc92f0e9ae2e2192 Cr-Commit-Position: refs/heads/master@{#398361} BUG=618205 Committed: https://crrev.com/82ef0204161f34381ab832a576c4789e1063e0ee Cr-Commit-Position: refs/heads/master@{#398575}

Patch Set 1 #

Total comments: 2

Patch Set 2 : GN. #

Patch Set 3 : GN. #

Total comments: 1

Patch Set 4 : Add a flag to use the HV in a single module mode. #

Patch Set 5 : Add a flag to use the HV in a single module mode. #

Patch Set 6 : Add a flag to use the HV in a single module mode. #

Total comments: 2

Patch Set 7 : Fix. #

Total comments: 2

Patch Set 8 : Switch to a normal deps. #

Total comments: 2

Patch Set 9 : comment. #

Patch Set 10 : Fix the GN config. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -4 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -1 line 0 comments Download
A base/win/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +23 lines, -0 lines 0 comments Download
M base/win/scoped_handle.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M base/win/scoped_handle_test_dll.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (18 generated)
Sébastien Marchand
Hey, what do you think of this approach to have a way to disable the ...
4 years, 7 months ago (2016-05-13 16:00:47 UTC) #3
Sébastien Marchand
+chrisha@, here's a WIP for the handle verifier build flag.
4 years, 7 months ago (2016-05-13 18:06:34 UTC) #6
chrisha
Looks like a sane way to accomplish this to me, but I don't know much ...
4 years, 7 months ago (2016-05-13 18:44:54 UTC) #7
Will Harris
So the Q about whether we want to expose a way to totally disable the ...
4 years, 7 months ago (2016-05-18 08:51:21 UTC) #8
Sébastien Marchand
Yeah, I don't mind keeping it if the overhead is low and if there's no ...
4 years, 7 months ago (2016-05-18 13:39:08 UTC) #9
Sébastien Marchand
Chris: ping ? Should we keep the verifier or should we get rid of it ...
4 years, 7 months ago (2016-05-24 16:58:21 UTC) #10
chrisha
I'm fine with keeping it if it runs in a 'per module' mode. Whatever is ...
4 years, 7 months ago (2016-05-24 17:20:28 UTC) #11
Will Harris
On 2016/05/24 17:20:28, chrisha (slow) wrote: > I'm fine with keeping it if it runs ...
4 years, 6 months ago (2016-05-27 16:02:49 UTC) #12
Sébastien Marchand
I'm reworking this CL, I'll update the description and send a request for review soon-ish.
4 years, 6 months ago (2016-05-27 16:04:45 UTC) #13
Sébastien Marchand
Ok, reworked this to use this flag on a per module mode, PTAL.
4 years, 6 months ago (2016-05-30 20:07:09 UTC) #15
Will Harris
https://codereview.chromium.org/1977833003/diff/100001/base/win/scoped_handle_unittest.cc File base/win/scoped_handle_unittest.cc (right): https://codereview.chromium.org/1977833003/diff/100001/base/win/scoped_handle_unittest.cc#newcode52 base/win/scoped_handle_unittest.cc:52: #if BUILDFLAG(SINGLE_MODULE_MODE_HANDLE_VERIFIER) why do these tests now depend on ...
4 years, 6 months ago (2016-06-01 16:46:40 UTC) #16
Sébastien Marchand
Thanks, PTAnL. https://codereview.chromium.org/1977833003/diff/100001/base/win/scoped_handle_unittest.cc File base/win/scoped_handle_unittest.cc (right): https://codereview.chromium.org/1977833003/diff/100001/base/win/scoped_handle_unittest.cc#newcode52 base/win/scoped_handle_unittest.cc:52: #if BUILDFLAG(SINGLE_MODULE_MODE_HANDLE_VERIFIER) On 2016/06/01 16:46:40, Will Harris ...
4 years, 6 months ago (2016-06-01 19:18:48 UTC) #17
Sébastien Marchand
+thakis@ for owner approval.
4 years, 6 months ago (2016-06-02 19:59:51 UTC) #18
Sébastien Marchand
+thakis for owner approval (for real this time)
4 years, 6 months ago (2016-06-03 13:06:03 UTC) #20
Nico
https://codereview.chromium.org/1977833003/diff/120001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/1977833003/diff/120001/base/BUILD.gn#newcode1182 base/BUILD.gn:1182: public_deps += [ "//base/win:base_win_features" ] it looks like the ...
4 years, 6 months ago (2016-06-03 14:41:16 UTC) #21
Sébastien Marchand
Thanks for the quick review. https://codereview.chromium.org/1977833003/diff/120001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/1977833003/diff/120001/base/BUILD.gn#newcode1182 base/BUILD.gn:1182: public_deps += [ "//base/win:base_win_features" ...
4 years, 6 months ago (2016-06-03 14:44:42 UTC) #22
Nico
no i mean use the buildflag pattern, but rather than use a public_dep, make it ...
4 years, 6 months ago (2016-06-03 15:06:20 UTC) #23
Sébastien Marchand
Ok, PTAnL.
4 years, 6 months ago (2016-06-03 16:44:15 UTC) #25
Will Harris
don't quite understand the features stuff, happy to leave that to nico to review, but ...
4 years, 6 months ago (2016-06-03 23:31:10 UTC) #26
Sébastien Marchand
thakis@ : ping ?
4 years, 6 months ago (2016-06-07 13:06:58 UTC) #27
Nico
lgtm https://codereview.chromium.org/1977833003/diff/160001/base/win/BUILD.gn File base/win/BUILD.gn (right): https://codereview.chromium.org/1977833003/diff/160001/base/win/BUILD.gn#newcode14 base/win/BUILD.gn:14: single_module_mode_handle_verifier = true this means that if you ...
4 years, 6 months ago (2016-06-07 16:48:18 UTC) #28
Will Harris
On 2016/06/07 16:48:18, Nico wrote: > lgtm > > https://codereview.chromium.org/1977833003/diff/160001/base/win/BUILD.gn > File base/win/BUILD.gn (right): > ...
4 years, 6 months ago (2016-06-07 17:34:38 UTC) #29
Sébastien Marchand
https://codereview.chromium.org/1977833003/diff/160001/base/win/BUILD.gn File base/win/BUILD.gn (right): https://codereview.chromium.org/1977833003/diff/160001/base/win/BUILD.gn#newcode14 base/win/BUILD.gn:14: single_module_mode_handle_verifier = true On 2016/06/07 16:48:18, Nico wrote: > ...
4 years, 6 months ago (2016-06-07 17:47:58 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977833003/180001
4 years, 6 months ago (2016-06-07 17:48:41 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 6 months ago (2016-06-07 19:05:12 UTC) #35
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/a89708a5c1bfe778ed1615f0bc92f0e9ae2e2192 Cr-Commit-Position: refs/heads/master@{#398361}
4 years, 6 months ago (2016-06-07 19:07:57 UTC) #37
battre
This fails on Win7 reliably: https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20(dbg)(1)/builds/49451/steps/base_unittests%20on%20Windows-7-SP1 Will revert to see whether that fixes the problem. ...
4 years, 6 months ago (2016-06-08 06:52:51 UTC) #39
battre
A revert of this CL (patchset #9 id:180001) has been created in https://codereview.chromium.org/2047013003/ by battre@chromium.org. ...
4 years, 6 months ago (2016-06-08 06:54:03 UTC) #40
Sébastien Marchand
There was a missing '$' in base/win/BUILD.gn :(, PTAnL.
4 years, 6 months ago (2016-06-08 14:44:05 UTC) #41
Nico
still lgtm 1.) For obvious one-byte fixes like this, I think you can just reland ...
4 years, 6 months ago (2016-06-08 14:46:45 UTC) #44
Sébastien Marchand
Thanks, I'll do this next time.
4 years, 6 months ago (2016-06-08 14:49:22 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977833003/200001
4 years, 6 months ago (2016-06-08 15:03:44 UTC) #48
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 6 months ago (2016-06-08 15:57:56 UTC) #50
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 16:01:17 UTC) #52
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/82ef0204161f34381ab832a576c4789e1063e0ee
Cr-Commit-Position: refs/heads/master@{#398575}

Powered by Google App Engine
This is Rietveld 408576698