Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2244014ybb; Mon, 30 Mar 2020 02:22:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsG11scsnJ1mOTK4um0Nr8IRfan8Mzmtrj62qaMUq/7dCXKAYTFQxUpB50XUDd1b7r+RGLa X-Received: by 2002:aca:fd09:: with SMTP id b9mr6995923oii.88.1585560148403; Mon, 30 Mar 2020 02:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585560148; cv=none; d=google.com; s=arc-20160816; b=uh68uTMRRc5UjF8THsvI/3aZCqfaK8nTL+0SWcn5i+Jmd2nKPt74sPahSnqWJOqFC2 7E2qqpHefz1DayjBPXX6rjvYQl3XtkjhhtECLXgTrUkPB/DfSnZL0oh2Dpb66VxD7py1 /N4tn2JX3bNp/aJa0dBmqS2CJc93OmJXIVkeokcN69aSmBFT4vzw8FBh7uR/YN34mtrR 23eQ/yJ1lSAmR+y6Lw7CgumQLKk38bcZcVkjXsvN9yTP8LAz9Idshtue7ycemcm+J+9O CCo8HUX1TTITzlaCpPpgoHsINl67JClmxuUmU1QV4x6cQikRpW17CRiQWUiGBaMr63nu 83rA== 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=fu2aaXyL1qP74xdKy9t/D5wjSU1IHPEuWsdzHXgZL0I=; b=0H0eaKR6nK39k6/ketypZLYAr9CKI7ODTlZG23VHlvx9iZ5U43c6hPu/c8W3cE6IdF P2qRhxnj9D1hkw/kPQ1MdSMY0d0FCte9IYDYvoEoiUXsmV025dCnVPLu0bCh1A28pFUx 1Q24hvBQgDeuovk4nBMBgl6jRQjuxlVJiO05xquSmSmKR3xcmcRxJ9yRq2NoDORQVUqM A5g2RyGNyoB1Jr9iNSFvz8owoxTSmMoceAMYPlJSlZbLddA+Px6DoTFlHtt917kKp6QL HIFyRtvJ2rCL91h4+uYZc87kQOxra6hJ/fyTM0Q+J2A0kkS4D2leW5T8CQL2OkBzPp67 6yMw== 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 l78si5845521oib.192.2020.03.30.02.22.15; Mon, 30 Mar 2020 02:22:28 -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 S1728631AbgC3JVL (ORCPT + 99 others); Mon, 30 Mar 2020 05:21:11 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:24390 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbgC3JVL (ORCPT ); Mon, 30 Mar 2020 05:21:11 -0400 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 48rRlm5Yk9zQlFX; Mon, 30 Mar 2020 11:21:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id Hq1kmaX4fCTi; Mon, 30 Mar 2020 11:21:00 +0200 (CEST) Date: Mon, 30 Mar 2020 20:20:51 +1100 From: Aleksa Sarai To: "Michael Kerrisk (man-pages)" Cc: Al Viro , Christian Brauner , Aleksa Sarai , linux-man@vger.kernel.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH man-pages v2 2/2] openat2.2: document new openat2(2) syscall Message-ID: <20200330092051.umcu2mjnwqazml7a@yavin.dot.cyphar.com> References: <20200202151907.23587-1-cyphar@cyphar.com> <20200202151907.23587-3-cyphar@cyphar.com> <4dcea613-60b8-a8af-9688-be93858ab652@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jub6wegi3tyrl3an" Content-Disposition: inline In-Reply-To: <4dcea613-60b8-a8af-9688-be93858ab652@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jub6wegi3tyrl3an Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-03-30, Michael Kerrisk (man-pages) wrote: > Hello Aleksa, >=20 > On 2/2/20 4:19 PM, Aleksa Sarai wrote: > > Rather than trying to merge the new syscall documentation into open.2 > > (which would probably result in the man-page being incomprehensible), > > instead the new syscall gets its own dedicated page with links between > > open(2) and openat2(2) to avoid duplicating information such as the list > > of O_* flags or common errors. > >=20 > > In addition to describing all of the key flags, information about the > > extensibility design is provided so that users can better understand why > > they need to pass sizeof(struct open_how) and how their programs will > > work across kernels. After some discussions with David Laight, I also > > included explicit instructions to zero the structure to avoid issues > > when recompiling with new headers.> > > Signed-off-by: Aleksa Sarai >=20 > I'm just editing this page, and have a question on one piece. >=20 > > +Unlike > > +.BR openat (2), > > +it is an error to provide > > +.BR openat2 () > > +with a > > +.I mode > > +which contains bits other than > > +.IR 0777 , >=20 > This piece appears not to be true, both from my reading of the > source code, and from testing (i.e., I wrote a a small program that > successfully called openat2() and created a file that had the > set-UID, set-GID, and sticky bits set). >=20 > Is this a bug in the implementation or a bug in the manual page text? My bad -- it's a bug in the manual. The actual check (which does work, there are selftests for this) is: if (how->mode & ~S_IALLUGO) return -EINVAL; But when writing the man page I forgot that S_IALLUGO also includes those bits. Do you want me to send an updated version or would you prefer to clean it up? --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --jub6wegi3tyrl3an Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXoG58AAKCRCdlLljIbnQ EmpUAP9lwsQSs79E0RPrYRETRyse93uEihw73O5jS2uGNB0ywwD/XrFtGUgmimuA x7DnKf0T9qk7cmUJpiCSwgMpNayU3wE= =S6iK -----END PGP SIGNATURE----- --jub6wegi3tyrl3an--