All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Halaney <andrew@amutable.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] cells: a container as one kernel object
Date: Wed, 21 Oct 2026 14:54:38 -0500	[thread overview]
Message-ID: <atkV5pSBmZbLH_i-@toolbx> (raw)
In-Reply-To: <20261019-cells-rfc-6f4c85415f29@toxicpanda.com>

On Mon, Oct 19, 2026 at 04:50:47PM +0000, Josef Bacik wrote:

(...)

> The system calls
> ================
> 
> They are split by what they do, as the mount API is, so that "may look but not touch"
> is a system call number: ``cell_info()`` changes nothing.
> 
> .. code-block:: c
> 
>    int cell_create(int parent, unsigned int flags);
>    int cell_configure(int cfd, unsigned int cmd, const char *key,
>                       const void *value, int aux);
>    int cell_info(int cfd, struct cell_info *info, size_t size,
>                  unsigned int flags);
>    int cell_open(int cfd, unsigned int what, const char *key, const void *arg,
>                  unsigned int flags);
>    int task_configure(int pidfd, unsigned int cmd, const char *key,
>                       const void *value, int aux);
> 
> ``cell_create()``
>   makes a new, empty cell and returns a cellfd, which is always close-on-exec.
>   ``parent`` is ``CELL_SELF``.  It takes no privilege, but it makes a user namespace,
>   and what applies to those applies here: ``user.max_user_namespaces``, the LSM hook,
>   and no chrooted caller.

One thing to consider here is how we want ucounts to be handled. I've
been burned by those in the past, since if your container builder runs
as root the ucount accounting rolls up the counts to the user in the
initial user namespace who builds the container.

e.g. it's easy for a bad inotify container to exhaust real root's inotify
limits with ucounts if the builder itself isn't running as a unique
user. We ended up making the user namespace as the container's kuid
in containerd to deal with that, but with the "no provided uids"
approach you don't have that option from the builder's point of view.

Might be nice to kill the ucount rollup at the initial cell that was
created... can't decide how to deal with that all offhand, I'm sure just
stopping it there has its own issues.

Thanks,
Andrew

  parent reply	other threads:[~2026-10-21 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 16:50 [RFC] cells: a container as one kernel object Josef Bacik
2026-10-21  2:35 ` James Bottomley
2026-10-21 13:43   ` Josef Bacik
2026-10-21 19:43     ` Andrew Halaney
2026-10-22  2:26     ` James Bottomley
2026-10-21 13:15 ` Christian Brauner
2026-10-21 19:54 ` Andrew Halaney [this message]
2026-10-25 19:46 ` Jeremy Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atkV5pSBmZbLH_i-@toolbx \
    --to=andrew@amutable.com \
    --cc=brauner@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.