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>] [day] [month] [year] [list]
Date:	Sat, 7 Sep 2013 16:34:27 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Al Viro <viro@...iv.linux.org.uk>, Waiman Long <Waiman.Long@...com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	"Chandramouleeswaran, Aswin" <aswin@...com>,
	"Norton, Scott J" <scott.norton@...com>
Subject: Adding concept of "dead" references to lockref

Ok, I added the notion of having a dead entry to lockref, because it
simplifies the dcache code a bit. I committed and pushed out the
actual lockref infrastructure, but the actual dcache *use* of that
infrastructure is probably too late for 3.12, or at least it needs
some discussion.

I'm attaching the patch here (but it needs _current_ git as of not
very long ago for the new "dead lockref" support). It simplifies both
the actual killing of dentries (we used to pass this "ref" thing
around to show whether we held the last ref to the dentry or not, this
makes it pointless because we'll just overwrite the refcount anyway)
and it particularly simplifies the getting the reference for the RCU
case, because the whole "it's valid but we couldn't tell" case is
gone.

Comments? It doesn't matter for my insane test-case, since that one
was either looking at a directory with non-zero refcount to begin
with, and even if you looked up a regular file, all the other people
looking it up would guarantee that non-zero refcount. But it basically
makes the (common) special case of "we got the dentry d_lock because
we're looking up a file that nobody else had actively open yet", and
now that's just a reference count operation too.

Simpler code and one less special case sounds like a good thing to me.

                 Linus

Download attachment "patch.diff" of type "application/octet-stream" (2755 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ