From: Linda Walsh <lkml@tlinx.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: max symlink = 5? ?bug? ?feature deficit?
Date: Sun, 12 Feb 2006 13:18:51 -0800 [thread overview]
Message-ID: <43EFA63B.30907@tlinx.org> (raw)
In-Reply-To: <20060212180601.GU27946@ftp.linux.org.uk>
Al Viro wrote:
>> Should it be something like Glib's '20' or '255'?
>>
> 20 or 255 - not feasible (we'll get stack overflow from hell).
>
How much stack is used/iteration? It appears we have a local pointer in
__do_follow_link, and 2 passed parameters/call + call-returns ->5
pointers/iteration. "Forty" entries would seem to take 200 pointers or
800 bytes of stack space? A limit of 20 would use 400 bytes?
If the algorithm was rewritten to be iterative with a stack, that would
seem to reduce memory usage by 40%, (2 "return" addresses out of 5
addresses). Depends on how tight stack space is. If push came to
"shove" couldn't the iterative stack be allocated out of the the general
purpose kernel-memory allocator and not live on the stack, alleviating
the stack pressure entirely?
It doesn't seem it causes an outrageous additional load on the stack as
is, though dynamically allocating the structures out of general memory
would seem to eliminate the problem (if there is one).
next prev parent reply other threads:[~2006-02-12 21:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <43ED5A7B.7040908@tlinx.org>
2006-02-12 18:06 ` max symlink = 5? ?bug? ?feature deficit? Al Viro
2006-02-12 19:19 ` Dave Jones
2006-02-12 19:36 ` Matthew Wilcox
2006-02-12 19:48 ` Al Viro
2006-02-12 21:18 ` Linda Walsh [this message]
2006-02-12 21:25 ` Al Viro
2006-02-12 22:54 ` Linda Walsh
2006-02-13 0:08 ` Al Viro
2006-02-13 0:54 ` Linda Walsh
2006-02-13 7:37 ` Willy Tarreau
2006-02-13 7:48 ` Arjan van de Ven
2006-02-13 8:03 ` Willy Tarreau
2006-02-13 8:11 ` Al Viro
2006-02-13 14:10 ` Olivier Galibert
2006-02-13 8:20 ` Helge Hafting
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=43EFA63B.30907@tlinx.org \
--to=lkml@tlinx.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).