lkml.org 
[lkml]   [1998]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH: smart symlink loop detection.


On Tue, 14 Apr 1998, Alan Cox wrote:
> > > Are there path-length limits elsewhere in the kernel?
> >
> > Yes. A PAGE_SIZE is the maximum size of any path (and that includes the
> > ending '\0'). This shows in many places, like "get_name()" and
> > "sys_getcwd()", and it is acceptable to consider this a real limit.
>
> This has a peculiar property in enabling 8K and 32K page machines to create
> an ext2fs other systems cannot read 8)

Yes. That has always been true for other reasons too: the block size of
the filesystem has an upper limit determined by the page size too.

> > We need the limit anyway, to make our stack size limited.
>
> Indeed but would min(4096, PAGESIZE) be better ?

Note that even on x86 you _can_ create a path that is longer than
PATHNAME. And you can traverse it. You just cannot traverse it in one go
(and this also implies that getcwd() cannot handle it - even if we were to
return a longer path that wouldn't really be all that helpful because we
couldn't do a "cd `pwd`" kind of operation anyway).

I don't think we want to do the "min(4096)" thing - there is no real
compelling reason to limit ourselves when it isn't a problem in any
real-world usage (and the blocksize thing is something that the system
administrator has to decide at mkfs time: the default blocksize works for
everybody).

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.656 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site