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

Issue 921353002: sandbox: Fix Win64 porting issue by using SIZE_T instead of ULONG (Closed)

Created:
5 years, 10 months ago by Reid Kleckner
Modified:
5 years, 10 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, rickyz+watch_chromium.org, caitkp+watch_chromium.org, Mark Seaborn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

sandbox: Fix some nt_internals.h function prototypes for Win64 NtQuerySection should use ULONG instead of SIZE_T as it is dealing with PE section sizes. NtQueryVirtualMemory should use SIZE_T instead of ULONG as it is dealing with memory sizes. DynamoRIO, another project that consumes these native APIs, uses the prototypes introduced by this change. R=robertshield@chromium.org,rvargas@chromium.org BUG=458690 Committed: https://crrev.com/4ede4e174a51d08262edfb2e2c05845504bd9b1a Cr-Commit-Position: refs/heads/master@{#317177}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Tweak typedefs #

Patch Set 3 : upload again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -10 lines) Patch
M chrome_elf/blacklist/blacklist_interceptions.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M sandbox/win/src/nt_internals.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M sandbox/win/src/sandbox_nt_util.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 33 (5 generated)
Reid Kleckner
5 years, 10 months ago (2015-02-13 23:23:32 UTC) #1
Nico
I compared the other PSIZE_Ts in the header file. There are other differences. We should ...
5 years, 10 months ago (2015-02-16 06:58:00 UTC) #3
Will Harris
notes from the peanut gallery https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h File sandbox/win/src/nt_internals.h (right): https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h#newcode253 sandbox/win/src/nt_internals.h:253: IN SIZE_T SectionInformationLength, sources ...
5 years, 10 months ago (2015-02-17 03:05:46 UTC) #5
rvargas (doing something else)
https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h File sandbox/win/src/nt_internals.h (right): https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h#newcode454 sandbox/win/src/nt_internals.h:454: OUT PSIZE_T ReturnLength OPTIONAL); We run elf on x64, ...
5 years, 10 months ago (2015-02-17 20:47:30 UTC) #7
robertshield
https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h File sandbox/win/src/nt_internals.h (right): https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h#newcode454 sandbox/win/src/nt_internals.h:454: OUT PSIZE_T ReturnLength OPTIONAL); On 2015/02/17 20:47:30, rvargas wrote: ...
5 years, 10 months ago (2015-02-17 23:54:43 UTC) #8
Reid Kleckner
Tweak typedefs
5 years, 10 months ago (2015-02-19 01:56:29 UTC) #9
Reid Kleckner
I think in general, ULONGs are used to describe sizes of PE/COFF constructs, because those ...
5 years, 10 months ago (2015-02-19 01:57:07 UTC) #10
Nico
https://codereview.chromium.org/921353002/diff/1/chrome_elf/blacklist/blacklist_interceptions.cc File chrome_elf/blacklist/blacklist_interceptions.cc (right): https://codereview.chromium.org/921353002/diff/1/chrome_elf/blacklist/blacklist_interceptions.cc#newcode98 chrome_elf/blacklist/blacklist_interceptions.cc:98: SIZE_T bytes_returned; should this be PULONG now?
5 years, 10 months ago (2015-02-19 02:07:09 UTC) #11
rvargas (doing something else)
https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h File sandbox/win/src/nt_internals.h (right): https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h#newcode454 sandbox/win/src/nt_internals.h:454: OUT PSIZE_T ReturnLength OPTIONAL); On 2015/02/19 01:57:06, Reid Kleckner ...
5 years, 10 months ago (2015-02-19 02:09:55 UTC) #12
Reid Kleckner
On 2015/02/19 02:09:55, rvargas wrote: > https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h > File sandbox/win/src/nt_internals.h (right): > > https://codereview.chromium.org/921353002/diff/1/sandbox/win/src/nt_internals.h#newcode454 > ...
5 years, 10 months ago (2015-02-19 19:26:59 UTC) #13
rvargas (doing something else)
On 2015/02/19 19:26:59, Reid Kleckner wrote: > On 2015/02/19 02:09:55, rvargas wrote: > > > ...
5 years, 10 months ago (2015-02-19 20:25:36 UTC) #14
Nico
\> I should have read the bug report!. There is also http://crbug.com/397137 > referenced from ...
5 years, 10 months ago (2015-02-19 20:30:28 UTC) #15
rvargas (doing something else)
On 2015/02/19 20:30:28, Nico wrote: > \> I should have read the bug report!. There ...
5 years, 10 months ago (2015-02-19 20:42:10 UTC) #16
Nico
> Yes, I did. NtQueryVirtualMemoryFunction is moving from ULONG to SIZE_T (for an > info ...
5 years, 10 months ago (2015-02-19 20:45:27 UTC) #17
rvargas (doing something else)
On 2015/02/19 20:45:27, Nico wrote: > > Yes, I did. NtQueryVirtualMemoryFunction is moving from ULONG ...
5 years, 10 months ago (2015-02-19 21:05:15 UTC) #18
robertshield
From my perspective, this LGTM. The size change on NtQueryVirtualMemory is either correct, in which ...
5 years, 10 months ago (2015-02-19 21:05:30 UTC) #19
Nico
rvargas, does landing this as is (with comment 11 addressed) and reverting the QueryVirtualMem part ...
5 years, 10 months ago (2015-02-19 21:14:34 UTC) #20
Reid Kleckner
https://codereview.chromium.org/921353002/diff/1/chrome_elf/blacklist/blacklist_interceptions.cc File chrome_elf/blacklist/blacklist_interceptions.cc (right): https://codereview.chromium.org/921353002/diff/1/chrome_elf/blacklist/blacklist_interceptions.cc#newcode98 chrome_elf/blacklist/blacklist_interceptions.cc:98: SIZE_T bytes_returned; On 2015/02/19 02:07:09, Nico wrote: > should ...
5 years, 10 months ago (2015-02-19 21:19:31 UTC) #21
Reid Kleckner
upload again
5 years, 10 months ago (2015-02-19 21:21:07 UTC) #23
Nico
On 2015/02/19 21:21:07, Reid Kleckner wrote: > upload again Err, looks like I commented on ...
5 years, 10 months ago (2015-02-19 21:25:05 UTC) #24
rvargas (doing something else)
Now I'm confused! I thought (by comment 13) that NtQueryVirtualMemoryFunction is the one that we ...
5 years, 10 months ago (2015-02-19 22:01:15 UTC) #25
rvargas (doing something else)
So I guess that means lgtm with caveats? (given that the direct user is elf)
5 years, 10 months ago (2015-02-19 22:03:08 UTC) #26
Reid Kleckner
OK, so I'm going to land as is, since both of the routines being changed ...
5 years, 10 months ago (2015-02-19 22:51:12 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/921353002/40001
5 years, 10 months ago (2015-02-19 22:55:44 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-20 00:02:02 UTC) #30
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/4ede4e174a51d08262edfb2e2c05845504bd9b1a Cr-Commit-Position: refs/heads/master@{#317177}
5 years, 10 months ago (2015-02-20 00:02:48 UTC) #31
Mark Seaborn
Is it possible that this change caused the test failures on the Win7 bots in ...
5 years, 10 months ago (2015-02-20 21:43:20 UTC) #32
JF
5 years, 10 months ago (2015-02-20 21:45:17 UTC) #33
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/943043002/ by jfb@chromium.org.

The reason for reverting is: Speculative revert after discussion on IRC, this
seems pretty unlikely but may have caused the failures at:

http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%28....

Powered by Google App Engine
This is Rietveld 408576698