Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4517382ybe; Mon, 9 Sep 2019 10:22:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUgSLkUqjqDH8EYCg95WPg4F/yimp02N+vRANbGCPT2tfpInHLUo1ejE63/5Ume1rYEOfz X-Received: by 2002:a17:906:4e13:: with SMTP id z19mr20037893eju.88.1568049739064; Mon, 09 Sep 2019 10:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568049739; cv=none; d=google.com; s=arc-20160816; b=d9WRPxeCvwdX8UvUM8T2cRnb0iOfzi1MhIrXzTDhMZ3dr7fp+W8gqNpsHeBLMF38cC 6W4+eQKkrdJ81/e8QLWoYKrkN5eyzrNvdphS2LGhzNE/sFjyMGHm7yS6h7oIdj6TCzVL /EJA52X+aPNHZpnIqfEFcEjTnvYJnnRb7mfWq2mKDeCkPkMPkMziNsUSMHQiqjj6azTh wc08eMgc+40CJR73kBP+hLEI/W1s8NKh3JYo7SifkqRV3DL3yJPRfZCfpWBNlJhwZlc0 9JTAD5DTA03lRgAzbWH6Y0YvW2rFpff4VA1NOV+Lvajs52Wf4bWYqam7sTtZlPnhLlL3 bkiA== 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=kGYVUzCjS24LkxvP7aDaEjXFf4dNf6kH+w0saQVZu0k=; b=qVtfJA0wZqdpw/ZKnWmsTCbL3v+oTzuTq23voRsFM1qXg19ZjJ4rgRpelBAqAQdZVc 7td8rBhHwcUky6RiSOwuZ00Fr8exeFCWw6GnbsyVd7U1fsIiKnHgeuuCP+OGlkJCt3el P+SmEqX+eXxrJI3NNRsXRwNBKIC+78zf69OfHbHSaj3UqTViVfLG98gUnwYEWWgbaMy4 nu1rTOLkBL5TizKOPgsqFtMZgcYGgPSDE33KBtkS6Qvw2axlE0BkB9TOTZXJw8ldqYhr NYRS+jINouE25MzGeEXFXB9EQ80SnK8j3M/gjtcCv9gr3J1GXmTXtH8ScrkfJ9vnNdDA fEBA== 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 i2si7114314edr.183.2019.09.09.10.21.49; Mon, 09 Sep 2019 10:22:19 -0700 (PDT) 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 S1729559AbfIHQYt (ORCPT + 99 others); Sun, 8 Sep 2019 12:24:49 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:20600 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729355AbfIHQYs (ORCPT ); Sun, 8 Sep 2019 12:24:48 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id F270BA10CE; Sun, 8 Sep 2019 18:24:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id RaAVojXx0viX; Sun, 8 Sep 2019 18:24:32 +0200 (CEST) Date: Mon, 9 Sep 2019 02:24:19 +1000 From: Aleksa Sarai To: Jeff Layton Cc: Al Viro , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan , Ingo Molnar , Peter Zijlstra , Christian Brauner , Eric Biederman , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Kees Cook , Jann Horn , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Rasmus Villemoes , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Aleksa Sarai , Linus Torvalds , containers@lists.linux-foundation.org, linux-alpha@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v12 11/12] open: openat2(2) syscall Message-ID: <20190908162419.yrzm2s7rflqgdxig@yavin> References: <20190904201933.10736-1-cyphar@cyphar.com> <20190904201933.10736-12-cyphar@cyphar.com> <7236f382d72130f2afbbe8940e72cc67e5c6dce0.camel@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gzznbyzuni6ynbc5" Content-Disposition: inline In-Reply-To: <7236f382d72130f2afbbe8940e72cc67e5c6dce0.camel@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gzznbyzuni6ynbc5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-09-07, Jeff Layton wrote: > On Thu, 2019-09-05 at 06:19 +1000, Aleksa Sarai wrote: > > + * @flags: O_* flags. > > + * @mode: O_CREAT/O_TMPFILE file mode. > > + * @upgrade_mask: UPGRADE_* flags (to restrict O_PATH re-opening). > > + * @resolve: RESOLVE_* flags. > > + */ > > +struct open_how { > > + __u32 flags; > > + union { > > + __u16 mode; > > + __u16 upgrade_mask; > > + }; > > + __u16 resolve; > > +}; > > + > > +#define OPEN_HOW_SIZE_VER0 8 /* sizeof first published struct */ > > + >=20 > Hmm, there is no version field. When you want to expand this in the > future, what is the plan? Add a new flag to indicate that it's some > length? The "version number" is the size of the struct. Any extensions we make are appended to the struct (openat2 now takes a size_t argument), and the new copy_struct_{to,from}_user() helpers handle all of the permutations of {old,new} kernel and {old,new} user space. This is how clone3(), sched_[gs]etattr() and perf_event_open() all operate (all of the sigset syscalls operate similarly but don't gracefully handle different kernel vintages -- you just get -EINVAL). --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --gzznbyzuni6ynbc5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXXUrMAAKCRCdlLljIbnQ EgC+AQCVKXVqUiPLaSjLjt+ByWrSsopM/OM3NwCHHZ5oD+CB1gD/cSuQohVmXskg v8dQLpd9K1QW//8GG3Aa/FRHhqPAfAU= =G4Hw -----END PGP SIGNATURE----- --gzznbyzuni6ynbc5--