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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 24 Jan 2020 18:31:03 +0000 From: Al Viro <viro@...iv.linux.org.uk> To: Eric Biggers <ebiggers@...nel.org> Cc: Gao Xiang <hsiangkao@....com>, linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, Daniel Rosenberg <drosen@...gle.com>, Gabriel Krisman Bertazi <krisman@...labora.com> Subject: Re: [PATCH] ext4: fix race conditions in ->d_compare() and ->d_hash() On Fri, Jan 24, 2020 at 10:12:54AM -0800, Eric Biggers wrote: > > Thanks for your web reference, I will look into it. I think there > > is no worry about dentry->d_parent here because of this only one > > dereference on dentry->d_parent. > > > > You could ignore my words anyway, just my little thought though. > > Other part of the patch is ok. > > > > While that does make it really unlikely to cause a real-world problem, it's > still undefined behavior to not properly annotate a data race, it would make the > code harder to understand as there would be no indication that there's a data > race, and it would confuse tools that try to automatically detect data races. > So let's keep the READ_ONCE() on d_parent. *nod* Note that on everything except alpha it'll generate the same code, unless the compiler screws up an generates multiple loads. On alpha it adds a barrier and I really don't want to sit down and check if its absense could lead to anything unpleasant.
Powered by blists - more mailing lists