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: <20180110200255.GA6499@thunk.org> Date: Wed, 10 Jan 2018 15:02:55 -0500 From: Theodore Ts'o <tytso@....edu> To: Sean Fu <fxinrong@...il.com> Cc: Al Viro <viro@...IV.linux.org.uk>, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter. On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote: > > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I > think that it is reasonable. while it got lock, zero would be returned > in this case. Returning -EAGAIN and 0 are not the same thing. Specifically returning 0 means "end of file". Hence, it is NOT reasonable. See the man page for read(2) or the relevant Single Unix Specification standard: RETURN VALUE On success, the number of bytes read is returned (zero indicates end of file).... Changing the behavior of the system in which will break userspace is never acceptable, and even more so given that this is just a "cleanup patch". - Ted
Powered by blists - more mailing lists