Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp955231imc; Sat, 16 Mar 2019 23:08:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+LnwBcezAA8djv4wpZ3Kl+jx6wN4dBQCCiVyLRdmhcX7NHsVqImjYUg55uUZkhed72hIH X-Received: by 2002:a63:5741:: with SMTP id h1mr4347368pgm.148.1552802885913; Sat, 16 Mar 2019 23:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552802885; cv=none; d=google.com; s=arc-20160816; b=KBdq5OAT953qK0s0+dA8PvccCUHDuU/q9gkRF9mFNoaXal0tHEORe2YumLIjoO7VPQ iO1fxE5zXdgbFAIKvI8wDV+BOciONZVbATgTTCl/SZSwRbc589/DoW6vvKzxfho4yok/ pckFkcKZytwUYYsBcciFx8Qc3xOa32s4Lgk46+FjVOrWpx7mP3fLycLJoQPf2YS2/pdj PujHD6foYq7csEh2XuLM2thLY4pM0FVFm6vlhp04d3hu/FtPJgJQKxMwBtx5DxwGHJr7 P6WNla2GSVgDQDjUdgxsOqIUJh4xuOrkabiIEYBW3oW+fmVsUPz6T2Vn+TyYKK+q7lwv zStg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=HfE+rjyzdDhxR0cAYbGu1CqFpdkP6z604SA1D/opXnY=; b=q5xGIMlcCEoB/UtlnYWCcLY2xhWtOfKojrnP8mCLwC4cELkEVXPVbnjr9lL8MqaB4Q PjPND3LTk6waBwFo51NiKhydOsX6FUazU5CAWKAtyfCSn+JnMlTGNAaqlkPYhKhZPzKu UpFM9VHBPq0ufGQPf9haESssug32c+S7aOABF8kZNOFpxDCaEWUWjFBTsddzaVdYwakR yTVKXbvuFePnNio1FGJWN/ribGyGI7RGRYvfSd5h6LrqS9jRpvWibknBcHFgZbNu3gpX azokPOkmd9TZ263dc0kPcEEnFNMnOkCBj4sTbHrv8yXCQcb1iqZ9xdr6Dy2POJd8YrF0 YtOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=CfuMZL96; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si6255071pfi.227.2019.03.16.23.07.50; Sat, 16 Mar 2019 23:08:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=CfuMZL96; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726599AbfCQGG6 (ORCPT + 99 others); Sun, 17 Mar 2019 02:06:58 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:45378 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbfCQGG6 (ORCPT ); Sun, 17 Mar 2019 02:06:58 -0400 Received: by mail-vs1-f67.google.com with SMTP id n14so7648701vsp.12 for ; Sat, 16 Mar 2019 23:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HfE+rjyzdDhxR0cAYbGu1CqFpdkP6z604SA1D/opXnY=; b=CfuMZL96GHOtg+wbLz3K6Be5Zm+2FSvuJpbkbn3lZjQWOwfxT3xatqRBP9BcxZr10w m0DpZuCf2mTCcZzpUxOYhFMjErDkRWRNlHRShjwadkbRsTeMY3uw4+A9TiWUpzRxl2Jx Uzr5j2kXdKLPmNAS9u+YXEdCaph8xyPkkUkmNSMvg4TX09kfgwR1DZUUCTNeMChBaOlw 0nlBHTS+rtcycpbgQOEdJqMITjUWMIva1Qnj0ma2fmw9R7OvUEohku4O3tLACDUkKWpd JgV3VLUSB4Gj712xcQcqLRtK2EKLMD41lNQkNxcNhQ4a3HNovdXfc+deo/D33Gi/DlVW tN0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HfE+rjyzdDhxR0cAYbGu1CqFpdkP6z604SA1D/opXnY=; b=l7xFikk87dbrPiNoWFb+S080m95uQ1c8wW1f1UnN3wT5ltjP+xb0kCvnj+bjZPT+mo wJ3wmdKAEvJd640DXJVya/nLhoUyqaXsMlPXqm5woC3LF73pdRW6R1ZaFPOFSMYD8Uom jRsPnAAsn7bycT+3JzouriVToq2Z8Q5fq2lD7w/IpmsMx1vMHRVxQDoCJ7tlqh7uIcPM WrVyWcSdihNXfMHZ8gsPgTPLqFc7PJjgzYcbgMaYEoEgQag1DVFmAn/X1NhK0u3JLEno RhxKwFDDYwhwJTalFZ3wevWm7AFcRSdZmyH8JmDfX4FF58/Xj1eW62S/IGcjLCXmEBve ZLsQ== X-Gm-Message-State: APjAAAWBokM4QE/A9rybAy93bcG0Tsl9g28gfeu6dmepwVxXmkzBHNTE xXslsP2T2aLUVIMNNXpAVYg6LTFfEjvvYJb/T3B4OQ== X-Received: by 2002:a67:f8cc:: with SMTP id c12mr5983786vsp.136.1552802816812; Sat, 16 Mar 2019 23:06:56 -0700 (PDT) MIME-Version: 1.0 References: <20190314090951.840339-1-arnd@arndb.de> In-Reply-To: <20190314090951.840339-1-arnd@arndb.de> From: Gilad Ben-Yossef Date: Sun, 17 Mar 2019 08:06:44 +0200 Message-ID: Subject: Re: [PATCH] crypto: ccree - reduce kernel stack usage with clang To: Arnd Bergmann Cc: Herbert Xu , "David S. Miller" , Eric Biggers , "Gustavo A. R. Silva" , Linux Crypto Mailing List , Linux kernel mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 14, 2019 at 11:10 AM 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=3D] > > 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. > Thank you , Ard. I will also revisit splitting that function to further reduce stack usage after I finish tackling the fallout of the new testmgr... :-) Acked-By: Gilad Ben-Yossef Gilad --=20 Gilad Ben-Yossef Chief Coffee Drinker values of =CE=B2 will give rise to dom!