Subject: Re: ipsec.c patch to reduce kernel stack usage
To: None <itojun@iijlab.net>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-net
Date: 06/27/2002 20:13:12
From: itojun@iijlab.net
Subject: Re: ipsec.c patch to reduce kernel stack usage 
Date: Thu, 27 Jun 2002 20:02:12 +0900
> >is attached patch ok?
> >(in order to reduce kernel stack usage for ipsec output path.
> >ipv6 part isn't tested.)
> 
> 	i don't think your patch changes the situation.

why not?
a big structure, secasindex is allocated on stack in ipsec4_output
and it isn't necessary after calling key_checkrequest.
so maximum usage of stack can be reduced by separation.
(i'm assuming that esp4_output uses more stack than key_checkrequest.)
actually, stack overflow i saw recently is almost gone
with this patch and one for wd.c that i post to tech-kern.

---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>