Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2332198ybf; Mon, 2 Mar 2020 06:36:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzeQQf7sq43Ko53tLymh/rGYebq1dx5bFNy8sFYtC8H+MpeY+mlS0gTaXFvmeV+iRrR0LMC X-Received: by 2002:a9d:3f4b:: with SMTP id m69mr12348495otc.146.1583159786568; Mon, 02 Mar 2020 06:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583159786; cv=none; d=google.com; s=arc-20160816; b=s/F/7VVRdbR0WLwKXYXjCcRNHCwJrE3i0SCZ55JOHTlepHQAAy9n9dOeh4+ljWktnr jYmtyEshdxx/Wc9pHdVKxbvWa21HqrgHjKv1Kg+yxEWFNx1n9fVdp/kEqynFr/+QztzW 3WD5tuXJmzvaw44Y7/d6O2nbqOnIWXqUY19bhPro+vlqjCIeBNE081uKwRyDoovnuvYQ +UOcqB2tV+HALpUmjUZiJ5UcQhGusNN/H6f8I5RIS4UjL07M4C5LPDDIGNuW+b721hgc 3B9I2BCGCXHpUp9RR6FQNOOEi8yTzgGM7C/z6OT5rqQeU+jVJXHlqXiZD3KqklxOlk0M xPvQ== 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=/pdD4AML0ujcC1vKIMbP7U4qFyKLEakV/FCMg7WKohY=; b=O4N6mmYtJvg6/i0J5pa4wxiZsH6+8P3ElQFLH9fKl/CMvLM7OThowFT0IPFnykZqG2 Pf/LPf1OI4T+/fVGDvKnLRglovNiX/qYSJiEhOyQLGIulv70n92OSmN3oVw5hG0XjyBF btGPweXFQZCiNzVkIxq6JGYRapLT0fm6Nkklhi4GI1lX1mmh+rz0pJMMDbMqz/zChuMs Fu5st7j4wNZPdn/qvrNYLwQ//FFMOi97PbhsTKv6GvGnMRC0b8LYOOzLrVDnueh5utZA gtbc9vIOnrXzXPfP+sbPTsnVy44EDLF9iBPoKAIiaqmwZLbT8DLw+A7yfSpFQmCk9oe7 qnjA== 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 p26si6204216oto.240.2020.03.02.06.36.14; Mon, 02 Mar 2020 06:36:26 -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 S1727309AbgCBOfw (ORCPT + 99 others); Mon, 2 Mar 2020 09:35:52 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:32853 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727104AbgCBOfv (ORCPT ); Mon, 2 Mar 2020 09:35:51 -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 1j8mAd-00073L-DL; Mon, 02 Mar 2020 14:35:47 +0000 Date: Mon, 2 Mar 2020 15:35:46 +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: <20200302143546.srzk3rnh4o6s76a7@wittgenstein> References: <20200302115239.pcxvej3szmricxzu@wittgenstein> <96563.1582901612@warthog.procyon.org.uk> <20200228152427.rv3crd7akwdhta2r@wittgenstein> <87h7z7ngd4.fsf@oldenburg2.str.redhat.com> <848282.1583159228@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <848282.1583159228@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:27:08PM +0000, David Howells wrote: > Christian Brauner wrote: > > > > AT_SYMLINK_NOFOLLOW only applies to the last pathname component anyway, > > > so it's relatively little protection. > > > > So this is partially why I think it's at least worth considerings: the > > new RESOLVE_NO_SYMLINKS flag does block all symlink resolution, not just > > for the last component in contrast to AT_SYMLINK_NOFOLLOW. This is > > 278121417a72d87fb29dd8c48801f80821e8f75a > > That sounds like a potentially significant UAPI change. What will that break? 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(). Christian