From: Daniel Phillips <phillips@bonn-fries.net>
To: Alexander Viro <viro@math.psu.edu>
Cc: Dawson Engler <engler@csl.Stanford.EDU>,
Benjamin LaHaise <bcrl@redhat.com>,
linux-kernel@vger.kernel.org, mc@cs.Stanford.EDU
Subject: Re: [CHECKER] 37 stack variables >= 1K in 2.4.17
Date: Thu, 13 Jun 2002 20:45:01 +0200 [thread overview]
Message-ID: <E17IZag-0000RD-00@starship> (raw)
In-Reply-To: <Pine.GSO.4.21.0206131350180.20315-100000@weyl.math.psu.edu>
On Thursday 13 June 2002 19:53, Alexander Viro wrote:
> On Thu, 13 Jun 2002, Daniel Phillips wrote:
>
> > > I mean that due to the loop (link_path_walk->do_follow_link->foofs_follow_link
> > > ->vfs_follow_link->link_path_walk) you will get infinite maximal depth
> > > for everything that can be called by any of these functions. And that's
> > > a _lot_ of stuff.
> >
> > Then at the point of recursion a dynamic check for stack space is
> > needed, and [checker]'s role would be to determine the deepest static
> > depth, to plug into the stack check. If we want to be sure about
> > stack integrity there isn't any way around this.
>
> Wrong. Check for stack _space_ will mean that maximal depth of nested
> symlinks depends on syscall. Definitely not what you want to see.
> There is a static limit (no more than 5 nested), but it must be
> explicitly known to checker - deducing it from code is easy for a
> human, but hopeless for anything automatic.
It's even hard to deduce the recursion in this case, and even if
checker is smart enough to spot it there's no way to know the
static requirement of out-of-tree filesystems.
Perhaps a BUG here is the right thing, in case the big chain of
assumptions here is inadvertently violated, in which case I'd much
rather have the system go down with a BUG than wig out in one of
the weird and wonderful ways typical of a stack overflow.
By the way:
327 /*
328 * This limits recursive symlink follows to 8, while
329 * limiting consecutive symlinks to 40.
Maybe:
327 /*
328 * This limits recursive symlink follows and consecutive symlinks.
--
Daniel
next prev parent reply other threads:[~2002-06-13 18:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 3:56 [CHECKER] 37 stack variables >= 1K in 2.4.17 Dawson Engler
2002-06-12 8:43 ` Pavel Machek
2002-06-12 19:11 ` Nikita Danilov
2002-06-12 21:51 ` Benjamin LaHaise
2002-06-12 22:26 ` Alexander Viro
2002-06-12 22:38 ` Benjamin LaHaise
2002-06-12 22:44 ` Robert Love
2002-06-12 22:55 ` procfs documentation Tom Bradley
2002-06-13 11:17 ` John Levon
2002-06-13 0:20 ` [CHECKER] 37 stack variables >= 1K in 2.4.17 Alexander Viro
2002-06-13 8:30 ` Helge Hafting
2002-06-13 13:24 ` Roger Larsson
2002-06-14 10:06 ` Helge Hafting
2002-06-13 6:38 ` Dawson Engler
2002-06-13 6:59 ` Alexander Viro
2002-06-13 17:41 ` Daniel Phillips
2002-06-13 17:53 ` Alexander Viro
2002-06-13 18:45 ` Daniel Phillips [this message]
2002-06-13 17:56 ` Andi Kleen
2002-06-13 18:26 ` Alexander Viro
2002-06-13 19:01 ` Andi Kleen
2002-06-14 0:05 ` William Lee Irwin III
2002-06-13 21:50 ` Dawson Engler
2002-06-13 22:43 ` Oliver Xymoron
2002-06-14 0:25 ` Alexander Viro
2002-06-13 6:36 ` Dawson Engler
-- strict thread matches above, loose matches on Subject: below --
2002-06-16 0:48 Andries.Brouwer
2002-06-16 1:08 ` Alexander Viro
2002-06-16 7:47 Andries.Brouwer
2002-06-16 8:36 ` Alexander Viro
2002-06-16 9:59 Andries.Brouwer
2002-06-16 10:33 ` Alexander Viro
2002-06-16 10:56 Andries.Brouwer
2002-06-16 11:38 ` Alexander Viro
2002-06-16 13:13 Andries.Brouwer
2002-06-16 18:51 ` Alexander Viro
2002-06-16 20:41 Andries.Brouwer
2002-06-16 21:33 ` Andreas Dilger
2002-06-16 21:34 ` Alexander Viro
2002-06-17 10:09 ` David Woodhouse
2002-06-16 22:05 Andries.Brouwer
2002-06-16 23:57 ` Alexander Viro
2002-06-17 11:07 Andries.Brouwer
2002-06-17 12:00 ` David Woodhouse
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=E17IZag-0000RD-00@starship \
--to=phillips@bonn-fries.net \
--cc=bcrl@redhat.com \
--cc=engler@csl.Stanford.EDU \
--cc=linux-kernel@vger.kernel.org \
--cc=mc@cs.Stanford.EDU \
--cc=viro@math.psu.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.