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:   Sat, 9 Jun 2018 16:51:08 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [RFC][PATCHES] getting rid of int *open in ->atomic_open() and
 friends

On Sat, Jun 09, 2018 at 06:10:51AM +0100, Al Viro wrote:

> That leaves
> 	* anon_inode_getfile() - converts to similar form, at the price of
> ihold done slightly earlier, so that failure exit needs a (non-final, i.e.
> very cheap) iput() we currently avoid.  Not a problem.
> 	* do_shmat() and the second alloc_file() in create_pipe_files().
> Those are rather different - we *do* have an existing dentry/inode/mount
> there and all we want on cleanup is path_put() to undo the path_get()
> we'd done.
> 	* perfmon mess - _very_ different, and I wouldn't bet a dime on
> correctness of failure exits there.  One of the issues is that it simulates
> mmap as part of setup, so cleanup really is different.
> 
> AFAICS, there's a clear case for alloc_file() wrapper - 6 callers out of
> 10 get simpler with it, and the seventh is also a good candidate for the
> same treatment.  Any naming ideas for that thing ("something" in the above)
> would be welcome...
> 
> BTW, that's almost all callers of d_alloc_pseudo() - there is exactly one
> caller not of that form (in __ns_get_path()) right now.  perfmon should
> be another caller, but that might end up converted to the new wrapper...
> 
> As for put_filp()... the callers left in my local tree right now are
> 	* path_openat(), dentry_open(), file_clone_open() (all of the
> same form - "put_filp() if it doesn't have FMODE_OPENED, fput() otherwise)
> 	* perfmon mess.
> create_pipe_files() got converted to fput() with a bit of massage...

Untested followup along those lines pushed; helper called alloc_file_pseudo()
and all but 3 callers of alloc_file() got converted to it.  perfmon is not
touched and it's becoming more and more annoying ;-/  It's also sticking
its tender bits into mm/* a lot - what it tries to do, AFAICS, is a heavily
open-coded vmalloc-backed mmap() of sorts.  It feels like there ought to be
a more idiomatic way of doing that kind of stuff...

Stephane, could you comment on the situation in there?  I realize that you
hadn't touched that thing in more than a decade, but I've no idea who else
might be familiar with that thing and it's very inconveniently special...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ