From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59865C3F2D1 for ; Mon, 2 Mar 2020 14:35:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A56D214DB for ; Mon, 2 Mar 2020 14:35:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbgCBOfv (ORCPT ); Mon, 2 Mar 2020 09:35:51 -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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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