[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201207233558.GE3579531@ZenIV.linux.org.uk>
Date: Mon, 7 Dec 2020 23:35:58 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
criu@...nvz.org, bpf@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Oleg Nesterov <oleg@...hat.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Jann Horn <jann@...jh.net>, Kees Cook <keescook@...omium.org>,
Daniel P . Berrangé <berrange@...hat.com>,
Jeff Layton <jlayton@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Matthew Wilcox <willy@...radead.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Chris Wright <chrisw@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>
Subject: Re: [PATCH v2 01/24] exec: Move unshare_files to fix posix file
locking during exec
On Mon, Dec 07, 2020 at 05:07:55PM -0600, Eric W. Biederman wrote:
> My mistake. I missed that the actual code was highly optimized and only
> safe in the presence of an unshared files struct.
That's a polite way to spell "overoptimized for no good reason" ;-)
> What I saw and what I thought the comment was talking about was that the
> result of the test isn't guaranteed to be stable without having an
> exclusive access to the files. I figured and if something changes later
> and it becomes safe to pass the file name to a script later we don't
> really care.
>
> In any event thank you for the review. I will queue up a follow on
> patch that makes this use get_close_on_exec.
I would rather put that switch to get_close_on_exec() first in the queue
(or fold it into this patch)...
Powered by blists - more mailing lists