Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1794257ybl; Thu, 19 Dec 2019 03:09:27 -0800 (PST) X-Google-Smtp-Source: APXvYqybVZRhOWKN49weq3klQDAmhBBM5piSkdX6cx1GqYjUwHoxKFgEMa4CIHxqzhmosrC8jPWx X-Received: by 2002:a9d:58cb:: with SMTP id s11mr8494487oth.55.1576753767682; Thu, 19 Dec 2019 03:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576753767; cv=none; d=google.com; s=arc-20160816; b=QVsFK8RHgqZM0gIOa1SHngn9VwhCVBZQ65ZJEwLwJVgrBF0ayVbNOvwzpOihSZUdIc vOTlUa8koiV++wBth4ArvzJP1PgbqL4YEwA5DqO4x/Aq3x4ExxA/1RUFFteecW5PzpX8 aIR6hHlHJFtoFwi4Y3YVQd/qe/wYfSjHSw7/7Jw1cpbaFIWzUmdZle7afeAqqVOsMsvw hnbaPartq146TsPO6ED6RcmrQP/zYQZu0Fp3lrdFp8N9LQMmajDn1/XgDs5gQRMih6sx p5bVM/6VMs8GJS5jWSD1Mwe6e6jvxlew7STNBGKNX55X01m7XtmYksrtYc4RVxUiTBIW lNZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=IrcMrSSa7UYXErd11JQFtfowjebCnHuL7Bzv7dIUqcc=; b=FrJQVIGIZYQ0IU5hpkopL5GKeRMzMzm4MjBxNO8U0a+Vqnq/ee5uVhlx+FstH+qHma NI63o5V/vILBdZSku4Ef1Fxw63KYWZZ7bDfM33SB6V2o8wz64mZ3uhHmrop+0puhsuFn 7jjacYey9JOnL5XDP9X8ZUCLFZyb9gMFc4PqPfdPyURUAraShVSMLqTEr4J6HNQwVNNw wWxtZ1wi7bO5QZRqc803LuyiWyGAoDqLYoeIx2Z9bNNrmLz8EUgmUU+Dj5/CKBfCG0wV /QD0Lf16g9vDjydPvxOaNWOEc5pRVLjs+vZhGipW+YWlN0FFUi/ouVCuoVjB/Wvt1Glw Kj6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KkfDrhY3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si3186565otp.257.2019.12.19.03.09.12; Thu, 19 Dec 2019 03:09:27 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KkfDrhY3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbfLSLH0 (ORCPT + 99 others); Thu, 19 Dec 2019 06:07:26 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:20620 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726698AbfLSLHZ (ORCPT ); Thu, 19 Dec 2019 06:07:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576753644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IrcMrSSa7UYXErd11JQFtfowjebCnHuL7Bzv7dIUqcc=; b=KkfDrhY3kJJr6AjwPv7M3rWF7TGaGWfPbYbd1QQUYXOrUBnxqlzbKino2aPGWSZuFjrh0b VT2kHLBcgu9o74JvUCdV8B2Pb6Mb1WZsce0OSY1f5vXFVdTurselVmOkgKOL2+FDBajWzG xZ6BSvkvokFhRVI2Kq2RxvUfB8zmoiY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-123-uwfumKeEMN-nvu4639YtGA-1; Thu, 19 Dec 2019 06:07:21 -0500 X-MC-Unique: uwfumKeEMN-nvu4639YtGA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A2B771883522; Thu, 19 Dec 2019 11:07:18 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-227.str.redhat.com [10.33.192.227]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 705C960BC7; Thu, 19 Dec 2019 11:07:14 +0000 (UTC) From: Florian Weimer To: Aleksa Sarai 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 References: <20191219105533.12508-1-cyphar@cyphar.com> <20191219105533.12508-2-cyphar@cyphar.com> Date: Thu, 19 Dec 2019 12:07:13 +0100 In-Reply-To: <20191219105533.12508-2-cyphar@cyphar.com> (Aleksa Sarai's message of "Thu, 19 Dec 2019 21:55:29 +1100") Message-ID: <87a77oy3oe.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Aleksa Sarai: > 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 I think you should include the relevant header for __align_u64 etc. here. [=E2=80=A6] > + * Arguments for how openat2(2) should open the target path. If @resolve= is > + * zero, then openat2(2) operates very similarly to openat(2). > + * > + * However, unlike openat(2), unknown bits in @flags result in -EINVAL r= ather > + * than being silently ignored. @mode must be zero unless one of {O_CREA= T, > + * 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 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)? The header is not compatible with the assembler anyway, so the numeric constant does not seem useful. Thanks, Florian