Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp146706ybh; Mon, 9 Mar 2020 18:14:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvWIqjHNhGo1w7Al7FseoQv51sZGD2Z4ZRzgU6kSTi9uVccgReHlz3sbMsTK5a/TsPQstVT X-Received: by 2002:aca:fcd8:: with SMTP id a207mr1712oii.56.1583802894683; Mon, 09 Mar 2020 18:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583802894; cv=none; d=google.com; s=arc-20160816; b=OrURC58Tm2ECX2vMBcC9HRtDKwCQ4kTT9f+5lRW7gwEWFXqlRuhcZ2ifaZvN6UuFru 7gQFnbQGnU7nYu+ACs1gnhPyy+9OWnzQfJQahPco52hvDUVk4nmiGZMDdiEHPpfutqQD YjZqTf04v38RYWBxw5TwJO8mB5ObyFi5+JzunqF+0L15dmLeRB/Ns935A/YH+m6mFLoi 8oHFlp9mEAnyqEgiS5kC/7pPTY7Vi3E5u6oBV1tSzfLI284enqlyVnIIFUoMoBa8utwS 5FAVyGaYu9Is7gr8ZZ8HkO6s+8YBh6gvMeD58XbZtJ7gSFIzLIoyzhqjloN+Ycquf4Ds vc3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nCY2IMHfivjHreZOPal2MmhDh1XB1BJ/jVXGh7sofMY=; b=KpTbui/axDHkNSWVIhy/tJ5s/0XCqhi98aTZ6dlJ9eWepAoNf3r0CgEJa5VOiFBPq/ HoUxWwBvPBOOuc7grWCFrAUT9Wbtpfri84zycIhAUdif2BYP2oWnTNxZakegqBDW+ePd xv+ub+u0Mg+iKRvHrFa1ViQvf87zI70xFVfwSe0DrX78lolpNZ+hcwQs4U66kJLdOShK OQhbBCA5p78PKxE6fi4LV0DEyf98Q9d/Hww8U9Meb7bsuXKpR6dmlLh3yyZ/DW4wR+e4 sV77ocQmMM43xHPt61Mp3wWu7Kj/nwpP3ud3wGT2+FL0JY65X/L0LcrCWYMG2pXLN0gl VMJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dttz1Aai; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si4178295oiw.133.2020.03.09.18.14.43; Mon, 09 Mar 2020 18:14:54 -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=@linux-foundation.org header.s=google header.b=dttz1Aai; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbgCJBOV (ORCPT + 99 others); Mon, 9 Mar 2020 21:14:21 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35722 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgCJBOU (ORCPT ); Mon, 9 Mar 2020 21:14:20 -0400 Received: by mail-lf1-f68.google.com with SMTP id g4so3114725lfh.2 for ; Mon, 09 Mar 2020 18:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nCY2IMHfivjHreZOPal2MmhDh1XB1BJ/jVXGh7sofMY=; b=dttz1Aai8q2mA5120RQHpU6FQZ0oWB6GoxZWjBIoKe7rJ6/0ECieO/iRN6XUsDDmpY P8ZM/s3EiQ2yKP5NbwrdbruCnctvDp6KQ/31+Dn7/6XLJ6IfHlJYcxNGPxHn1UbBU0iV LA0J4YsQpHP85wdc4zfWiUV0qC/skOAfeo6iw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nCY2IMHfivjHreZOPal2MmhDh1XB1BJ/jVXGh7sofMY=; b=TOt0+IlF2m7l9nygWuRaB1cXVxKYSP6vawOl66kRQ9mlqEGXY1NWXIpeq0jTpXwx1S EdhVYe0eKhRA7CLmRJiOaudPoaYhlUa5ZBeRTWhZh5zGv9XjRaSzEB028ULBrPY0VPgn AzmmYX9BO56G4d5dwF2E049N25K/xZ2fVNZYa1nFCCviFwz8+rzog7NAE8Pi8DwehwHQ 7GPdX5+y5aMz2Iy5539PZ5JiQn5wMBavo052rrSmQ7wRIoNxIThWfe1kpZL6UNt5UDT6 nrfTvs3U/LQ4IlGn2CnVTT6s8bbg39IXQObRySmNnvw/5fdVgPjrZ+teFy4iQd2dmzSq R+sw== X-Gm-Message-State: ANhLgQ08TfXXrFUS3e4XuIGySY9G9hgOw2PRvX/EXAIxVMYuWFuPIge1 vf7qfJ8wl/vMtumB/PssDQTbH5+0HO8= X-Received: by 2002:a05:6512:3044:: with SMTP id b4mr11228050lfb.10.1583802858152; Mon, 09 Mar 2020 18:14:18 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id d9sm22650990lfm.16.2020.03.09.18.14.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 18:14:17 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id j11so9466660lfg.4 for ; Mon, 09 Mar 2020 18:14:16 -0700 (PDT) X-Received: by 2002:a19:520a:: with SMTP id m10mr11117505lfb.30.1583802856199; Mon, 09 Mar 2020 18:14:16 -0700 (PDT) MIME-Version: 1.0 References: <158376244589.344135.12925590041630631412.stgit@warthog.procyon.org.uk> <158376245699.344135.7522994074747336376.stgit@warthog.procyon.org.uk> <20200310005549.adrn3yf4mbljc5f6@yavin> In-Reply-To: <20200310005549.adrn3yf4mbljc5f6@yavin> From: Linus Torvalds Date: Mon, 9 Mar 2020 18:14:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/14] VFS: Add additional RESOLVE_* flags [ver #18] To: Aleksa Sarai Cc: David Howells , Al Viro , Stefan Metzmacher , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 9, 2020 at 5:56 PM Aleksa Sarai wrote: > > On 2020-03-09, David Howells wrote: > > This is necessary for fsinfo() to use RESOLVE_* flags instead of AT_* flags > > if the latter are to be considered deprecated for new system calls. > > > > Also make openat2() handle RESOLVE_NO_TRAILING_SYMLINKS. No, please let's not do this. We have O_NOFOLLOW, and we can't get rid of it. So adding RESOLVE_NO_TRAILING_SYMLINKS isn't a cleanup. It's just extra complexity for absolutely zero gain. > After thinking about what Christian said some more, I reckon we > shouldn't support both O_NOFOLLOW and RESOLVE_NO_TRAILING_SYMLINKS. But > that means we'll need to cherry-pick this patch and get it into mainline > before v5.6. No. It simply means that we shouldn't have RESOLVE_NO_TRAILING_SYMLINKS at all. Adding that flag is a mistake. It causes problems like this, where subtlenly people say "what if both flags are set". Just don't do it. There's no way in hell we can ever get rid of O_NOFOLLOW anyway, since people will continue to use plain open() and openat(). So adding RESOLVE_NO_TRAILING_SYMLINKS is entirely redundant. Don't deprecate the old flags that are going to always stay around, don't add stupid new flags that add no value. It's that easy. Linus