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 982F7C3F2CD for ; Mon, 2 Mar 2020 15:05:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CA8E217F4 for ; Mon, 2 Mar 2020 15:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727053AbgCBPFb (ORCPT ); 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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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