Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2262867ybb; Mon, 30 Mar 2020 02:49:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs+PzLmMqXZffqH2XolJdePZDC4bz+3/gnFZQmlYcApHv2vGQ73VwB89v/NqBSQP6B2dWP+ X-Received: by 2002:a4a:4505:: with SMTP id y5mr8873349ooa.29.1585561776565; Mon, 30 Mar 2020 02:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585561776; cv=none; d=google.com; s=arc-20160816; b=UhfOHCF95ZPjD+PrsK836mETqZpkqSjAfdz00ffjZJNG20/58hun4powD6j+LHCAxs +DSHAMxvdvMAexuWQIXTnvp3zMZhKK4B+bvkBXVZoPPNuFSHfX5PXB43+P41XkiSN+yD pW7Rs2HZMEEwdz7tIfB8vG9EsaMKpa8O8O4nGXJd7BHKGOiK7rPGaEId4q/QzFe5fg6y Jvc69RpO/fiyuknNE5Ilhkk3PwWNObMhv+zn2BS+0ol8ezR8HPrq+cA+xmy+N6jROm0O by7BUNtH8M7FwZE5KHISQ9lSpIa8rRsRkUS/RsAN768agNTj91h8w6LU2pU0Yto5OnRI A65A== 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=8HuNOvxi945GytvyJRgD8KwPTg0LIP3GtRXdMpJdR4w=; b=R/xlOF7iJZT1Qo6QtVNIfu5nPOWbSH+yPSFHWaikDyAnMW+qlSsJZHXElqNNlvmKmz JtRg4/wP0pPk+WVYDHOsYuSJS/c9AIKAzcFPaRYyK83iSt8DeEOiU+YW/EfbokUoG/uL 6U20kxgy4KYJxPChKa3p/1d0B10+jImOWSMS1A21u9YHJ5FrmBNExtIomArqJW5gTrx3 sZhxcASfws3FsNYyb0v/5/PbQ6L9HQfE3iAUjhjA7ArcZVCJZt6GhbTpi0/4sFPxA2Oj 9ABEetCnY52CKUUfq1lxqzLpmlBZHdrBQX8xPlsVFVMyh48bq6ocOi3qvrUvFBqZVuN3 G6sg== 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 x8si4766771otq.313.2020.03.30.02.49.23; Mon, 30 Mar 2020 02:49:36 -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 S1728649AbgC3Jsz (ORCPT + 99 others); Mon, 30 Mar 2020 05:48:55 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:21070 "EHLO mout-p-201.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgC3Jsz (ORCPT ); Mon, 30 Mar 2020 05:48:55 -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-201.mailbox.org (Postfix) with ESMTPS id 48rSMl5DjbzQlJg; Mon, 30 Mar 2020 11:48:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id JK5Ffe5fM8nK; Mon, 30 Mar 2020 11:48:45 +0200 (CEST) Date: Mon, 30 Mar 2020 20:48:36 +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: <20200330094836.lhcipdujroahiu4y@yavin.dot.cyphar.com> References: <20200202151907.23587-1-cyphar@cyphar.com> <20200202151907.23587-3-cyphar@cyphar.com> <4dcea613-60b8-a8af-9688-be93858ab652@gmail.com> <20200330092051.umcu2mjnwqazml7a@yavin.dot.cyphar.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zcsmuu77p43qapkn" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zcsmuu77p43qapkn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-03-30, Michael Kerrisk (man-pages) wrote: > On 3/30/20 11:20 AM, Aleksa Sarai wrote: > > On 2020-03-30, Michael Kerrisk (man-pages) wro= te: > >> Hello Aleksa, > >> > >> 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 l= ist > >>> of O_* flags or common errors. > >>> > >>> 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 > >> > >> I'm just editing this page, and have a question on one piece. > >> > >>> +Unlike > >>> +.BR openat (2), > >>> +it is an error to provide > >>> +.BR openat2 () > >>> +with a > >>> +.I mode > >>> +which contains bits other than > >>> +.IR 0777 , > >> > >> 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). > >> > >> Is this a bug in the implementation or a bug in the manual page text? > >=20 > > My bad -- it's a bug in the manual. The actual check (which does work, > > there are selftests for this) is: > >=20 > > if (how->mode & ~S_IALLUGO) > > return -EINVAL; > >=20 > > 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 > I'll clean it up. >=20 > So, it should say, "bits other than 07777", right? Yes, that would be correct. --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --zcsmuu77p43qapkn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXoHAcQAKCRCdlLljIbnQ EvucAP9GXcbNItNpaRbdUdGWIFNP8w+Mq+hSgnLQuuxq/Zo+kQEAqlkhi7iQyli9 3DsFmRfEOOZM9ZV1HezhJaFSfwUEpgo= =AQVl -----END PGP SIGNATURE----- --zcsmuu77p43qapkn--