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

Issue 1893313003: [mojo] Use a pipe path to initialise Mojo in elevated utility processes. (Closed)

Created:
4 years, 8 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, 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] Use a pipe path to initialise Mojo in elevated utility processes. Elevated processes can't be passed HANDLEs, so instead, IPC channels must be initialised by passing a pipe path on the command line. For security, passing a pipe path is only done for elevated process and no other process types. BUG=604282 Committed: https://crrev.com/32ca1d648267a6ce2dae1417b6710089b2555f42 Cr-Commit-Position: refs/heads/master@{#395533}

Patch Set 1 #

Patch Set 2 : Build fix. #

Patch Set 3 : fffffffff #

Patch Set 4 : kdfjghkfdjghd #

Patch Set 5 : dghkfdhkfgdfghk #

Patch Set 6 : ugdfjkbvmc #

Patch Set 7 : sandbox #

Patch Set 8 : cleanup #

Patch Set 9 : changes #

Patch Set 10 : dgbvgkubdfhjdbhdfdth #

Patch Set 11 : kdfjhkdsjf #

Patch Set 12 : Only use named pipe with elevated processes. #

Patch Set 13 : Fix analyse #

Patch Set 14 : Fix errors. #

Patch Set 15 : Add test #

Patch Set 16 : Rebase #

Total comments: 13

Patch Set 17 : Split connection IO context. #

Patch Set 18 : Limit pipe access. #

Patch Set 19 : Restrict pipe access #

Patch Set 20 : Rebase #

Patch Set 21 : rebase... again #

Patch Set 22 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -16 lines) Patch
M content/browser/child_process_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +18 lines, -6 lines 0 comments Download
M content/browser/utility_process_host_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +15 lines, -4 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +13 lines, -3 lines 0 comments Download
M mojo/edk/embedder/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
A mojo/edk/embedder/named_platform_channel_pair.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +64 lines, -0 lines 0 comments Download
A mojo/edk/embedder/named_platform_channel_pair_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +131 lines, -0 lines 0 comments Download
M mojo/edk/embedder/platform_handle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/edk/system/channel_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +38 lines, -0 lines 0 comments Download
M mojo/mojo_edk.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (11 generated)
Anand Mistry (off Chromium)
kdfjhkdsjf
4 years, 8 months ago (2016-04-22 04:28:25 UTC) #1
Anand Mistry (off Chromium)
nick: for content/ rockot: for mojo/ wfh: for security
4 years, 7 months ago (2016-05-10 04:04:55 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1893313003/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1893313003/300001
4 years, 7 months ago (2016-05-10 04:46:25 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-10 05:46:29 UTC) #9
Ken Rockot(use gerrit already)
LG, just one comment first https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/system/channel_win.cc File mojo/edk/system/channel_win.cc (right): https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/system/channel_win.cc#newcode155 mojo/edk/system/channel_win.cc:155: &read_context_.overlapped); I'd rather we ...
4 years, 7 months ago (2016-05-10 22:41:29 UTC) #10
Will Harris
+forshaw can you take a look at this pipe code?
4 years, 7 months ago (2016-05-10 22:46:32 UTC) #12
forshaw
https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc File mojo/edk/embedder/named_platform_channel_pair_win.cc (right): https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc#newcode42 mojo/edk/embedder/named_platform_channel_pair_win.cc:42: const DWORD kPipeMode = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE; I'd recommend ...
4 years, 7 months ago (2016-05-11 00:01:41 UTC) #13
ncarter (slow)
https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc#newcode234 content/child/child_thread_impl.cc:234: mojo::edk::PlatformChannelPair::kMojoPlatformChannelHandleSwitch)) { The layering here feels little awkward -- ...
4 years, 7 months ago (2016-05-11 00:14:23 UTC) #14
Anand Mistry (off Chromium)
https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc#newcode234 content/child/child_thread_impl.cc:234: mojo::edk::PlatformChannelPair::kMojoPlatformChannelHandleSwitch)) { On 2016/05/11 00:14:23, ncarter wrote: > The ...
4 years, 7 months ago (2016-05-11 04:15:20 UTC) #15
forshaw
https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc File mojo/edk/embedder/named_platform_channel_pair_win.cc (right): https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc#newcode49 mojo/edk/embedder/named_platform_channel_pair_win.cc:49: nullptr)); // Default security descriptor. > I've tried to ...
4 years, 7 months ago (2016-05-11 12:03:15 UTC) #16
ncarter (slow)
lgtm from a content/ perspective. https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/1893313003/diff/300001/content/child/child_thread_impl.cc#newcode234 content/child/child_thread_impl.cc:234: mojo::edk::PlatformChannelPair::kMojoPlatformChannelHandleSwitch)) { On 2016/05/11 ...
4 years, 7 months ago (2016-05-11 16:06:07 UTC) #17
Anand Mistry (off Chromium)
https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc File mojo/edk/embedder/named_platform_channel_pair_win.cc (right): https://codereview.chromium.org/1893313003/diff/300001/mojo/edk/embedder/named_platform_channel_pair_win.cc#newcode49 mojo/edk/embedder/named_platform_channel_pair_win.cc:49: nullptr)); // Default security descriptor. On 2016/05/11 12:03:15, forshaw ...
4 years, 7 months ago (2016-05-12 01:17:07 UTC) #18
Ken Rockot(use gerrit already)
lgtm
4 years, 7 months ago (2016-05-13 05:32:42 UTC) #19
Anand Mistry (off Chromium)
forshaw: Ping!
4 years, 7 months ago (2016-05-16 23:26:41 UTC) #20
forshaw
On 2016/05/16 23:26:41, Anand Mistry wrote: > forshaw: Ping! Sorry, lgtm.
4 years, 7 months ago (2016-05-17 11:05:35 UTC) #21
Anand Mistry (off Chromium)
FYI. To avoid messing up M52, I plan on submitting this after the branch point.
4 years, 7 months ago (2016-05-18 00:54:24 UTC) #22
Ken Rockot(use gerrit already)
Sgtm On May 17, 2016 5:54 PM, <amistry@chromium.org> wrote: > FYI. To avoid messing up ...
4 years, 7 months ago (2016-05-18 01:41:36 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1893313003/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1893313003/420001
4 years, 7 months ago (2016-05-24 05:49:01 UTC) #27
commit-bot: I haz the power
Committed patchset #22 (id:420001)
4 years, 7 months ago (2016-05-24 05:53:00 UTC) #29
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/32ca1d648267a6ce2dae1417b6710089b2555f42 Cr-Commit-Position: refs/heads/master@{#395533}
4 years, 7 months ago (2016-05-24 05:54:02 UTC) #31
Irfan
A revert of this CL (patchset #22 id:420001) has been created in https://codereview.chromium.org/2009033002/ by isheriff@chromium.org. ...
4 years, 7 months ago (2016-05-24 20:18:21 UTC) #32
Anand Mistry (off Chromium)
On 2016/05/24 20:18:21, Irfan wrote: > A revert of this CL (patchset #22 id:420001) has ...
4 years, 7 months ago (2016-05-24 21:38:48 UTC) #33
Ken Rockot(use gerrit already)
4 years, 7 months ago (2016-05-24 21:47:08 UTC) #34
Message was sent while issue was closed.
On 2016/05/24 at 21:38:48, amistry wrote:
> On 2016/05/24 20:18:21, Irfan wrote:
> > A revert of this CL (patchset #22 id:420001) has been created in
> > https://codereview.chromium.org/2009033002/ by mailto:isheriff@chromium.org.
> > 
> > The reason for reverting is: This is failing DrMemory tests. See
> >
https://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%2...
> > for details.
> 
> Weird. The new code paths aren't even run in that test.

I think it's because we store PlatformHandle in buffers, and we have to
explicitly initialize that storage.

Powered by Google App Engine
This is Rietveld 408576698