DescriptionStop using chrome-sandbox to determine real pids
Previously, when the zygote forked a child process, the parent would
send an IPC to the browser process, which then used chrome-sandbox to
do some procfs trickery to correlate PIDs across PID namespaces.
However, since Linux 3.0, PIDs provided by the kernel (e.g., by
SCM_CREDENTIALS) are automatically translated to the receiver's PID
namespace. To take advantage of this, this CL makes two changes:
1. Add a new sandbox IPC request to send back the caller's PID as seen
by the browser PID namespace.
2. Switch roles so the fork child now issues the sandbox IPC to
determine its own PID, and the browser writes the child's PID over the
pipe for the parent to read.
BUG=357670
Patch Set 1 #Patch Set 2 : Use extended RecvMsg API instead of GetPeerPid #Patch Set 3 : Style guide discourages default function arguments #Patch Set 4 : Sync to HEAD and resolve conflicts #Patch Set 5 : Use more ScopedFDs #Patch Set 6 : Fix indenting missed by clang-format #Patch Set 7 : Restore use of base::ReadFromFD() instead of read() #Patch Set 8 : Fix an embarassing number of compile errors #Messages
Total messages: 2 (0 generated)
|