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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Oct 2006 19:48:48 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC, PATCH] dont insert sockets/pipes dentries into dentry_hashtable.

Hi David

Here is the patch I cooked after our mail exchange. (was [RFC] Any strong 
reason why socket dentries are hashed in global dentry_hashtable )

If necessary, I could split this patch in 4 elementary patches. I chose to 
sent it as one patch for initial discussion.

[RFC, PATCH] dont insert sockets/pipes dentries into dentry_hashtable.

We currently insert sockets/pipes dentries into the global dentry hashtable.
This is *useless* because there is currently no way these entries can be used 
for a lookup(). (/proc/xxx/fd/xxx uses a different mechanism)

Machines with a lot of sockets/pipes might suffer from longer chains in dentry 
hashtable.

The goals of this patch are :

[0] No more insertion in hashtable of sockets/pipes dentries.

[1] Introduction of a DENTRY_DELETED flag, that can distinguish dentries that 
were deleted and others in d_path(). (previous code was using d_unhashed())

[2] Small optimization to bypass RCU freeing in d_free() for dentries that 
were never hashed (like sockets and pipes). Such dentries dont have to wait a 
RCU grace period.

[3] Plug socket code to use d_instantiate() instead of d_hash()
   (No more need for a private d_delete function, and dentry_operations)

[4] Plug pipe code to use d_instantiate() instead of d_hash()
   (No more need for a private d_delete function, and dentry_operations)

Another step would be to eliminate dentries for sockets/pipes, but that's 
another story. (Or at least allocate them from a separate kmem_cache_t as 
they are not reclaimable, and they might be smaller than a full dentry)

Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

View attachment "dcache.patch" of type "text/plain" (3653 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ