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 BD722C00A89 for ; Mon, 2 Nov 2020 18:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64D4522243 for ; Mon, 2 Nov 2020 18:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726110AbgKBSnO (ORCPT ); Mon, 2 Nov 2020 13:43:14 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:37978 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgKBSnN (ORCPT ); Mon, 2 Nov 2020 13:43:13 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kZenP-000rzp-GY; Mon, 02 Nov 2020 11:43:11 -0700 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1kZenO-000226-GZ; Mon, 02 Nov 2020 11:43:11 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Jens Axboe Cc: Al Viro , Qian Cai , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201030152407.43598-1-cai@redhat.com> <20201030184255.GP3576660@ZenIV.linux.org.uk> <20201030184918.GQ3576660@ZenIV.linux.org.uk> <20201030222213.GR3576660@ZenIV.linux.org.uk> Date: Mon, 02 Nov 2020 12:43:09 -0600 In-Reply-To: (Jens Axboe's message of "Fri, 30 Oct 2020 17:21:39 -0600") Message-ID: <87y2jja9c2.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1kZenO-000226-GZ;;;mid=<87y2jja9c2.fsf@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX181lbXNi0J03l5MfI6GEDv6cuRy7EmX6ps= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH -next] fs: Fix memory leaks in do_renameat2() error paths X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens Axboe writes: > On 10/30/20 4:22 PM, Al Viro wrote: >> On Fri, Oct 30, 2020 at 02:33:11PM -0600, Jens Axboe wrote: >>> On 10/30/20 12:49 PM, Al Viro wrote: >>>> On Fri, Oct 30, 2020 at 12:46:26PM -0600, Jens Axboe wrote: >>>> >>>>> See other reply, it's being posted soon, just haven't gotten there yet >>>>> and it wasn't ready. >>>>> >>>>> It's a prep patch so we can call do_renameat2 and pass in a filename >>>>> instead. The intent is not to have any functional changes in that prep >>>>> patch. But once we can pass in filenames instead of user pointers, it's >>>>> usable from io_uring. >>>> >>>> You do realize that pathname resolution is *NOT* offloadable to helper >>>> threads, I hope... >>> >>> How so? If we have all the necessary context assigned, what's preventing >>> it from working? >> >> Semantics of /proc/self/..., for starters (and things like /proc/mounts, etc. >> *do* pass through that, /dev/stdin included) > > Don't we just need ->thread_pid for that to work? Are you proposing changing the pid of a kernel thread to get that? Currently it is an invariant in the kernel that pids do not change. Eric