From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754865AbcDMXJm (ORCPT ); Wed, 13 Apr 2016 19:09:42 -0400 Received: from ozlabs.org ([103.22.144.67]:39948 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754837AbcDMXJl (ORCPT ); Wed, 13 Apr 2016 19:09:41 -0400 Date: Thu, 14 Apr 2016 09:09:38 +1000 From: Stephen Rothwell To: "Richard W.M. Jones" Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, akpm@linux-foundation.org, luto@kernel.org, viro@zeniv.linux.org.uk, mathieu.desnoyers@efficios.com, zab@redhat.com, emunson@akamai.com, paulmck@linux.vnet.ibm.com, aarcange@redhat.com, josh@joshtriplett.org, xemul@parallels.com, milosz@adfin.com, rostedt@goodmis.org, arnd@arndb.de, ebiederm@xmission.com, gorcunov@openvz.org, iulia.manda21@gmail.com, dave.hansen@linux.intel.com, mguzik@redhat.com, adobriyan@gmail.com, dave@stgolabs.net, linux-api@vger.kernel.org, gorcunov@gmail.com, fw@deneb.enyo.de, walters@verbum.org Subject: Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask] Message-ID: <20160414090938.44c56c78@canb.auug.org.au> In-Reply-To: <1460574336-18930-1-git-send-email-rjones@redhat.com> References: <1460574336-18930-1-git-send-email-rjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" wrote: > > It's not possible to read the process umask without also modifying it, > which is what umask(2) does. A library cannot read umask safely, > especially if the main program might be multithreaded. I was wondering if you really need to read the umask, or would just a "ignore umask" flag to open{,at} do what you want? -- Cheers, Stephen Rothwell