2006-05-02 18:05:42

by Brian D. McGrew

[permalink] [raw]
Subject: Too many levels of symbolic links

Because of the way our internal filesystem is setup, I'm seeing this
error more and more.

At one time, back in the early 2.4 days, I'd made a change to the kernel
to all more links but I can't seem to find it again in 2.6. Does anyone
know off hand where this constant is defined???

Thanks,

:b!

Brian D. McGrew { [email protected] || [email protected] }
--
> This is a test. This is only a test!
Had this been an actual emergency, you would have been
told to cancel this test and seek professional assistance!


2006-05-03 01:52:51

by L A Walsh

[permalink] [raw]
Subject: Re: Too many levels of symbolic links



Brian D. McGrew wrote:
> Because of the way our internal filesystem is setup, I'm seeing this
> error more and more.
>
> At one time, back in the early 2.4 days, I'd made a change to the kernel
> to all more links but I can't seem to find it again in 2.6. Does anyone
> know off hand where this constant is defined???
>
----
Is this what you are looking for?

include/linux/namei.h MAX_NESTED_LINKS = 5

(used in fs/namei.c, where comment claims MAX_NESTING is equal to 8)


2006-05-03 02:58:03

by H. Peter Anvin

[permalink] [raw]
Subject: Re: Too many levels of symbolic links

Followup to: <[email protected]>
By author: Linda Walsh <[email protected]>
In newsgroup: linux.dev.kernel
> Is this what you are looking for?
> include/linux/namei.h MAX_NESTED_LINKS = 5
> (used in fs/namei.c, where comment claims MAX_NESTING is equal to 8)

Wonder if it would make sense to make this a sysctl...

-hpa

2006-05-03 03:08:51

by Al Viro

[permalink] [raw]
Subject: [PATCH] symlink nesting level change

On Tue, May 02, 2006 at 07:57:34PM -0700, H. Peter Anvin wrote:
> Followup to: <[email protected]>
> By author: Linda Walsh <[email protected]>
> In newsgroup: linux.dev.kernel
> > Is this what you are looking for?
> > include/linux/namei.h MAX_NESTED_LINKS = 5
> > (used in fs/namei.c, where comment claims MAX_NESTING is equal to 8)
>
> Wonder if it would make sense to make this a sysctl...

No. It's way past time to bump it to 8. Everyone had been warned - for
months now.

Signed-off-by: Al Viro <[email protected]>
----
--- a/include/linux/namei.h 2006-03-31 20:08:42.000000000 -0500
+++ b/include/linux/namei.h 2006-05-02 23:06:46.000000000 -0400
@@ -11,7 +11,7 @@
struct file *file;
};

-enum { MAX_NESTED_LINKS = 5 };
+enum { MAX_NESTED_LINKS = 8 };

struct nameidata {
struct dentry *dentry;

2006-05-04 01:36:11

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] symlink nesting level change

On Wed, 3 May 2006 04:08:49 +0100
Al Viro <[email protected]> wrote:

> No. It's way past time to bump it to 8. Everyone had been warned - for
> months now.
>
> Signed-off-by: Al Viro <[email protected]>
> ----
> --- a/include/linux/namei.h 2006-03-31 20:08:42.000000000 -0500
> +++ b/include/linux/namei.h 2006-05-02 23:06:46.000000000 -0400
> @@ -11,7 +11,7 @@
> struct file *file;
> };
>
> -enum { MAX_NESTED_LINKS = 5 };
> +enum { MAX_NESTED_LINKS = 8 };
>
> struct nameidata {
> struct dentry *dentry;

It's a non-back-compatible change which means that people will install
2.6.18+, will set stuff up which uses more that five nested links and some
will discover that they can no longer run their software on older kernels.

It'll only hurt a very small number of people, but for those people, it
will hurt a lot. And I can't really think of anything we can do to help
them, apart from making the new behaviour runtime-controllable, defaulting
to "off", but add a once-off printk when we hit MAX_NESTED_LINKS, pointing
them at a document which tells them how to turn on the new behaviour and
which explains the problems. Which sucks.

But I guess as major distros are 2.6.16-based, this is a good time to make
this change.

2006-05-04 06:55:58

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [PATCH] symlink nesting level change


> But I guess as major distros are 2.6.16-based, this is a good time to make
> this change.

several major distros already had this set to 8 anyway :

and your argument that this is a behavior break... holds for any
improvement and new driver to the kernel as well.. at some point it's
"if you use the new behavior, don't assume you can go back without
losing it"


2006-05-04 07:19:15

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] symlink nesting level change

On Wed, May 03, 2006 at 06:35:54PM -0700, Andrew Morton wrote:
> It's a non-back-compatible change which means that people will install
> 2.6.18+, will set stuff up which uses more that five nested links and some
> will discover that they can no longer run their software on older kernels.
>
> It'll only hurt a very small number of people, but for those people, it
> will hurt a lot. And I can't really think of anything we can do to help
> them, apart from making the new behaviour runtime-controllable, defaulting
> to "off", but add a once-off printk when we hit MAX_NESTED_LINKS, pointing
> them at a document which tells them how to turn on the new behaviour and
> which explains the problems. Which sucks.

Those people keep asking to lift that limit. So no, I don't believe that
making it runtime-controllable is the right thing to do. Document that
we'd lifted the limit to 8 and such setups become possible since <version>.

> But I guess as major distros are 2.6.16-based, this is a good time to make
> this change.

FWIW, RH kernels had that for more than a year by now...

2006-05-17 20:58:25

by Tim Pepper

[permalink] [raw]
Subject: Re: Too many levels of symbolic links

On 5/2/06, H. Peter Anvin <[email protected]> wrote:
> By author: Linda Walsh <[email protected]>
> > Is this what you are looking for?
> > include/linux/namei.h MAX_NESTED_LINKS = 5
> > (used in fs/namei.c, where comment claims MAX_NESTING is equal to 8)
>
> Wonder if it would make sense to make this a sysctl...

There might be something in somebody's pipeline around this...Early
this year Al Viro said (http://lkml.org/lkml/2006/2/12/104) he was
going to bump it post 2.6.16 back up to 8 to match the comment.

Al: In the thread referenced above you'd said you would if there
wasn't any major complaint and it didn't seem like any surfaced. Are
you still planning to up MAX_NESTED_LINKS?


Tim

2006-05-18 19:20:07

by Tim Pepper

[permalink] [raw]
Subject: Re: Too many levels of symbolic links

Nevermind..missed the subject changed follow up to this...

Tim