[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj+ynePRJC3U5Tjn+ZBRAE3y7=anc=zFhL=ycxyKP8BxA@mail.gmail.com>
Date: Tue, 28 Jul 2020 11:17:02 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>, Pavel Machek <pavel@....cz>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>,
Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [RFC][PATCH] exec: Freeze the other threads during a
multi-threaded exec
On Tue, Jul 28, 2020 at 6:23 AM Eric W. Biederman <ebiederm@...ssion.com> wrote:
>
> For exec all I care about are user space threads. So it appears the
> freezer infrastructure adds very little.
Yeah. 99% of the freezer stuff is for just adding the magic notations
for kernel threads, and for any user space threads it seems the wrong
interface.
> Now to see if I can find another way to divert a task into a slow path
> as it wakes up, so I don't need to manually wrap all of the sleeping
> calls. Something that plays nice with the scheduler.
The thing is, how many places really care?
Because I think there are like five of them. And they are all marked
by taking cred_guard_mutex, or the file table lock.
So it seems really excessive to then create some whole new "let's
serialize every thread", when you actually don't care about any of it,
except for a couple of very very special cases.
If you care about "thread count stable", you care about exit() and
clone(). You don't care about threads that are happily running - or
sleeping - doing their own thing.
So trying to catch those threads and freezing them really feels like
entirely the wrong interface.
Linus
Powered by blists - more mailing lists