[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180322111424.GE30522@ZenIV.linux.org.uk>
Date: Thu, 22 Mar 2018 11:14:25 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Jeff Layton <jlayton@...nel.org>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
"J. Bruce Fields" <bfields@...ldses.org>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel P . Berrangé <berrange@...hat.com>,
Kate Stewart <kstewart@...uxfoundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Philippe Ombredanne <pombredanne@...b.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2] locks: change POSIX lock ownership on execve when
files_struct is displaced
On Thu, Mar 22, 2018 at 12:19:59AM -0500, Eric W. Biederman wrote:
> Jeff Layton <jlayton@...nel.org> writes:
>
> > From: Jeff Layton <jlayton@...hat.com>
> >
> > POSIX mandates that open fds and their associated file locks should be
> > preserved across an execve. This works, unless the process is
> > multithreaded at the time that execve is called.
>
> Would this perhaps work better if we moved unshare_files to after or
> inside of de_thread. That would remove any cases where fd->count is > 1
> simply because you are multi-threaded. It would only leave the strange
> cases where files struct is shared between different processes.
So during the probing of binfmts, etc. the descriptor table would be modifiable
by other threads?
flush_old_exec() is far too late in execve()...
Powered by blists - more mailing lists