[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024082313-throttle-snuggle-6238@gregkh>
Date: Fri, 23 Aug 2024 14:12:51 +0800
From: Greg KH <gregkh@...uxfoundation.org>
To: Linux regressions mailing list <regressions@...ts.linux.dev>
Cc: stable@...r.kernel.org, Sasha Levin <sashal@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Oleg Nesterov <oleg@...hat.com>, Aleksa Sarai <cyphar@...har.com>,
Tycho Andersen <tandersen@...flix.com>,
Daan De Meyer <daan.j.demeyer@...il.com>, Tejun Heo <tj@...nel.org>,
Eric Biggers <ebiggers@...nel.org>,
Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH] pidfd: prevent creation of pidfds for kthreads
On Fri, Aug 23, 2024 at 07:23:12AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> On 19.08.24 10:41, Christian Brauner wrote:
> > On Sat, Aug 17, 2024 at 08:58:18PM GMT, Eric Biggers wrote:
> >> On Wed, Jul 31, 2024 at 12:01:12PM +0200, Christian Brauner wrote:
> >>> It's currently possible to create pidfds for kthreads but it is unclear
> >>> what that is supposed to mean. Until we have use-cases for it and we
> >>> figured out what behavior we want block the creation of pidfds for
> >>> kthreads.
> >>>
> >>> Fixes: 32fcb426ec00 ("pid: add pidfd_open()")
> >>> Cc: stable@...r.kernel.org
> >>> Signed-off-by: Christian Brauner <brauner@...nel.org>
> >>> ---
> >>> kernel/fork.c | 25 ++++++++++++++++++++++---
> >>> 1 file changed, 22 insertions(+), 3 deletions(-)
> >>
> >> Unfortunately this commit broke systemd-shutdown's ability to kill processes,
> >> which makes some filesystems no longer get unmounted at shutdown.
> >>
> >> It looks like systemd-shutdown relies on being able to create a pidfd for any
> >> process listed in /proc (even a kthread), and if it gets EINVAL it treats it a
> >> fatal error and stops looking for more processes...
> >
> > Thanks for the report!
> > I talked to Daan De Meyer who made that change and he said that this
> > must a systemd version that hasn't gotten his fixes yet. In any case, if
> > this causes regression then I'll revert it right now. See the appended
> > revert.
>
> Greg, Sasha, JFYI in case you are not already aware of it: I by
> chance[1] noticed that the patch Christian plans to revert is still in
> the 6.10-queue. You might want to drop it (or apply the revert as well,
> which is in -next, but not yet in mainline afaics).
I was hoping it would get into Linus's tree "soon" so I could take the
revert too. As it's in -next, I'll grab it from there when I get a
chance.
thanks,
greg k-h
Powered by blists - more mailing lists