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: <AANLkTinPkGHASWubtUY1aDbnxv8V3uGvV+b+e+TkSiVS@mail.gmail.com>
Date:	Tue, 14 Dec 2010 13:08:54 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	stefani@...bold.net, linux-kernel@...r.kernel.org,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] cramfs: generate unique inode number for better inode
 cache usage

On Tue, Dec 14, 2010 at 12:51 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> Did you look at using iunique() to generate cramfs inode numbers?

That breaks the cramfs "hardlinking" (which is just files that have
the same data pointer), and now a hardlinked file wouldn't have the
same inode number any more.

Of course, I'm not sure the hardlinking really matters. cramfs
hardlinks aren't really traditional hardlinks anyway - since the
permissions etc are in the directory entry, you can have the data
hardlinked without having the same permissions, so it's not a "real"
hardlink even if the inode number were to be the same.

But this patch seems to roughly approximate the old pseudo-hardlink
behavior. It used to be that all non-data files showed up with the
same inode number, now they have separate inode numbers.

That said, I hate how it moves that "setup_inode" helper function
inline and then does the "if it's a character device" kinds of tests
twice. Once for the inode number logic, and once for the inode
operations structure assignment.

So I think the approach is fine, but I think the implementation is pretty ugly.

                          Linus
--
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