Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2026179ybh; Fri, 13 Mar 2020 11:36:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtu/UEnPDHRBsZRrEoB2FrfkqPHGgYtkE+MtsFI5mGt5ssnZBV5CeKar9s+F5ztaFGrcuZl X-Received: by 2002:aca:4106:: with SMTP id o6mr8223775oia.173.1584124569193; Fri, 13 Mar 2020 11:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584124569; cv=none; d=google.com; s=arc-20160816; b=AVAYyM8/3n0Q3hjSPD4tzQS8QFLcdNBzatSjqaWLe0+aATmEIS2heogAiOpSFcVLKF O4nACwdOrop+gKDuL/XLnhXMCHUkIsFlebcqzqXnz3FtaNo5JNCZestzjUG6YwNGXPoS +7VfSlBvLf8VQhMXpFKhgUX5hOjIQBORQjRCRKPqIAQIq7MatPHk8Xb3dBGfSzVm9OzI RqelUdYve/SPMEQgvQQZ2smBDFaQE9sR4PIDNy+faKlI0sXh2KiNrf/vtMmxTKhsHVWV +PBXKnCXMIXuJ8UgoAdevGb3ut6cA/lpWVtTE5ZVWl8QIQ/NeGf39l+Ok0mBPLi3yb94 4UpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=WW96sv0//Vhg79QaiYlSOEgUUQBStmetDMf4TONIc6M=; b=0lUexYXecmhS5YTbjOE0rQXTZLf/McE2yKiWhFg7jNyv81S8nMadPXyy5eiBHjZm7l iSKemWa7XyvhxyLkBmW/241VK3z8Q7VCY/yPPP70uYbV+QQePJzNHxiCcUOwceahqCWn dMebtuLVt43phJehjM8zuMvA1SlK9YODEh0k3BDlbORAwbrNnJW9wdZto3dWmzvLkJHc 9rRf4zbqW2Xs3/IYTBUY4NCpkSv53EH0d6LLfTYaagD5dQY8eA5+4CAPT21dy3W/WhfL ywPWD2Rw+hsP0WLtpQH2dBf0RGYPRNQq6/igiiLbv3kVfIvIGA5jiCFS5M/tKDvMvjGk 9kPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=kIlHxupk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n62si5123251oig.196.2020.03.13.11.35.56; Fri, 13 Mar 2020 11:36:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=kIlHxupk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727539AbgCMSfR (ORCPT + 99 others); Fri, 13 Mar 2020 14:35:17 -0400 Received: from hr2.samba.org ([144.76.82.148]:59188 "EHLO hr2.samba.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbgCMSfO (ORCPT ); Fri, 13 Mar 2020 14:35:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-ID:Cc:To:From:Date; bh=WW96sv0//Vhg79QaiYlSOEgUUQBStmetDMf4TONIc6M=; b=kIlHxupkrQOi9TzlSzfbE4/bDL uXCSnq22mxKKsPp4wsY2SjwgRHrGGUjd5PkshA6/Ij7StaJi+8cCOXa+2uy4ujPSwXlu4A9n3fflf XkyYa3DkycxsDmAzUHRsrhw/lk4UQEuZG4SUx77yN3+V1HapwvdE+wEtw1OqGFv2+0PFrzzEuTaf/ UILafbWfwJ6SVlMnnuB2/AhboOh8yg4LEOd40ctbA5s+rP3kSe79DPDaQA93TxktwMI4ekakTqtcG 6UsWH3CbrSZH8DYC3XwCombBEVbF1GH+zILxk/YiipBOVfVlGS6LpdTFyGanweoKoy2YO/1N0o8Q9 RhjdcWajNX5yyJ0vVHYm3FrfIeucAWOay4dqo9PauHbqEoCHY1eujrUgDXPg4HMaIlFtRVnOC6Q4E 1KLWYGQz1OmRlsyhTOvvjXdzI88D+i+MKn2RMug3oipCgs+yrtta2s96ODrrQVXqGTHTk2wQZX736 ghOoK4n2imWOy9qW7TdbFV1f; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1jCp9J-00029j-FH; Fri, 13 Mar 2020 18:35:09 +0000 Date: Fri, 13 Mar 2020 11:35:03 -0700 From: Jeremy Allison To: Al Viro Cc: Aleksa Sarai , Stefan Metzmacher , Linus Torvalds , David Howells , Ian Kent , Miklos Szeredi , Christian Brauner , Jann Horn , "Darrick J. Wong" , Karel Zak , jlayton@redhat.com, Linux API , linux-fsdevel , LSM List , Linux Kernel Mailing List , Ralph =?iso-8859-1?Q?B=F6hme?= , Volker Lendecke Subject: Re: [PATCH 01/14] VFS: Add additional RESOLVE_* flags [ver #18] Message-ID: <20200313183503.GA29092@jeremy-acer> Reply-To: Jeremy Allison References: <158376245699.344135.7522994074747336376.stgit@warthog.procyon.org.uk> <20200310005549.adrn3yf4mbljc5f6@yavin> <580352.1583825105@warthog.procyon.org.uk> <3d209e29-e73d-23a6-5c6f-0267b1e669b6@samba.org> <8d24e9f6-8e90-96bb-6e98-035127af0327@samba.org> <20200313095901.tdv4vl7envypgqfz@yavin> <20200313182844.GO23230@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200313182844.GO23230@ZenIV.linux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2020 at 06:28:44PM +0000, Al Viro wrote: > On Fri, Mar 13, 2020 at 08:59:01PM +1100, Aleksa Sarai wrote: > > On 2020-03-12, Stefan Metzmacher wrote: > > > Am 12.03.20 um 17:24 schrieb Linus Torvalds: > > > > But yes, if we have a major package like samba use it, then by all > > > > means let's add linkat2(). How many things are we talking about? We > > > > have a number of system calls that do *not* take flags, but do do > > > > pathname walking. I'm thinking things like "mkdirat()"?) > > > > > > I haven't looked them up in detail yet. > > > Jeremy can you provide a list? > > > > > > Do you think we could route some of them like mkdirat() and mknodat() > > > via openat2() instead of creating new syscalls? > > > > I have heard some folks asking for a way to create a directory and get a > > handle to it atomically -- so arguably this is something that could be > > inside openat2()'s feature set (O_MKDIR?). But I'm not sure how popular > > of an idea this is. > > For fuck sake, *NO*! > > We don't need any more multiplexors from hell. mkdir() and open() have > deeply different interpretation of pathnames (and anyone who asks for > e.g. traversals of dangling symlinks on mkdir() is insane). Don't try to > mix those; even O_TMPFILE had been a mistake. > > Folks, we'd paid very dearly for the atomic_open() merge. We are _still_ > paying for it - and keep finding bugs induced by the convoluted horrors > in that thing (see yesterday pull from vfs.git#fixes for the latest crop). > I hope to get into more or less sane shape (part - this cycle, with > followups in the next one), but the last thing we need is more complexity > in the area. Can we disentangle the laudable desire to keep kernel internals simple (which I completely agree with :-) from the desire to keep user-space interfaces simple ? Having some way of doing a mkdir() that returns an open fd on the new directory *is* a very useful thing for many applications, but I really don't care how the kernel implements it. We have so much Linux-specific code already that one more thing won't matter :-).