On Sun, May 20, 2012 at 9:50 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > Does this patch work for you? What it *should* do is the same that the > other read/write paths do (and the vector path for aio already do), > namely truncate reads or writes to MAX_RW_COUNT (which is INT_MAX > aligned down to a page). > > This patch is entirely untested, Ok, so with that patch, your program gives the expected 2147479552 (0x7ffff000) bytes transferred which is indeed MAX_INT aligned down to a page boundary (ie MAX_RW_COUNT). So I'm pretty sure this patch is what we want, and rw_verify_area() really is required to protect low-level filesystems from these kinds of issues. Not just ext4. At the same time, I would *really* want somebody who actually uses anything AIO to test it out too. Because I want to not only commit it, but also mark it for stable - and it would be nice to have some more testing than me saying "ok, it passes the one test-case sent to me" and "hey, the code looks sane". Anybody? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html