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]
Message-ID: <27513.1424608792@warthog.procyon.org.uk>
Date:	Sun, 22 Feb 2015 12:39:52 +0000
From:	David Howells <dhowells@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	dhowells@...hat.com, Al Viro <viro@...iv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] more vfs bits

Linus Torvalds <torvalds@...ux-foundation.org> wrote:

>  - dentry_inode*() is supposed to be "the inode that would be used if
> the dentry was opened"
>
>    What part of "dentry_inode()" implies "if the dentry was opened" to
> you? Nothing. The name is fundamentally bad.

That because I wasn't thinking of it that way because it's used in a lot more
places than just opening code.  Audit, for example.

> And what *possible* situation could make that "_once()" version ever be
> valid? None. It's bogus. It's crap. It's insane. There is no way that it is
> *ever* a valid question to even ask. If the dentry is so unstable that you
> can't safely look at the inode, you had damn well better never ask "ok, what
> would the inode be if I opened this random pointer"?

There were originally some uses of dentry_inode_once(), but I think they
dropped out when I removed most of fs/*.c from consideration by the scripts.

>  - fs_inode*() is supposed to be "this is the inode that the native
> filesystem uses".

Yes.

> So of the four new helpers, I really don't see any of them as "good".
> I think "dentry_inode()" could remain, but even there I think the name
> should specify *what* it is ("d_opened_inode()"?  I don't like that name
> either,

That's also a poor choice.  The inode isn't even opened necessarily.  If it is
opened and you have the struct file *, you should almost certainly be using
file_inode().

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ