From: Herbert Xu Subject: Re: [PATCH][trivial] crypto: tcrypt - reduce stack size Date: Wed, 25 Feb 2009 22:20:00 +0800 Message-ID: <20090225142000.GA4136@gondor.apana.org.au> References: <49A54C23.8090209@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux kernel , linux-crypto@vger.kernel.org, Frank Seidel , akpm@linux-foundation.org, "David S. Miller" , nhorman@tuxdriver.com, lho@amcc.com, kaber@trash.net, darrenrjenkins@gmail.com To: Frank Seidel Return-path: Received: from rhun.apana.org.au ([64.62.148.172]:37269 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752960AbZBYOUI (ORCPT ); Wed, 25 Feb 2009 09:20:08 -0500 Content-Disposition: inline In-Reply-To: <49A54C23.8090209@suse.de> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Wed, Feb 25, 2009 at 02:48:19PM +0100, Frank Seidel wrote: > From: Frank Seidel > > Applying kernel janitors todos (printk calls need KERN_* > constants on linebeginnings, reduce stack footprint where > possible) to tcrypts test_hash_speed (where stacks > memory footprint was very high (on i386 1184 bytes to > 292 now). > > Signed-off-by: Frank Seidel > --- > crypto/tcrypt.c | 29 ++++++++++++++++++++--------- > 1 file changed, 20 insertions(+), 9 deletions(-) > > --- a/crypto/tcrypt.c > +++ b/crypto/tcrypt.c > @@ -396,26 +396,34 @@ static void test_hash_speed(const char * > struct scatterlist sg[TVMEMSIZE]; > struct crypto_hash *tfm; > struct hash_desc desc; > - char output[1024]; How about just making it static? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt