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

Issue 240673002: Simplify ZygoteForkDelegate API further (Closed)

Created:
6 years, 8 months ago by mdempsky
Modified:
6 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Simplify ZygoteForkDelegate API further This patch makes three changes: 1. Removes the AckChild() delegate method used to send a custom message to the child process. 2. Instead, the parent always writes the child's PID (as seen by the browser) over the pipe. (Exception: When writing to a NaCl child process, we instead send 0 to avoid leaking the real PID into the NaCl address space.) 3. Makes the Fork() delegate method responsible for sending the IPC channel ID to the child process. This is in preparation for the next patch which will switch the pipe direction to make the child responsible for discovering its own PID and sending it to the parent process. By removing AckChild(), this simplifies the protocol and makes this change easier to implement. BUG=357670 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264764

Patch Set 1 #

Total comments: 4

Patch Set 2 : Don't leak real PID to NaCl child processes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -42 lines) Patch
M components/nacl/loader/nacl_helper_linux.cc View 1 4 chunks +25 lines, -11 lines 0 comments Download
M components/nacl/zygote/nacl_fork_delegate_linux.h View 1 chunk +2 lines, -2 lines 0 comments Download
M components/nacl/zygote/nacl_fork_delegate_linux.cc View 3 chunks +3 lines, -10 lines 0 comments Download
M content/public/common/zygote_fork_delegate_linux.h View 1 chunk +4 lines, -6 lines 0 comments Download
M content/zygote/zygote_linux.cc View 1 2 chunks +9 lines, -13 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
mdempsky
6 years, 8 months ago (2014-04-17 17:07:09 UTC) #1
jln (very slow on Chromium)
lgtm, thanks for the cleanup!
6 years, 8 months ago (2014-04-17 17:53:03 UTC) #2
mdempsky
piman: Please review the small change in content/public/common/zygote_fork_delegate_linux.h for OWNERS approval. mseaborn: Please review the ...
6 years, 8 months ago (2014-04-17 18:01:42 UTC) #3
Mark Seaborn
https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc File components/nacl/loader/nacl_helper_linux.cc (right): https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc#newcode127 components/nacl/loader/nacl_helper_linux.cc:127: HANDLE_EINTR(read(parent_fd, &real_pid, sizeof(real_pid))); So you're sending the real PID ...
6 years, 8 months ago (2014-04-17 18:32:11 UTC) #4
jln (very slow on Chromium)
https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc File components/nacl/loader/nacl_helper_linux.cc (right): https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc#newcode127 components/nacl/loader/nacl_helper_linux.cc:127: HANDLE_EINTR(read(parent_fd, &real_pid, sizeof(real_pid))); On 2014/04/17 18:32:12, Mark Seaborn wrote: ...
6 years, 8 months ago (2014-04-17 18:40:05 UTC) #5
jln (very slow on Chromium)
https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc File components/nacl/loader/nacl_helper_linux.cc (right): https://codereview.chromium.org/240673002/diff/1/components/nacl/loader/nacl_helper_linux.cc#newcode127 components/nacl/loader/nacl_helper_linux.cc:127: HANDLE_EINTR(read(parent_fd, &real_pid, sizeof(real_pid))); On 2014/04/17 18:40:06, jln wrote: > ...
6 years, 8 months ago (2014-04-17 18:42:32 UTC) #6
mdempsky
mseaborn: PTAL. I've revised the patch as we discussed on IRC to avoid leaking the ...
6 years, 8 months ago (2014-04-17 19:31:53 UTC) #7
Mark Seaborn
LGTM, thanks
6 years, 8 months ago (2014-04-17 19:42:56 UTC) #8
piman
lgtm
6 years, 8 months ago (2014-04-17 23:35:53 UTC) #9
mdempsky
The CQ bit was checked by mdempsky@chromium.org
6 years, 8 months ago (2014-04-18 00:07:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mdempsky@chromium.org/240673002/20001
6 years, 8 months ago (2014-04-18 00:09:26 UTC) #11
commit-bot: I haz the power
6 years, 8 months ago (2014-04-18 10:25:36 UTC) #12
Message was sent while issue was closed.
Change committed as 264764

Powered by Google App Engine
This is Rietveld 408576698