[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241106-neukauf-befugnis-a54d08ac9b4b@brauner>
Date: Wed, 6 Nov 2024 11:06:10 +0100
From: Christian Brauner <brauner@...nel.org>
To: Tycho Andersen <tycho@...ho.pizza>
Cc: Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
Eric Biederman <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>,
Shuah Khan <skhan@...uxfoundation.org>, Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>,
Aleksa Sarai <cyphar@...har.com>, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Tycho Andersen <tandersen@...flix.com>
Subject: Re: [PATCH 1/2] exec: fix up /proc/pid/comm in the
execveat(AT_EMPTY_PATH) case
On Wed, Oct 30, 2024 at 02:37:31PM -0600, Tycho Andersen wrote:
> From: Tycho Andersen <tandersen@...flix.com>
>
> Zbigniew mentioned at Linux Plumber's that systemd is interested in
> switching to execveat() for service execution, but can't, because the
> contents of /proc/pid/comm are the file descriptor which was used,
> instead of the path to the binary. This makes the output of tools like
> top and ps useless, especially in a world where most fds are opened
> CLOEXEC so the number is truly meaningless.
>
> Change exec path to fix up /proc/pid/comm in the case where we have
> allocated one of these synthetic paths in bprm_init(). This way the actual
> exec machinery is unchanged, but cosmetically the comm looks reasonable to
> admins investigating things.
>
> Signed-off-by: Tycho Andersen <tandersen@...flix.com>
> Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>
> CC: Aleksa Sarai <cyphar@...har.com>
> Link: https://github.com/uapi-group/kernel-features#set-comm-field-before-exec
> ---
We finally went full circle back to what was originally proposed :)
Reviewed-by: Christian Brauner <brauner@...nel.org>
Powered by blists - more mailing lists