lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Apr 2016 03:04:02 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	"Richard W.M. Jones" <rjones@...hat.com>,
	Josh Triplett <josh@...htriplett.org>
CC:	Colin Walters <walters@...bum.org>, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, mingo@...hat.com, akpm@...ux-foundation.org,
	luto@...nel.org, viro@...iv.linux.org.uk,
	mathieu.desnoyers@...icios.com, zab@...hat.com, emunson@...mai.com,
	paulmck@...ux.vnet.ibm.com, aarcange@...hat.com,
	xemul@...allels.com, sfr@...b.auug.org.au, milosz@...in.com,
	rostedt@...dmis.org, arnd@...db.de, ebiederm@...ssion.com,
	gorcunov@...nvz.org, iulia.manda21@...il.com,
	dave.hansen@...ux.intel.com, mguzik@...hat.com,
	adobriyan@...il.com, dave@...olabs.net, linux-api@...r.kernel.org,
	gorcunov@...il.com, fw@...eb.enyo.de
Subject: Re: [PATCH v2 0/2] vfs: Define new syscall getumask.

On April 18, 2016 2:14:12 AM PDT, "Richard W.M. Jones" <rjones@...hat.com> wrote:
>On Sun, Apr 17, 2016 at 06:57:36PM -0700, Josh Triplett wrote:
>> O_NOUMASK seems potentially useful to support implementation of umask
>> entirely in userspace, which also addresses thread-safety.  A program
>> could read its process umask out at startup, handle umask entirely in
>> userspace (including for threads), and only interact with the system
>> umask after fork and before exec.
>
>I had a look at O_NOUMASK and there are a few problems:
>
>It's relatively easy to implement for open(2).  A few filesystems
>implement their own open so I had to go into those filesystems and
>modify how they handle current_umask too.  And FUSE support is tricky
>so I passed on that.
>
>The real problem is that mkdir/mkdirat/mknod/mknodat are affected by
>umask, but there is no convenient flags parameter to pass the
>O_NOUMASK flag.  So I think the patch only half-solves the problem.
>
>I have a patch which needs a bit more testing, which I can post if you
>think that's helpful, but I don't think it would be acceptable in its
>current state.
>
>Rich.

Ironically this illustrates one of the limitations with flags arguments: this really belongs in the S_-flags, but we can't assume userspace is clean there... anymore than we can repurpose umask(-1).
-- 
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ