[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230125153642.db8c733f5b21e27d3aa80b7d@linux-foundation.org>
Date: Wed, 25 Jan 2023 15:36:42 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexey Gladkov <legion@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, containers@...ts.linux.dev,
linux-fsdevel@...r.kernel.org,
Alexey Dobriyan <adobriyan@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Val Cowan <vcowan@...hat.com>
Subject: Re: [RFC PATCH v1 2/6] proc: Add allowlist to control access to
procfs files
On Wed, 25 Jan 2023 16:28:49 +0100 Alexey Gladkov <legion@...nel.org> wrote:
> If, after creating a container and mounting procfs, the system
> configuration may change and new files may appear in procfs. Files
> including writable root or any other users.
>
> In most cases, it is known in advance which files in procfs the user
> needs in the container. It is much easier to control the list of what
> you want than to control the list of unwanted files.
>
> To do this, subset=allowlist is added to control the visibility of
> static files in procfs (not process pids). After that, the control file
> /proc/allowlist appears in the root of the filesystem. This file
> contains a list of files and directories that will be visible in this
> vmountpoint. Immediately after mount, this file contains only one
> name - the name of the file itself.
>
> The admin can add names, read this file to get the current state of the
> allowlist. The file behaves almost like a regular file. Changes are
> applied when the file is closed.
"the admin" is a bit vague. Precisely which capabilities are required
for this?
> To prevent changes to allowlist, admin should remove its name from the
> list of allowed files. After this change, the file will disappear.
Powered by blists - more mailing lists