[PATCH] Check for overflow in __alloc_dir

Roland McGrath roland@hack.frob.com
Thu Oct 11 22:45:00 GMT 2012


> I think it's pretty unreasonable for a small program (e.g. an ftpd)
> that might have many instances and otherwise only be using <100k of
> memory per instance to suddenly consume ~2M just because it's reading
> a directory on an odd filesystem with large blocksize.
> 
> The kernel is perfectly capable of handling caching efficiently by
> itself. There is no reason userspace should care about block sizes.

This is an entirely appropriate argument to be making in favor of a
later tuning change.  The change you proposed to start with was not
for a performance issue, but for sanity-checking.

No such argument will be considered without actual data, just like all
other performance changes.  As I said, we'll be glad to have that
discussion separately after a sanity-checking change that doesn't
change current behavior on non-buggy/malicious filesystems is in.


Thanks,
Roland



More information about the Libc-alpha mailing list