Re: I discussed reading directories as files with jra, Stallman,

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 21 Jun 1999 11:18:11 +0100 (BST)


> and that's what happens here. It's not the fact that we have a recursive
> lookup_dentry(), it's bringing tons of cruft into stack between the nested
> calls and severe code duplication. And multiple pathes of recursion (every
> foo_follow_link contains one).

The fact we have fs recursion is actually bad, but purely because we don't
have dynamic stack allocation. (Which we dont want either). With a non
recudsive follow link we could probably go back to 4K stacks. If thats the
case then on x86 recursive link following currently costs us 4K a process
idle, or otherwise. Ie about 350K of unswappable memory on my box currently.

> It's order of magnitude. I'm more than sure that with sufficiently long
> and perverted code path (we have them) the current implementation can be
> used to overflow the ring 0 stack.

Try a self referencing symlink on smbfs - although that appears to be
not entirely the VFS fault.

> PS: ObCodeDuplication: sys_mmap() on PPC. down(&current->mm->mmap_sem)
> missing. fcheck() instead of fget(). The former is more or less fresh, but
> the latter is about 1.5 years old. Exploitable race. Sigh... And there are
> other similar buggers. grep(1) is our friend...

patch ?

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/