From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: [PATCH v2 0/2] vfs: Define new syscall getumask. Date: Wed, 13 Apr 2016 22:13:48 -0400 Message-ID: <20160414021348.GB16656@thunk.org> References: <1460552272-15985-1-git-send-email-rjones@redhat.com> <2143735451.55767.1460561962122.JavaMail.zimbra@efficios.com> <1736004700.56566.1460581285951.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1736004700.56566.1460581285951.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mathieu Desnoyers Cc: "Richard W.M. Jones" , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, "H. Peter Anvin" , Andrew Morton , luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, zab , emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org, "Paul E. McKenney" , Andrea Arcangeli , josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org, Pavel Emelyanov , sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org, Milosz Tanski , rostedt , arnd-r2nGTMty4D4@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, gorcunov , iulia manda21 , dave hansen , mguzik , adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Davidlohr Bueso , linux-api , gorcunov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, fw-d32yF4oPJVt0XxTmqZlbVQ@public.gmane.org, Linus Torvalds List-Id: linux-api@vger.kernel.org On Wed, Apr 13, 2016 at 09:01:25PM +0000, Mathieu Desnoyers wrote: > I'm actually discussing 3 separate things here: the umask, sigmask, and > cpu affinity mask. The last two are available in /proc//status --- which brings up the question why not just add umask to /proc//status? That way the shared library can read it via /proc/self/status, but this way it would be possible to look at other process's umask values this as well. > >> Another approach to this has been attempted before, adding something > >> to /proc, although it didn't go anywhere. See: > >> > >> http://comments.gmane.org/gmane.linux.kernel/1292109 ... and indeed that's what I suggested. It looks like from the thread that it petered out due to apathy instead of people not liking the idea. One other reason to suggest using a /proc file is that you're not at the mercy of the glibc folks to wire up a new system call. (Glibc has been refusing to wire up getrandom(2), for example. Grrrr.....) - Ted From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753359AbcDNCOU (ORCPT ); Wed, 13 Apr 2016 22:14:20 -0400 Received: from imap.thunk.org ([74.207.234.97]:51826 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbcDNCOS (ORCPT ); Wed, 13 Apr 2016 22:14:18 -0400 Date: Wed, 13 Apr 2016 22:13:48 -0400 From: "Theodore Ts'o" To: Mathieu Desnoyers Cc: "Richard W.M. Jones" , linux-kernel@vger.kernel.org, Thomas Gleixner , mingo@redhat.com, "H. Peter Anvin" , Andrew Morton , luto@kernel.org, viro@zeniv.linux.org.uk, zab , emunson@akamai.com, "Paul E. McKenney" , Andrea Arcangeli , josh@joshtriplett.org, Pavel Emelyanov , sfr@canb.auug.org.au, Milosz Tanski , rostedt , arnd@arndb.de, ebiederm@xmission.com, gorcunov , iulia manda21 , dave hansen , mguzik , adobriyan@gmail.com, Davidlohr Bueso , linux-api , gorcunov@gmail.com, fw@deneb.enyo.de, Linus Torvalds Subject: Re: [PATCH v2 0/2] vfs: Define new syscall getumask. Message-ID: <20160414021348.GB16656@thunk.org> Mail-Followup-To: Theodore Ts'o , Mathieu Desnoyers , "Richard W.M. Jones" , linux-kernel@vger.kernel.org, Thomas Gleixner , mingo@redhat.com, "H. Peter Anvin" , Andrew Morton , luto@kernel.org, viro@zeniv.linux.org.uk, zab , emunson@akamai.com, "Paul E. McKenney" , Andrea Arcangeli , josh@joshtriplett.org, Pavel Emelyanov , sfr@canb.auug.org.au, Milosz Tanski , rostedt , arnd@arndb.de, ebiederm@xmission.com, gorcunov , iulia manda21 , dave hansen , mguzik , adobriyan@gmail.com, Davidlohr Bueso , linux-api , gorcunov@gmail.com, fw@deneb.enyo.de, Linus Torvalds References: <1460552272-15985-1-git-send-email-rjones@redhat.com> <2143735451.55767.1460561962122.JavaMail.zimbra@efficios.com> <1736004700.56566.1460581285951.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1736004700.56566.1460581285951.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2016 at 09:01:25PM +0000, Mathieu Desnoyers wrote: > I'm actually discussing 3 separate things here: the umask, sigmask, and > cpu affinity mask. The last two are available in /proc//status --- which brings up the question why not just add umask to /proc//status? That way the shared library can read it via /proc/self/status, but this way it would be possible to look at other process's umask values this as well. > >> Another approach to this has been attempted before, adding something > >> to /proc, although it didn't go anywhere. See: > >> > >> http://comments.gmane.org/gmane.linux.kernel/1292109 ... and indeed that's what I suggested. It looks like from the thread that it petered out due to apathy instead of people not liking the idea. One other reason to suggest using a /proc file is that you're not at the mercy of the glibc folks to wire up a new system call. (Glibc has been refusing to wire up getrandom(2), for example. Grrrr.....) - Ted