[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240928144636.d1964e6c6bb77c3e9123fc64@linux-foundation.org>
Date: Sat, 28 Sep 2024 14:46:36 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Kees Cook <kees@...nel.org>
Cc: Vegard Nossum <vegard.nossum@...cle.com>, "Eric W. Biederman"
<ebiederm@...ssion.com>, Allen Pais <apais@...ux.microsoft.com>, Roman
Kisel <romank@...ux.microsoft.com>, Xiaoming Ni <nixiaoming@...wei.com>,
Vijay Nag <nagvijay@...rosoft.com>, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] coredump: Do not lock during 'comm' reporting
On Sat, 28 Sep 2024 14:39:45 -0700 Kees Cook <kees@...nel.org> wrote:
> On Sat, Sep 28, 2024 at 02:35:32PM -0700, Andrew Morton wrote:
> > On Sat, 28 Sep 2024 14:08:31 -0700 Kees Cook <kees@...nel.org> wrote:
> >
> > > The 'comm' member will always be NUL terminated,
> >
> > Why is this? I thought this is only true if the caller holds task_lock()?
>
> Because it's always written with strscpy_pad(). The final byte will
> always be NUL. (And this has been true for a very long time.)
So why does __get_task_comm() need to take task_lock()?
Powered by blists - more mailing lists