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
| ||
|
Message-ID: <47226D24.30802@datallegro.com> Date: Fri, 26 Oct 2007 18:41:40 -0400 From: Karl Schendel <kschendel@...allegro.com> To: Zach Brown <zach.brown@...cle.com> CC: Linus Torvalds <torvalds@...ux-foundation.org>, Benjamin LaHaise <bcrl@...ck.org>, Andrew Morton <akpm@...ux-foundation.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Nick Piggin <nickpiggin@...oo.com.au>, Chris Mason <chris.mason@...cle.com> Subject: Re: [PATCH] Fix bad data from non-direct-io read after direct-io write Zach Brown wrote: > Linus Torvalds wrote: >> Hmm. If I read this right, this bug seems to have been introduced by >> commit 65b8291c4000e5f38fc94fb2ca0cb7e8683c8a1b ("dio: invalidate clean >> pages before dio write") back in March. > > Agreed. And it's a really dumb bug. ->direct_io will almost always > return -EIOCBQUEUED for aio dio so it won't be invalidating for aio dio > writes. (Notice that the testing in that commit mentions two racing > processes, I bet U$1M that I only tested sync dio :/) Well, actually, in this case both processes are doing sync IO. It's just that the writer is direct and the reader isn't, with the reader usually behind the writer but close enough that readahead crosses the writer reasonably often. With the if (retval) test, we only invalidate if nothing got written at all! I hadn't even thought of aio directio. Yeah, the invalidate should happen for -EIOCBQUEUED as well, I guess. The disparity in direct-io-ness on the part of the reader vs writer is a userland dum-dum, no question. (That's getting fixed, too.) Karl - 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