From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0172DC63697 for ; Sat, 28 Nov 2020 05:16:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A34F4221EB for ; Sat, 28 Nov 2020 05:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726010AbgK1FPc (ORCPT ); Sat, 28 Nov 2020 00:15:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726152AbgK1FN0 (ORCPT ); Sat, 28 Nov 2020 00:13:26 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15771C0613D1; Fri, 27 Nov 2020 21:12:48 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kisX4-00F0ax-Iz; Sat, 28 Nov 2020 05:12:26 +0000 Date: Sat, 28 Nov 2020 05:12:26 +0000 From: Al Viro To: Linus Torvalds Cc: "Eric W. Biederman" , Linux Kernel Mailing List , linux-fsdevel , criu@openvz.org, bpf , Christian Brauner , Oleg Nesterov , Cyrill Gorcunov , Jann Horn , Kees Cook , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Subject: Re: [PATCH v2 00/24] exec: Move unshare_files and guarantee files_struct.count is correct Message-ID: <20201128051226.GA3577182@ZenIV.linux.org.uk> References: <87r1on1v62.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 04:05:47PM -0800, Linus Torvalds wrote: > On Fri, Nov 20, 2020 at 3:11 PM Eric W. Biederman wrote: > > > > This set of changes cleanups of the code in exec so hopefully this code > > will not regress again. Then it adds helpers and fixes the users of > > files_struct so the reference count is only incremented if COPY_FILES is > > passed to clone (or if io_uring takes a reference). Then it removes > > helpers (get_files_struct, __install_fd, __alloc_fd, __close_fd) that > > are no longer needed and if used would encourage code that increments > > the count of files_struct somewhere besides in clone when COPY_FILES is > > passed. > > I'm not seeing anything that triggered me going "that looks dodgy". It > all looks like nice cleanups. > > But that's just from reading the patches (and in some cases going and > looking at the context), so I didn't actually _test_ any of it. It all > looks sane to me, though, and the fact that it removes a fair number > of lines of code is always a good sign. > > It would be good for people to review and test (Al? Oleg? others?), > but my gut feel is "this is good". Will check (sorry, the last couple of weeks had been bloody awful - off-net and very short on sleep); I'm digging through the piles of email right now.