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]
Message-ID: <20080812203808.GV28946@ZenIV.linux.org.uk>
Date:	Tue, 12 Aug 2008 21:38:08 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC] readdir mess

On Tue, Aug 12, 2008 at 01:21:56PM -0700, Linus Torvalds wrote:
> We *must* handle partial returns by returning "success". And we do, 
> except for our _confusion_ about ->readdir() returning error and that 
> somehow "overriding" the fact that it already returned non-errors earlier 
> through the callback.
> 
> All your blathering about "positive values as well" seems to ttoally 
> misunderstand how readdir() works. We absolutely do *not* need positive 
> return values, because the fact is, the only positive return value we ever 
> need is the "we already filled _earlier_ buffers". And that's the one 
> that we already do.
> 
> The fact is, NO ERROR VALUE CAN POSSIBLY MATTER if we already returned one 
> or more entries to getdents/readdir(). We should return a success value.

	Would you care to grep for vfs_readdir() in the tree?  It's not just
sys_getdents(); for better of worse the thing had become a general-purpose
iterator.  And I'm not suggesting to pass the damn thing to caller of
sys_getdents().  At all.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ