This is way way way too low.
| The reason for the small number is that the routine that parses the
| path name in the kernel does actually recurse on symlinks. Kernel
| stack space is very limited (~6K - stack space for interrupt handlers
| on 2.2). To avoid overflowing the kernel stack the maximum nesting
| has to be limited. AFAIK there are no plans to change it.
There are better ways. You could allocate memory for the link
traversal, even a single buffer and iterate, rewriting the path. You
don't need to traverse symlinks recursively.
8 used to be a common default, and that was pretty frustrating
sometimes. 5 is insanely low. 16 or 32 is much more reasonable. There
was discussion (comp.sys.unix? I forget) some years back about
alternatives (like real loop detection and non-linear methods which
used log2(n) instead of n space consumption) as this limit was really
in the (BSD) kernel to serve as a primitive loop detector, not as a
hack to preserve stack space.
Argh. Overuse of symlinks is certainly bad, but a chain limit of 5 is
mega-overly-conservative.
-- Cameron Simpson, DoD#743 cs@zip.com.au http://www.zip.com.au/~cs/Consider your origin; you were not born to live like brutes, but to follow virtue and knowledge. - Dante Aligheri
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/