Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp476652ybf; Sat, 29 Feb 2020 07:57:25 -0800 (PST) X-Google-Smtp-Source: ADFU+vtQeU0FFDdUcYl2YB8tWYokeC99q3pcJgjIPwypflzQn8av2ICBzO4GZtKnmqLWYQsv6WL9 X-Received: by 2002:a9d:73d1:: with SMTP id m17mr464172otk.19.1582991845757; Sat, 29 Feb 2020 07:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582991845; cv=none; d=google.com; s=arc-20160816; b=aeGvxvLFj+ApLDuZF+mLlDCMzj2gR+vvKKT+IQUdyNO5w9q//jkKPXKDr+PCdHpvM6 sSbjK1pKUqSFvqCy8i34NwmF30ZiQ/lTHohjlMoI3RKWvJSdWDyfzX5Rhpo4irqR7qfo f72Tj9XKkNSgXfUKT/0w/1BSH2zJFVj/E700zw2xoKfF3qEO7vfw7ZpEbKvQJ6nAPpvt GKpZ4sfav5lF6Vo+lrlZlAwTR93BbH1446YpkhV70fDcoGAeuChamrxVgqPfWMGBJ/hm xDhGGYm4Rb7dmDFLmgT2FV6hRwy7UPozc3QFfqakgC/6383a//wjIaclI6rxL5NZJW3z nr3w== 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=IDFPtH+HsWRKFvhXPcZC++DmW2PKcYAzXFAL2DXL0yI=; b=Gh/WU6vMKhkNzUih153t9TPE+xyFXX7mhDkHku97gsh6QS110bon1j3qgvJiSfF08t LBDZ6LRoGB9QmWk5K7u3x2EA5R6UeCNQRYWLlLgHfB7ME8rpbMevEpEzQTOg/S38WGTR JLhqlK7sfnqb+8GvZIn3ScV5BU5tWlSlH8nXKHcMR+C0wR30pt8hnNvsz3+l4QBpQCti E9aY+U4cvdxsFfAJ513ac3/kpr4jSztJ7xvOFlRIa81rU1iuXTziZt/Z5v5KTtgtlD7f 5nSWTbm08Yo+LbBDDcv6YyPrta8jRyvtCrv5KPIfW2kJnAAIjKoPV3jCl1hwiglMsWsj 0HOQ== 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 i25si3602669oii.259.2020.02.29.07.57.11; Sat, 29 Feb 2020 07:57: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 S1727181AbgB2Py0 (ORCPT + 99 others); Sat, 29 Feb 2020 10:54:26 -0500 Received: from mout-p-103.mailbox.org ([80.241.56.161]:9834 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbgB2PyZ (ORCPT ); Sat, 29 Feb 2020 10:54:25 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 48V9vL6ZhszKmVM; Sat, 29 Feb 2020 16:54:22 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id pgmRCAv08B0a; Sat, 29 Feb 2020 16:54:19 +0100 (CET) Date: Sun, 1 Mar 2020 02:54:11 +1100 From: Aleksa Sarai To: Christian Brauner Cc: David Howells , linux-api@vger.kernel.org, viro@zeniv.linux.org.uk, metze@samba.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, fweimer@redhat.com Subject: Re: Have RESOLVE_* flags superseded AT_* flags for new syscalls? Message-ID: <20200229155411.3xn7szvqso4uxwuy@yavin> References: <96563.1582901612@warthog.procyon.org.uk> <20200228152427.rv3crd7akwdhta2r@wittgenstein> <20200229152656.gwu7wbqd32liwjye@yavin> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="puaedjuyrav2qu65" Content-Disposition: inline In-Reply-To: <20200229152656.gwu7wbqd32liwjye@yavin> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --puaedjuyrav2qu65 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-03-01, Aleksa Sarai wrote: > On 2020-02-28, Christian Brauner wrote: > > So we either end up adding new AT_* flags mirroring the new RESOLVE_* > > flags or we end up adding new RESOLVE_* flags mirroring parts of AT_* > > flags. And if that's a possibility I vote for RESOLVE_* flags going > > forward. The have better naming too imho. >=20 > I can see the argument for merging AT_ flags into RESOLVE_ flags (fewer > flag arguments for syscalls is usually a good thing) ... but I don't > really like it. There are a couple of problems right off the bat: >=20 > * The prefix RESOLVE_ implies that the flag is specifically about path > resolution. While you could argue that AT_EMPTY_PATH is at least > *related* to path resolution, flags like AT_REMOVEDIR and > AT_RECURSIVE aren't. >=20 > * That point touches on something I see as a more fundamental problem > in the AT_ flags -- they were intended to be generic flags for all of > the ...at(2) syscalls. But then AT_ grew things like AT_STATX_ and > AT_REMOVEDIR (both of which are necessary features to have for their > respective syscalls, but now those flag bits are dead for other > syscalls -- not to mention the whole AT_SYMLINK_{NO,}FOLLOW thing). >=20 > * While the above might be seen as minor quibbles, the really big > issue is that even the flags which are "similar" (AT_SYMLINK_NOFOLLOW > and RESOLVE_NO_SYMLINKS) have different semantics (by design -- in my > view, AT_SYMLINK_{NO,}FOLLOW / O_NOFOLLOW / lstat(2) has always had > the wrong semantics if the intention was to be a way to safely avoid > resolving symlinks). >=20 > But maybe I'm just overthinking what a merge of AT_ and RESOLVE_ would > look like -- would it on. Eugh, dropped the rest of that sentence: =2E.. would it only be the few AT_ flags which are strictly related to path resolution (such as AT_EMPTY_PATH)? If so wouldn't that just mean we end up with two flag arguments for new syscalls? --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --puaedjuyrav2qu65 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXlqJIAAKCRCdlLljIbnQ EsRRAPwMoYtBmLhTjNkZ7AC3d/2Ja7NkrsotEk6myIJwokoCygEAnedimnFrzQ37 VxkzpMA8mSpBBJP7I7YmJa2XRkDeTAk= =evjZ -----END PGP SIGNATURE----- --puaedjuyrav2qu65--