public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petter Reinholdtsen <pere@hungry.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Increase recursive symlink limit from 5 to 8
Date: 11 Jan 2004 02:03:01 +0100	[thread overview]
Message-ID: <2flllofnvp6.fsf@saruman.uio.no> (raw)
In-Reply-To: <E1AeMqJ-00022k-00@minerva.hungry.com>


[Petter Reinholdtsen]
> The comment in do_follow_link() do not match the code.  The comment
> explain that the limit for recursive symlinks are 8, but the code
> limit it to 5.  This is the current comment:

Hm, I wrote the following test script to test the current limit on
different unixes, and was surprised by the differences.  And, my
previous claim that RedHat must have increased this limit was wrong.
The test on RedHat showed that it had the same limit as Debian.  Not
sure why the symlinks in question seemed to be working on RedHat.

  Linux:         Symlink limit seem to be 6 path entities.
  AIX:           Symlink limit seem to be 21 path entities.
  HP-UX:         Symlink limit seem to be 21 path entities.
  Solaris:       Symlink limit seem to be 21 path entities.
  Irix:          Symlink limit seem to be 31 path entities.
  Mac OS X:      Symlink limit seem to be 33 path entities.
  Tru64 Unix:    Symlink limit seem to be 65 path entities.

I really think this limit should be increased in Linux.  Not sure how
high it should go, but from 5 to somewhere between 20 and 64 seem like
a good idea to me.

Petri Koistinen suggested that I sent my patch to
<URL:http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/>.
I'll do that, replacing 5 with 64 instead of 8.  No need to have any
lower limit than Tru64 Unix, I figure.

This is the test program I used:

#!/bin/sh
#
# Author: Petter Reinholdtsen
# Date:   2004-01-11
#
# Script to detect the kernels "recursive" symlink limit.  This seem
# to differ from Unix to Unix, and from version to version.

TMPDIR=test

error() {
    echo $1
    exit 1
}

mkdir $TMPDIR || error "Unable to create $TMPDIR/"
(
    cd $TMPDIR
    for limit in `seq 1 10`; do
	last=foo
	echo "Limit $limit" > foo
	for n in `seq  $limit` ; do
	    ln -s $last $n
	    last="$n"
	done
	cat $last > /dev/null 2>&1 || error "Symlink limit seem to be $limit path entities."
	for n in `seq  $limit` ; do
	    rm $n
	done
    done
)
rm -rf $TMPDIR

  reply	other threads:[~2004-01-11  1:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 23:12 [PATCH] Increase recursive symlink limit from 5 to 8 Petter Reinholdtsen
2004-01-11  1:03 ` Petter Reinholdtsen [this message]
2004-01-11  7:01   ` Steve Youngs
2004-01-11  9:37     ` Peter Osterlund
2004-01-11  9:49     ` Arjan van de Ven
2004-01-16  0:45       ` GOTO Masanori
2004-01-16  0:56         ` Måns Rullgård
2004-01-16  1:25         ` viro
2004-01-16 15:46           ` Andries Brouwer
2004-01-16  3:08         ` Steve Youngs
2004-01-11 12:10     ` Felipe Alfaro Solana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2flllofnvp6.fsf@saruman.uio.no \
    --to=pere@hungry.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox