Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1952208ybl; Thu, 19 Dec 2019 05:46:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyVE0Qti/FWDE/kaUIkAv4Z4OD7RnN4B4fVn5qNm2XdTkO9KR4fqn2QeCrTenGOPxEOzqyx X-Received: by 2002:a9d:c02:: with SMTP id 2mr9148514otr.183.1576763201647; Thu, 19 Dec 2019 05:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576763201; cv=none; d=google.com; s=arc-20160816; b=TU2Iqyr0Z2/U+acWPy8EA+rw/RTCYZcogGp/3YGhVDTCY675YUZpfjkahIf6vNibsb kRSn3SFG9xsh3HrzAfHWGqcVkfrGkE4AjFymm+pcs/AXLBqRdp7UNpv9vdcfWWkrlVqT iiNEgjfKgUlJZ8Tpazrkl0bYNpB3tJCOE19W/ox+NAgX7j9WZPH66H5fNg1R5jvRbqih Age3XE2OeQxwQLdfmy8kfnbCrq3S+cXwD/QWq8oAUzw590hlZvrcH/nCiatLIkfkMpNz TuFp0NzREes7aW0CgupIYe9ag2dRUhgif4YXw7NJCgQI2HaNbd0Rh7xrOgLVIQA6HFDZ Sf/A== 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=nsuUhFNsZX6a9LgDvl9j6RXLcaEySxH10Vb7eM8opqk=; b=Fu2CWs3Wt7jrFK2CRtSstlK/um3j2Qvyb99ZxbXtYDEektz4hab7/UrQG8TheIadKM hLYCs/y7GZHyIFQ1ooCIy76d/V0WdP5sQNhlJXwI6AhI1qqkqTS2EkfAoY29Y2pZyo9X nEJCPzFJAB4T8JV/JSTL8RQjQSi7ouJNmQVsmKXl99oQLL4lONQs0szab2lUrv0wtQD6 K6wzIUXZmaQE62+45/uWDl2G/XWtwGnJaeSluW5dwSnlcyc4o9MWQDtHLTwS5/rAMwp5 um+yqTrBP/hy0ADO3pXO8/z7IeL1GkK9d1vf4c2i1/WvmlNEdgcQwT04bPvHsZoTyfP8 ad8g== 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 v21si115325oiv.197.2019.12.19.05.46.28; Thu, 19 Dec 2019 05:46:41 -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 S1726778AbfLSNpr (ORCPT + 99 others); Thu, 19 Dec 2019 08:45:47 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:34272 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfLSNpr (ORCPT ); Thu, 19 Dec 2019 08:45:47 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 47dtS81SC9zQlCH; Thu, 19 Dec 2019 14:45:44 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id e7q2fm3sHcgL; Thu, 19 Dec 2019 14:45:38 +0100 (CET) Date: Fri, 20 Dec 2019 00:45:25 +1100 From: Aleksa Sarai To: Florian Weimer Cc: Alexander Viro , Jeff Layton , "J. Bruce Fields" , Shuah Khan , David Laight , Christian Brauner , dev@opencontainers.org, containers@lists.linux-foundation.org, libc-alpha@sourceware.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 1/2] uapi: split openat2(2) definitions from fcntl.h Message-ID: <20191219134525.mgzmjbsp4wo5b2bw@yavin.dot.cyphar.com> References: <20191219105533.12508-1-cyphar@cyphar.com> <20191219105533.12508-2-cyphar@cyphar.com> <87a77oy3oe.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qjttenzbgeo3oe2h" Content-Disposition: inline In-Reply-To: <87a77oy3oe.fsf@oldenburg2.str.redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qjttenzbgeo3oe2h Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-12-19, Florian Weimer wrote: > * Aleksa Sarai: >=20 > > diff --git a/include/uapi/linux/openat2.h b/include/uapi/linux/openat2.h > > new file mode 100644 > > index 000000000000..19ef775e8e5e > > --- /dev/null > > +++ b/include/uapi/linux/openat2.h > > @@ -0,0 +1,41 @@ > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > > +#ifndef _UAPI_LINUX_OPENAT2_H > > +#define _UAPI_LINUX_OPENAT2_H >=20 > I think you should include the relevant header for __align_u64 > etc. here. Right -- no idea why I forgot to include them. > [=E2=80=A6] > > + * Arguments for how openat2(2) should open the target path. If @resol= ve is > > + * zero, then openat2(2) operates very similarly to openat(2). > > + * > > + * However, unlike openat(2), unknown bits in @flags result in -EINVAL= rather > > + * than being silently ignored. @mode must be zero unless one of {O_CR= EAT, > > + * O_TMPFILE} are set. > > + * > > + * @flags: O_* flags. > > + * @mode: O_CREAT/O_TMPFILE file mode. > > + * @resolve: RESOLVE_* flags. > > + */ > > +struct open_how { > > + __aligned_u64 flags; > > + __u16 mode; > > + __u16 __padding[3]; /* must be zeroed */ > > + __aligned_u64 resolve; > > +}; > > + > > +#define OPEN_HOW_SIZE_VER0 24 /* sizeof first published struct */ > > +#define OPEN_HOW_SIZE_LATEST OPEN_HOW_SIZE_VER0 >=20 > Are these really useful for the UAPI header? Is there a situation where > OPEN_HOW_SIZE_LATEST would be different from sizeof (struct open_how)? >=20 > The header is not compatible with the assembler anyway, so the numeric > constant does not seem useful. OPEN_HOW_SIZE_VER0 could conceivably be useful (in the future we may do size-based checks) but maybe we can just expose it if someone actually ends up needing it. I will move them to the in-kernel header (we use them for BUILD_BUG_ONs to make sure that the sizes are correct). --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --qjttenzbgeo3oe2h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXft+8gAKCRCdlLljIbnQ Ekc2AQClb2qbHajijnt60Pk4O2cvxed5KckYXs6dwwg58HB1oQEAjQvmRi/60gTm 4X83tviudRi/oFgl8Az74op013vZHAY= =5/Pu -----END PGP SIGNATURE----- --qjttenzbgeo3oe2h--