Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932208AbbHNPbB (ORCPT ); Fri, 14 Aug 2015 11:31:01 -0400 Received: from mail-vk0-f49.google.com ([209.85.213.49]:35628 "EHLO mail-vk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755117AbbHNPa6 (ORCPT ); Fri, 14 Aug 2015 11:30:58 -0400 MIME-Version: 1.0 In-Reply-To: References: <1439458366-8223-1-git-send-email-drysdale@google.com> <1439458366-8223-4-git-send-email-drysdale@google.com> From: David Drysdale Date: Fri, 14 Aug 2015 16:30:37 +0100 Message-ID: Subject: Re: [PATCHv4 man-pages 3/3] open.2: describe O_BENEATH flag To: Andy Lutomirski Cc: Michael Kerrisk-manpages , "linux-kernel@vger.kernel.org" , Alexander Viro , Kees Cook , "Eric W. Biederman" , Greg Kroah-Hartman , Meredydd Luff , Will Drewry , Jorge Lucangeli Obes , Ricky Zhou , Lee Campbell , Julien Tinnes , Mike Depinet , James Morris , Paolo Bonzini , Paul Moore , Christoph Hellwig , Dave Chinner , Linux API , linux-arch , LSM List , Linux FS Devel , fstests Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1917 Lines: 39 On Fri, Aug 14, 2015 at 3:17 PM, Andy Lutomirski wrote: > On Fri, Aug 14, 2015 at 2:29 AM, David Drysdale wrote: >> On Fri, Aug 14, 2015 at 6:33 AM, Michael Kerrisk (man-pages) >> wrote: >>> On 13 August 2015 at 19:38, Andy Lutomirski wrote: >>>> On Thu, Aug 13, 2015 at 2:32 AM, David Drysdale wrote: >>>>> Signed-off-by: David Drysdale >>>> >>>> What's the behavior wrt fcntl(F_GETFL, etc)? >>> >>> I would presume that O_BENEATH is one of the so-called "file creation >>> flags". See this paragraph of the DESCRIPTION: >>> >>> In addition, zero or more file creation flags and file status >>> flags can be bitwise-or'd in flags. The file creation flags are >>> O_CLOEXEC, O_CREAT, O_DIRECTORY, O_EXCL, O_NOCTTY, O_NOFOLLOW, >>> O_TMPFILE, O_TRUNC, and O_TTY_INIT. The file status flags are >>> all of the remaining flags listed below. The distinction between >>> these two groups of flags is that the file status flags can be >>> retrieved and (in some cases) modified; see fcntl(2) for details. >>> >>> David, presuming this is correct (I can't see how O_BENEATH could be a >>> "file *status* flag"), your patch should also add O_BENEATH to the >>> list in that paragraph. >> >> Yeah, O_BENEATH makes sense as a file creation flag; I'll add it >> to that list -- thanks for spotting. > > Should there be a test that you can't clear O_BENEATH with F_SETFL? > > --Andy I'll add a test that fcntl(F_SETFL) silently ignores the file creation flags, including O_BENEATH. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/