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

Issue 2008953003: [mojo-edk] Explicitly serialise HANDLEs into messages instead of PlatformHandles. (Closed)

Created:
4 years, 7 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[mojo-edk] Explicitly serialise HANDLEs into messages instead of PlatformHandles. This changes HANDLEs on windows to have an explicit serialised form instead of copying the in-memory PlatformHandle class. This is intended to prevent accidental leakage of information between processes, and address serialisation issues such as padding. BUG=604282 Committed: https://crrev.com/9a14e9bc319a664d5175a3cd65ea297e06f7391a Cr-Commit-Position: refs/heads/master@{#396667}

Patch Set 1 #

Patch Set 2 : fix build #

Patch Set 3 : build fix #

Patch Set 4 : remove handles accessor #

Total comments: 4

Patch Set 5 : comments #

Total comments: 2

Patch Set 6 : use struct #

Patch Set 7 : cast #

Patch Set 8 : cast2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -76 lines) Patch
M mojo/edk/system/channel.h View 1 2 3 4 5 4 chunks +13 lines, -9 lines 0 comments Download
M mojo/edk/system/channel.cc View 1 2 3 4 5 6 7 10 chunks +30 lines, -54 lines 0 comments Download
M mojo/edk/system/channel_win.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -2 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M mojo/edk/system/node_channel.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M mojo/edk/system/node_controller.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M mojo/edk/system/ports_message.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 28 (10 generated)
Anand Mistry (off Chromium)
I think memcpy'ing PlatformHandles to/from messages is sorta brittle and error-prone. Fds and Mach ports ...
4 years, 7 months ago (2016-05-25 01:21:17 UTC) #2
Ken Rockot(use gerrit already)
On 2016/05/25 at 01:21:17, amistry wrote: > I think memcpy'ing PlatformHandles to/from messages is sorta ...
4 years, 7 months ago (2016-05-25 03:44:36 UTC) #3
Anand Mistry (off Chromium)
On 2016/05/25 03:44:36, Ken Rockot wrote: > On 2016/05/25 at 01:21:17, amistry wrote: > > ...
4 years, 7 months ago (2016-05-25 05:37:39 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2008953003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2008953003/60001
4 years, 7 months ago (2016-05-25 10:00:34 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-25 11:08:02 UTC) #8
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-25 11:08:08 UTC) #9
Anand Mistry (off Chromium)
Ok, I think this is ready for review.
4 years, 7 months ago (2016-05-25 12:04:41 UTC) #10
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2008953003/diff/60001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (left): https://codereview.chromium.org/2008953003/diff/60001/mojo/edk/system/message_pipe_dispatcher.cc#oldcode308 mojo/edk/system/message_pipe_dispatcher.cc:308: if (msg->num_handles() < next_platform_handle_index || nit: Could you ...
4 years, 7 months ago (2016-05-25 15:48:13 UTC) #11
Anand Mistry (off Chromium)
+dcheng for security https://codereview.chromium.org/2008953003/diff/60001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (left): https://codereview.chromium.org/2008953003/diff/60001/mojo/edk/system/message_pipe_dispatcher.cc#oldcode308 mojo/edk/system/message_pipe_dispatcher.cc:308: if (msg->num_handles() < next_platform_handle_index || On ...
4 years, 7 months ago (2016-05-25 23:36:39 UTC) #13
dcheng
Delegating this to wfh as a windows expert.
4 years, 7 months ago (2016-05-26 01:15:08 UTC) #15
Will Harris
On 2016/05/26 01:15:08, dcheng wrote: > Delegating this to wfh as a windows expert. can ...
4 years, 7 months ago (2016-05-26 18:32:13 UTC) #16
Ken Rockot(use gerrit already)
I'll leave Anand to update the description, but the purpose of the CL is to ...
4 years, 7 months ago (2016-05-26 19:03:09 UTC) #17
Will Harris
https://codereview.chromium.org/2008953003/diff/80001/mojo/edk/system/channel.cc File mojo/edk/system/channel.cc (right): https://codereview.chromium.org/2008953003/diff/80001/mojo/edk/system/channel.cc#newcode51 mojo/edk/system/channel.cc:51: extra_header_size = max_handles_ * sizeof(HANDLE); sizeof(HANDLE) is 8 on ...
4 years, 7 months ago (2016-05-26 19:23:12 UTC) #18
Anand Mistry (off Chromium)
https://codereview.chromium.org/2008953003/diff/80001/mojo/edk/system/channel.cc File mojo/edk/system/channel.cc (right): https://codereview.chromium.org/2008953003/diff/80001/mojo/edk/system/channel.cc#newcode51 mojo/edk/system/channel.cc:51: extra_header_size = max_handles_ * sizeof(HANDLE); On 2016/05/26 19:23:11, Will ...
4 years, 7 months ago (2016-05-27 03:44:35 UTC) #20
Will Harris
lgtm
4 years, 6 months ago (2016-05-27 20:19:09 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2008953003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2008953003/140001
4 years, 6 months ago (2016-05-30 00:00:01 UTC) #24
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 6 months ago (2016-05-30 01:56:54 UTC) #26
commit-bot: I haz the power
4 years, 6 months ago (2016-05-30 01:58:09 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9a14e9bc319a664d5175a3cd65ea297e06f7391a
Cr-Commit-Position: refs/heads/master@{#396667}

Powered by Google App Engine
This is Rietveld 408576698