Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2357520ybf; Mon, 2 Mar 2020 07:06:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxcGpYvmQVcHKQsFF+BpWA84gPPWuCON+eOfczSy+eSrbf5GfUrxsLyMZveQ4KK8mfpZCOZ X-Received: by 2002:aca:44f:: with SMTP id 76mr11127943oie.23.1583161585411; Mon, 02 Mar 2020 07:06:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583161585; cv=none; d=google.com; s=arc-20160816; b=H+XqhnwmPypO1zMiCVI+RJPItL1/9ym+NAUrFu9dPAJKD2sfD3OuR9aQadjubvXa/1 J6lnk/0sn2freN8TE87j/mY6x/wQ1GqaLl8MMVDsUNYHiKR7xwRG0jPThkgUcYtfz5qe bOi38o0k24yykcUM5trLafhtiGRQF1FaLptLuawz3Nvy/OPiTCgnv3Kvz9shfScohN/Y ansHyCZmpWraWeuPbjtvvjcCy7f+koge1MX90sHnwB4RT+9Z3LvqAMMfcpSAgWG2rDwj DENF3xhjjDo6bYjWu/0ci+M58W/jAimGJvbG8T7P4E5ROkExZdsVtsIqdLQm37VXOg+d 3IUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zHqFJSRVBZVnvI69j36ig2gZ9bdbeGjhbjF+B0RDXZg=; b=Ys/FE+L+F0eiC/oVAzl4aKifHhuvbbSAha+gze1iiU/CG+t2w2D/8kr3A+3E4MxCD9 qkyCc01Zgdi/Vk4Iun+vs5QLAxFyFscdFNjEnvWxKhy3DWfEg7wWsSLS/VnYH1irB11n Vhzaz6i6YZN99c+B8LexwZexAZG77f3tE0xVeNHRO/EkSvW9p2FgAPyuSj9PiuFpNm/a QvNdikIqD009IRM8OUhgVPqq8sB6Ff/7tEXwi0icFo8nigUd4h5Eje0dRoUY1QghPG8O ZhAlZES/uDdQzIaNmmy7ibJ9PJvLo3IdM+Yq0Ejgp+y87xsiMhVGCj691CeIzy2fECa2 UEFg== ARC-Authentication-Results: i=1; mx.google.com; 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 n1si6480433oic.225.2020.03.02.07.06.09; Mon, 02 Mar 2020 07:06:25 -0800 (PST) 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; 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 S1727429AbgCBPFb (ORCPT + 99 others); Mon, 2 Mar 2020 10:05:31 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:33812 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726997AbgCBPFa (ORCPT ); Mon, 2 Mar 2020 10:05:30 -0500 Received: from ip5f5bf7ec.dynamic.kabel-deutschland.de ([95.91.247.236] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j8mdM-0000jw-RJ; Mon, 02 Mar 2020 15:05:28 +0000 Date: Mon, 2 Mar 2020 16:05:28 +0100 From: Christian Brauner To: David Howells Cc: Florian Weimer , linux-api@vger.kernel.org, viro@zeniv.linux.org.uk, metze@samba.org, torvalds@linux-foundation.org, cyphar@cyphar.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Have RESOLVE_* flags superseded AT_* flags for new syscalls? Message-ID: <20200302150528.okjdx2mkluicje4w@wittgenstein> References: <20200302143546.srzk3rnh4o6s76a7@wittgenstein> <20200302115239.pcxvej3szmricxzu@wittgenstein> <96563.1582901612@warthog.procyon.org.uk> <20200228152427.rv3crd7akwdhta2r@wittgenstein> <87h7z7ngd4.fsf@oldenburg2.str.redhat.com> <848282.1583159228@warthog.procyon.org.uk> <888183.1583160603@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <888183.1583160603@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2020 at 02:50:03PM +0000, David Howells wrote: > Christian Brauner wrote: > > > I think we settled this and can agree on RESOLVE_NO_SYMLINKS being the > > right thing to do, i.e. not resolving symlinks will stay opt-in. > > Or is your worry even with the current semantics of openat2()? I don't > > see the issue since O_NOFOLLOW still works with openat2(). > > Say, for example, my home dir is on a network volume somewhere and /home has a > symlink pointing to it. RESOLVE_NO_SYMLINKS cannot be used to access a file > inside my homedir if the pathwalk would go through /home/dhowells - this would > affect fsinfo() - so RESOLVE_NO_SYMLINKS is not a substitute for > AT_SYMLINK_NOFOLLOW (O_NOFOLLOW would not come into it). I think we didn't really have this issue/face that question because openat() never supported AT_SYMLINK_{NO}FOLLOW. Whereas e.g. fsinfo() does. So in such cases we are back to: either allow both AT_* and RESOLVE_* flags (imho not the best option) or add (a) new RESOLVE_* variant(s). It seems we leaned toward the latter so far... Christian