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:   Thu, 9 Nov 2017 18:02:21 +0200
From:   Nikolay Borisov <nborisov@...e.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     NeilBrown <neilb@...e.com>, Al Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] VFS: close race between getcwd() and d_move()



On  9.11.2017 15:08, Matthew Wilcox wrote:
> On Thu, Nov 09, 2017 at 01:41:24PM +0200, Nikolay Borisov wrote:
>> On  9.11.2017 05:22, NeilBrown wrote:
>>> @@ -493,12 +496,18 @@ void __d_drop(struct dentry *dentry)
>>>  		} else
>>>  			hlist_bl_lock(b);
>>>  		__hlist_bl_del(&dentry->d_hash);
>>> -		dentry->d_hash.pprev = NULL;
>>> +		if (likely(!moving))
>>> +			dentry->d_hash.pprev = NULL;
>>
>> nit: isn't a bit more explicit if (unlikely(moving)). I suspect the end
>> result is the same, however it's easy to miss the !. It's not a big deal
>> but just wondering.
> 
> umm ... you just suggested the exact opposite of what the patch is
> intended to do.  likely()/unlikely() only hint to the compiler the
> probabilities of the branch; they don't change the meaning of the
> condition.

brainfart, disregard my comment doh....

> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ