Re: [PATCH] Port SquashFS to 2.6

From: Jörn Engel (joern@wohnheim.fh-wedel.de)
Date: Sun Jul 20 2003 - 03:22:17 EST


On Sat, 19 July 2003 22:40:22 -0700, junkio@cox.net wrote:
> >>>>> "DD" == David Dillow <dave@thedillows.org> writes:
>
> DD> Hmm, isn't that 4K allocated on the stack? Ouch.
>
> Ouch indeed. I was not looking for these things (I was just
> porting not fixing). Thank you for pointing it out. Have a
> couple of questions:
>
> - Would it be an acceptable alternative here to use blocking
> kmalloc upon entry with matching kfree before leaving?
>
> - I would imagine that the acceptable stack usage for functions
> would depend on where they are called and what they call.
> Coulc you suggest a rule-of-thumb number for
> address_space_operations.readpage (say, would 1kB be OK but
> not 3kB?)

As a rule of thumb, stay below 1k or you will get regular email from
me. :)

Depending on where and what you do, a bit more could be ok, but this
is hard to prove and also depends a bit on the architecture. s390 has
giant stacks because function call overhead is huge, i386 will likely
halve the kernel stack sometime during 2.7 and there is no point is
hiding more easter eggs now - there is enough hidden already.

Jörn

-- 
"Security vulnerabilities are here to stay."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:39 EST