From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Jeff Layton" <jlayton@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
"J. Bruce Fields" <bfields@fieldses.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Kate Stewart" <kstewart@linuxfoundation.org>,
"Dan Williams" <dan.j.williams@intel.com>,
"Philippe Ombredanne" <pombredanne@nexb.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] locks: change POSIX lock ownership on execve when files_struct is displaced
Date: Thu, 22 Mar 2018 11:14:25 +0000 [thread overview]
Message-ID: <20180322111424.GE30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <87bmfgvg8w.fsf@xmission.com>
On Thu, Mar 22, 2018 at 12:19:59AM -0500, Eric W. Biederman wrote:
> Jeff Layton <jlayton@kernel.org> writes:
>
> > From: Jeff Layton <jlayton@redhat.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()...
prev parent reply other threads:[~2018-03-22 11:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 14:25 [PATCH] locks: change POSIX lock ownership on execve when files_struct is displaced Jeff Layton
2018-03-17 15:05 ` Al Viro
2018-03-17 15:43 ` Jeff Layton
2018-03-17 15:52 ` Al Viro
2018-03-17 19:28 ` Jeff Layton
2018-03-17 16:58 ` [PATCH v2] " Jeff Layton
2018-03-22 5:19 ` Eric W. Biederman
2018-03-22 5:36 ` Eric W. Biederman
2018-03-22 10:57 ` Jeff Layton
2018-04-02 12:56 ` Jeff Layton
2018-04-03 17:22 ` Eric W. Biederman
2018-03-22 11:14 ` Al Viro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180322111424.GE30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=berrange@redhat.com \
--cc=bfields@fieldses.org \
--cc=dan.j.williams@intel.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=jlayton@kernel.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.