This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check for overflow in __alloc_dir


On Thu, Oct 11, 2012 at 01:17:41PM -0700, Roland McGrath wrote:
> If st_blksize might ever be any kind of bogus, then I think it's better
> just to cap it to some reasonable maximum (maybe a megabyte or two?).

The highest reasonable value is about 64k, and that's being generous;
I'd cap it at 4k or so, or better yet completely ignore the blksize.
That's roughly the point at which the cost of actually processing
entries drowns out the syscall cost anyway.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]