Re: [PATCH RFC v3 01/90] Documentation: add a design document for cells

From: Askar Safin

Date: Thu Nov 26 2026 - 01:01:13 EST


Josef Bacik <josef@xxxxxxxxxxxxxx>:
> +The mount namespace stays owned by the user namespace of the builder. That is what
> +keeps a task of the cell from mounting anything.

fsmount creates mount in anon namespace. So fsmount is allowed?!

> +not poll readable, ``PIDFD_GET_INFO`` has no exit to report, and its ``fdinfo`` says
> +``Pid: 0`` and not ``-1``.

I don't like this. PID 0 is idle process (swapper). Let it be -1 or -2.


> Nobody has to
> +wait for the task: it is reaped on its own, and the pidfd tells how it ended.

I don't like this. I think task should be normal task, which reaped normally.
If user wants the task to be autoreaped, then let the user set CLONE_AUTOREAP.

Also, you said "pidfd tells how it ended", yet your later example reads status
from cell fd, not from pidfd.

Anyway, I think that we should get exit status the usual way, i. e. waitid
on pidfd with P_PIDFD.

> + pidfd = pidfd_open(cfd, PIDFD_EMPTY); /* no task yet, the caller does not fork */
> +
> + pidfd_configure(pidfd, PIDFD_SET_STRING, "exec", "/usr/sbin/nginx", 0);
> + pidfd_configure(pidfd, PIDFD_SET_BINARY, "argv", "nginx\0-g\0daemon off;", 21);
> + pidfd_configure(pidfd, PIDFD_SET_FD, "1", NULL, log_fd);
> + pidfd_configure(pidfd, PIDFD_SET_FD, "2", NULL, log_fd);
> + pidfd_configure(pidfd, PIDFD_CMD_START, NULL, NULL, 0);

Does new process indeed start with empty file table? If yes, then also set
fd 0 to /dev/null in this example. Usual userspace programs are not
prepared to fd 0, 1 and 2 to be closed.

(I am human, not LLM.)

(Don't add me to CC for next version.)

--
Askar Safin