> >ELOOP variable.The reason that there's a hard-coded limit in the first place
> >is that symlink traversal uses
> >recursion, and the kernel stack has a hard-coded limit. In addition, it's not
> >that easy to
> >figure out worst-case stack usage, since you don't know what various file
> >systems may
> >need to do to resolve symlinks.
> >
> >Hence a hard-coded safe limit is called for here.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> However, David Todd mentioned that he thought max_symlinks should be an
> unsigned int. I didn't think there was too much point to this because
> if it was set to some low (positive) number such as 0, or 1 then you
> would still be in trouble.
Note, that if you set it to *too* high number, you are in _much_ worse
problem. (AKA random reboots.)
> I think that the best solution is to allow ELOOP to be variable, but
> to additionally implement some sort of bounds checking functionality for
> sysctl parameters where possible and desirable. Then make the bounds
> hard-coded safe limits.
5 is considered safe limit. No reason to have it lower. If you know
safe up limit, hardcode *that* limit.
Pavel
-- I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu