Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1309277ybc; Tue, 12 Nov 2019 18:33:23 -0800 (PST) X-Google-Smtp-Source: APXvYqz5F7zbymYsjpznGuYytDDs+asfTS9/A7lV3ulLP88MiyiqYp8Bxg/0sF2coGQcgEhho6a/ X-Received: by 2002:a17:906:6dcf:: with SMTP id j15mr563822ejt.104.1573612403505; Tue, 12 Nov 2019 18:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573612403; cv=none; d=google.com; s=arc-20160816; b=YSj6ZQ4ELKG6GqiHquGIh5GwwXG5YZswf5C7jSY6fS9+PEuw47o4kgI9gWHQmXO4tp hNr8FU0VhJ+TR/xicD5BpdZ1JBnAp6AAVIL5XTv79g6EZYQQQ4ANW8qNWdqrV6ccw/z/ E+9FxGa9+Dov5EsCOhWX1Kq/w5y3kkSPqKJubPcoAfZAG2OJzyNWJ8eldZgOgh6MfvTU pCjxfECKFIHtlQsfkh42GEx1p8B9K0/aH2IYaw5J+ufiJqi8oG7GMGE9cI+7/8qYRUDU 5NX/JaxvAFN7fHghN9lAwLv9CDBPR7eoKgjRLDmqS9EJo19qENsXuanuA76vWe9xq27Z HcNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=09Awb5N3gO0L6xrPJFe+f9it6cSxn2DFb9JS5MoynAc=; b=xEB8wjD17J6NzsliGQjmm546x/MKWAILwIG8R5AjPpPExl0AJ/GwNBnFe+v12Znejw uwJWxV/Mty2hNlEWyAYT4Ad9VwVeNQjtKqRb69tGkccUJeraoCYJiN0T8EFPIqUzqzKe UnfP6T7uFepYaf3SX//8S31LsVVTg2FtswpPDTPkVDQA/6/lM+KFFx0k6BJ5wzACLdFz 6tuQRw4MJa6eZlcarLCZwQWguMSK+1+qPLcoI6f2wrVd96GnsUoXfPN7LfmGqyG02hlS D392Wk/LXlJ5VPTea7Y0CMjk/LaYLX3kwu9zrd8ya7BipQpECdkFLdg+LiaFIdAbJ8J2 4Lgw== 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 a7si276028edt.181.2019.11.12.18.32.59; Tue, 12 Nov 2019 18:33:23 -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 S1727888AbfKMC3o (ORCPT + 99 others); Tue, 12 Nov 2019 21:29:44 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:39700 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbfKMC3n (ORCPT ); Tue, 12 Nov 2019 21:29:43 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUiP4-0000ox-FH; Wed, 13 Nov 2019 02:29:06 +0000 Date: Wed, 13 Nov 2019 02:29:06 +0000 From: Al Viro To: Aleksa Sarai Cc: Jeff Layton , "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, libc-alpha@sourceware.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 v15 7/9] open: introduce openat2(2) syscall Message-ID: <20191113022906.GD26530@ZenIV.linux.org.uk> References: <20191105090553.6350-1-cyphar@cyphar.com> <20191105090553.6350-8-cyphar@cyphar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105090553.6350-8-cyphar@cyphar.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 05, 2019 at 08:05:51PM +1100, Aleksa Sarai wrote: > +/* > + * 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 rather > + * than being silently ignored. @mode must be zero unless one of {O_CREAT, > + * O_TMPFILE} are set, and @upgrade_mask must be zero unless O_PATH is set. > + * > + * @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 { > + __aligned_u64 flags; > + __u16 mode; > + __u16 __padding[3]; /* must be zeroed */ > + __aligned_u64 resolve; > +};