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

Issue 831363002: Add the ability to run a callback between fork and exec. (Closed)

Created:
5 years, 11 months ago by rickyz (no longer on Chrome)
Modified:
5 years, 11 months ago
CC:
chromium-reviews, erikwright+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 the ability to run a callback between fork and exec. This will be used along with user namespaces allow blocking the child from execing until the uid and gid map has been written. BUG=312380 Committed: https://crrev.com/a0b860bf256bc5c847eaa0533e01736c2844e771 Cr-Commit-Position: refs/heads/master@{#311925}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use a delegate class instead of a Closure. #

Total comments: 20

Patch Set 3 : More comments. #

Total comments: 2

Patch Set 4 : Improve pre_exec_delegate comment. #

Total comments: 4

Patch Set 5 : Remove resets. #

Patch Set 6 : Readd closing read end. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -1 line) Patch
M base/process/launch.h View 1 2 3 4 2 chunks +28 lines, -0 lines 0 comments Download
M base/process/launch.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M base/process/launch_posix.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M base/process/process_unittest.cc View 1 2 3 4 5 2 chunks +46 lines, -1 line 0 comments Download

Messages

Total messages: 31 (8 generated)
rickyz (no longer on Chrome)
5 years, 11 months ago (2015-01-05 22:20:17 UTC) #2
rickyz (no longer on Chrome)
5 years, 11 months ago (2015-01-05 22:45:52 UTC) #4
jln (very slow on Chromium)
This provides a useful, powerful generic mechanism, but it would be easy to miss-use. The ...
5 years, 11 months ago (2015-01-06 00:43:36 UTC) #5
mdempsky
On 2015/01/06 00:43:36, jln wrote: > mdempsky@: WDYT? I'm similarly apprehensive about enabling arbitrary code ...
5 years, 11 months ago (2015-01-06 01:02:35 UTC) #6
rickyz (no longer on Chrome)
On 2015/01/06 01:02:35, mdempsky wrote: > On 2015/01/06 00:43:36, jln wrote: > > mdempsky@: WDYT? ...
5 years, 11 months ago (2015-01-06 02:52:34 UTC) #7
jln (very slow on Chromium)
On 2015/01/06 02:52:34, rickyz wrote: > If we stay with the function pointer or equivalent, ...
5 years, 11 months ago (2015-01-06 21:34:40 UTC) #8
rickyz (no longer on Chrome)
5 years, 11 months ago (2015-01-06 22:58:16 UTC) #10
rickyz (no longer on Chrome)
(whoever gets to it first)
5 years, 11 months ago (2015-01-06 23:14:58 UTC) #12
jln (very slow on Chromium)
Usually it's better to wait until you get a reviewer to approve a CL before ...
5 years, 11 months ago (2015-01-07 00:40:38 UTC) #14
mdempsky
https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h#newcode144 base/process/launch.h:144: PreExecDelegate* pre_exec_delegate; On 2015/01/07 00:40:37, jln wrote: > scoped_ptr? ...
5 years, 11 months ago (2015-01-07 01:03:50 UTC) #15
rickyz (no longer on Chrome)
https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h#newcode46 base/process/launch.h:46: virtual ~PreExecDelegate() {} On 2015/01/07 00:40:37, jln wrote: > ...
5 years, 11 months ago (2015-01-07 01:39:07 UTC) #17
mdempsky
https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/831363002/diff/20001/base/process/launch.h#newcode144 base/process/launch.h:144: PreExecDelegate* pre_exec_delegate; On 2015/01/07 01:39:07, rickyz wrote: > Actually, ...
5 years, 11 months ago (2015-01-07 02:12:59 UTC) #18
Lei Zhang
FWIW, LaunchOptions instances are never reused in existing code, but there's nothing preventing someone from ...
5 years, 11 months ago (2015-01-08 23:07:07 UTC) #19
rickyz (no longer on Chrome)
On 2015/01/08 23:07:07, Lei Zhang wrote: > FWIW, LaunchOptions instances are never reused in existing ...
5 years, 11 months ago (2015-01-12 22:47:21 UTC) #20
rickyz (no longer on Chrome)
Oops, forgot to publish comment, sorry. https://codereview.chromium.org/831363002/diff/60001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/831363002/diff/60001/base/process/launch.h#newcode147 base/process/launch.h:147: // needs to ...
5 years, 11 months ago (2015-01-13 17:22:36 UTC) #21
jln (very slow on Chromium)
lgtm https://chromiumcodereview.appspot.com/831363002/diff/80001/base/process/process_unittest.cc File base/process/process_unittest.cc (right): https://chromiumcodereview.appspot.com/831363002/diff/80001/base/process/process_unittest.cc#newcode243 base/process/process_unittest.cc:243: write_fd.reset(); I don't think that's needed, right?
5 years, 11 months ago (2015-01-15 19:42:56 UTC) #22
rickyz (no longer on Chrome)
Thanks, readding thestig@ for base/ OWNERS. https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc File base/process/process_unittest.cc (right): https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc#newcode243 base/process/process_unittest.cc:243: write_fd.reset(); On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 22:03:03 UTC) #24
jln (very slow on Chromium)
https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc File base/process/process_unittest.cc (right): https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc#newcode243 base/process/process_unittest.cc:243: write_fd.reset(); On 2015/01/15 22:03:03, rickyz wrote: > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 22:06:48 UTC) #25
rickyz (no longer on Chrome)
https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc File base/process/process_unittest.cc (right): https://codereview.chromium.org/831363002/diff/80001/base/process/process_unittest.cc#newcode243 base/process/process_unittest.cc:243: write_fd.reset(); On 2015/01/15 22:06:48, jln wrote: > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 22:21:41 UTC) #26
Lei Zhang
lgtm
5 years, 11 months ago (2015-01-16 05:55:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/831363002/120001
5 years, 11 months ago (2015-01-16 17:16:27 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 11 months ago (2015-01-16 18:20:04 UTC) #30
commit-bot: I haz the power
5 years, 11 months ago (2015-01-16 18:21:09 UTC) #31
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a0b860bf256bc5c847eaa0533e01736c2844e771
Cr-Commit-Position: refs/heads/master@{#311925}

Powered by Google App Engine
This is Rietveld 408576698