From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF300C43381 for ; Fri, 22 Mar 2019 13:04:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C7D220693 for ; Fri, 22 Mar 2019 13:04:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731009AbfCVNEg (ORCPT ); Fri, 22 Mar 2019 09:04:36 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:49502 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730587AbfCVNEg (ORCPT ); Fri, 22 Mar 2019 09:04:36 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1h7JqM-0006GC-LZ; Fri, 22 Mar 2019 21:04:18 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1h7JqK-0005eV-88; Fri, 22 Mar 2019 21:04:16 +0800 Date: Fri, 22 Mar 2019 21:04:16 +0800 From: Herbert Xu To: Arnd Bergmann Cc: Gilad Ben-Yossef , "David S. Miller" , Eric Biggers , "Gustavo A. R. Silva" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: ccree - reduce kernel stack usage with clang Message-ID: <20190322130416.qxpznh6d3z6yhppx@gondor.apana.org.au> References: <20190314090951.840339-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190314090951.840339-1-arnd@arndb.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Mar 14, 2019 at 10:09:44AM +0100, Arnd Bergmann wrote: > Building with clang for a 32-bit architecture runs over the stack > frame limit in the setkey function: > > drivers/crypto/ccree/cc_cipher.c:318:12: error: stack frame size of 1152 bytes in function 'cc_cipher_setkey' [-Werror,-Wframe-larger-than=] > > The problem is that there are two large variables: the temporary > 'tmp' array and the SHASH_DESC_ON_STACK() declaration. Moving > the first into the block in which it is used reduces the > total frame size to 768 bytes, which seems more reasonable > and is under the warning limit. > > Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support") > Signed-off-by: Arnd Bergmann > --- > drivers/crypto/ccree/cc_cipher.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt