Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp391296ybh; Tue, 10 Mar 2020 00:26:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt0B8ZIN4me24fMAIYyrUeJvpzwOU3gQ7wRCvmmP3IuigxlUxoCdWMNAY9CpVfrx7ctFEaa X-Received: by 2002:a05:6830:11d8:: with SMTP id v24mr16142973otq.288.1583825179231; Tue, 10 Mar 2020 00:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583825179; cv=none; d=google.com; s=arc-20160816; b=H68VJBnQdfca6p+h8ow3istOzzH+s15XCylqCsJgE1qEguBmz8OAAIU+eDEojy8XWK 5av9aPDnzweqMrA5a7AcaqEsNLdgRAehV777oBI0g6vRV0XQDLPKJwYKL6/KOIyMF+KL iO1X95kXD+dnZiVPyCtRbin2spS8IFAU/WO4Bvy7tpHUdkrXdOqrsfgo/i74HeA4qnNG kLqN72DfbcJokHmA6kV/brn4AJwZvSrl1jKvVCr7SWqtBSI4VIZsSOuLfudubi5aX05l y6aZHKorMsLdVqd3GSS4m5akg9T0wI4x2v25Woxb4Prwdq+CG9bQo7+Xc6P5wc3yphws JHtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=d8UiZddWXkafFLvP5bz3JJYwq005hZDC3aZQhOodzY0=; b=rSSlXfygJSS/7v5TY7PPsjmFHvrzYKUoxtRVxEIdFdmCARhKHBme/uyfpd2quZnzQt oaL53KTIvzinHwLp17KWChoXhvKKTZ0hx8C5Ufq2c0qREs1cJelLtadR35cmN5n24q9+ YXF45w+4eZ7AYIOmNO5UwUrE8jbeiLfJmHztPspZ9lNGgmPTbYD/1LD6jDAa5kZDzbRN hrdcxdZf3KxyzBaPYCJ2vxiZ4GPKXWSK+GLyWEVvpL1qqQVDqTZoSqTv2eoCx8o2YAva BRm/IfXyevp2x4CIXjMarb0mifhrzzDQEW9fjuIGvwixPYC+9wKtaft2uLd/IvR5PeIL suJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HrBIVzOn; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si6638866otb.252.2020.03.10.00.25.56; Tue, 10 Mar 2020 00:26:19 -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=@redhat.com header.s=mimecast20190719 header.b=HrBIVzOn; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgCJHZQ (ORCPT + 99 others); Tue, 10 Mar 2020 03:25:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48537 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbgCJHZP (ORCPT ); Tue, 10 Mar 2020 03:25:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583825115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d8UiZddWXkafFLvP5bz3JJYwq005hZDC3aZQhOodzY0=; b=HrBIVzOnjYtaQBuexLxR8betU32bcGxKEKCWWRz55Q3NfkDqVkx0Bb1gobXQdoSAcqvNIa M9WwF4lk5EeCtDQSKtfori0+Pk9vEycrEHSt0rxYiGHb6hYwkORCG28NmwwEsRQo7eAXKL zCj/j11jAJd2f1XH2WxA+N1AW1HOshk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-tBUfClqxMNKyh-Do3iS4ng-1; Tue, 10 Mar 2020 03:25:11 -0400 X-MC-Unique: tBUfClqxMNKyh-Do3iS4ng-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68D09107ACC9; Tue, 10 Mar 2020 07:25:09 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-182.rdu2.redhat.com [10.10.120.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AB708F35C; Tue, 10 Mar 2020 07:25:06 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <158376244589.344135.12925590041630631412.stgit@warthog.procyon.org.uk> <158376245699.344135.7522994074747336376.stgit@warthog.procyon.org.uk> <20200310005549.adrn3yf4mbljc5f6@yavin> To: Linus Torvalds Cc: dhowells@redhat.com, Aleksa Sarai , 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 Subject: Re: [PATCH 01/14] VFS: Add additional RESOLVE_* flags [ver #18] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <580351.1583825105.1@warthog.procyon.org.uk> Date: Tue, 10 Mar 2020 07:25:05 +0000 Message-ID: <580352.1583825105@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > > > 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. Okay. So what's the equivalent of AT_SYMLINK_NOFOLLOW in RESOLVE_* flag terms? RESOLVE_NO_SYMLINKS is not equivalent, though O_NOFOLLOW is. The reason I ask is that RESOLVE_* flags can't be easily extended to non-open syscalls that don't take O_* flags without it. Would you prefer that new non-open syscalls continue to take AT_* and ignore RESOLVE_* flags? That would be fine by me. David