Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp199141pxb; Fri, 15 Jan 2021 10:40:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+nzOVS2QlCxlxJ5a0v9H1iTKTUKA8leMKKtw4ZBQmJJG9diacwHbtlIwi0JKd4k01fDS1 X-Received: by 2002:a17:906:3101:: with SMTP id 1mr10060366ejx.115.1610736055855; Fri, 15 Jan 2021 10:40:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610736055; cv=none; d=google.com; s=arc-20160816; b=w9Lno1SqD5JaiYjSmjELZbR7dKAmvX1j0d3cT468f2cU7RsaM+O+RCHSWSRGvKH1Om btGE5oesnk2sEv63Ai8jmtNwS0VtOff0eLS/1zBAMYsbp8+mIGE0m+NiYRUHaSUsAVMA FLL9atVS91ovlJRFbLa92EcZhHd3dhjpVV+qkxX1fxgMoFvOtHSROVioECa4hexmozKq 0AO447buCZ4hwws80TYY46FIp7VWRFrrd3bPauhGduCHMJX+tQoMebyUZR+hU+u63adG n+VZmZcCN2U7WKdzfq5imUzXEyPowu59LSTC4f4LvfZpFlH3JVpZt4G2s/Sg2ou91LRa LL5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lpbx5IuXtyrVJCLCdm7CWpFGzxLbsst3nNSrDQhdHIs=; b=QJuoMI1R454gdkW1Hf75LeQa+oaPhX3enyExZsA5SKi1+movuacdLTVc9El7+d7dU3 7A88IICroVp7msGDuLgT8sF3lb1/WfuoitBkr00Sl6/QrGTuG42yV7DMRLGo1sfMHlSj hTUx7/2zSSM73rAyBn2YamV4jiuHkwHrJiCHjckDrgN2D6fbT8Uabyp5LOlpUXpYWHzI FU6Z4MXO4KvwahvXgKUsuz82lL9THOTREj6Lt7MGozlYXSbG+fj6SByKj7L+JdHS/d9N 4XKrVLFXjPKGQ7qR13e9kgLKpfAt2qB2wHP2HXY/aQ0Whijs4Mhk5X6ZXaAj6fj6X02a 8uwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FinYw/4W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si3028917edd.134.2021.01.15.10.40.31; Fri, 15 Jan 2021 10:40:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FinYw/4W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387461AbhAOSjI (ORCPT + 99 others); Fri, 15 Jan 2021 13:39:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbhAOSjI (ORCPT ); Fri, 15 Jan 2021 13:39:08 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBDFFC0613C1 for ; Fri, 15 Jan 2021 10:38:27 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id b64so12616706qkc.12 for ; Fri, 15 Jan 2021 10:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lpbx5IuXtyrVJCLCdm7CWpFGzxLbsst3nNSrDQhdHIs=; b=FinYw/4W+EFazsX3IViQ+0YbMzK1U7X95ughL7z8odtwPvAuWrnTVovnSbtPJxfJf0 EzxFWoyVEBIIUvbYZdkF/LF2iNJfbQg+l+b1nejyUxvp5EXTpCPcdo+FVVLeO029T2zs tmYRaRBOEA21WO5fdfK4COrO/jFfFWSO5bzaAjCoJO/obgPDDXonH23GiST5JZngPA9d 0rqE6Qts0LpwLpoYNvQqDGR/1h+ZH17qxPHESuiTOZrxFhxQuKjEKjcFtMCU4GPoKkTX KHKd0QQXw4KUnhB0LOwlcomeNxazLN86wtDyEmu62mbGLkWVkm0GY0Comd7eb5Do/Su1 0Z7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lpbx5IuXtyrVJCLCdm7CWpFGzxLbsst3nNSrDQhdHIs=; b=Fj2cPMpZdq6pBnTCfVgEOZLOv2Hg9G2N8MP2mGscUvayWy1JhvRKo+jCQs1eR6i/+J 03qqQurXoOxWvUirtAWh5rvcZP6s48y5A/Tr158ViSTeO11FYwMY0gq/ndvV4oxrdnYn NMbgM+LbGyjsV/Vv8do3QUNEhEt71awKxB0W3EgiSjMLPgQYLqpSRnbKpU+lX5D1q0VR b7PMB/LRPlLnJ3ZbwCd8HUnAL1FDaalEGXYWZvEZewVSG++CwM5DnzYhvQ1BEKbeKGD7 S3jvbIwJRwkbbtnmPEwMLcyDERyxeA8rqEEoNqZVGThzDrdOa6nDlJ4txrC2ZZbjyC0s sn3A== X-Gm-Message-State: AOAM533GukreOKQZZ1Y1vodvuN4LXOeuK71kW82lmH/NAY7G7hrUh74+ 0RC9tSCy16QgVG/451XoO/A= X-Received: by 2002:a37:74c5:: with SMTP id p188mr14103185qkc.263.1610735907129; Fri, 15 Jan 2021 10:38:27 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id c62sm5404885qkf.34.2021.01.15.10.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 10:38:26 -0800 (PST) Date: Fri, 15 Jan 2021 11:38:24 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Richard Weinberger , Nick Desaulniers , Eric Biggers , Herbert Xu , Arnd Bergmann , Zhihao Cheng , Randy Dunlap , Wang Hai , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ubifs: replay: Fix high stack usage, again Message-ID: <20210115183824.GA2641750@ubuntu-m3-large-x86> References: <20210114213020.4108485-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210114213020.4108485-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 14, 2021 at 10:30:11PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > An earlier commit moved out some functions to not be inlined by gcc, but > after some other rework to remove one of those, clang started inlining > the other one and ran into the same problem as gcc did before: > > fs/ubifs/replay.c:1174:5: error: stack frame size of 1152 bytes in function 'ubifs_replay_journal' [-Werror,-Wframe-larger-than=] > > Mark the function as noinline_for_stack to ensure it doesn't happen > again. > > Fixes: f80df3851246 ("ubifs: use crypto_shash_tfm_digest()") > Fixes: eb66eff6636d ("ubifs: replay: Fix high stack usage") > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor > --- > fs/ubifs/replay.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c > index 79801c9a5b87..0f8a6a16421b 100644 > --- a/fs/ubifs/replay.c > +++ b/fs/ubifs/replay.c > @@ -559,7 +559,9 @@ static int is_last_bud(struct ubifs_info *c, struct ubifs_bud *bud) > } > > /* authenticate_sleb_hash is split out for stack usage */ > -static int authenticate_sleb_hash(struct ubifs_info *c, struct shash_desc *log_hash, u8 *hash) > +static int noinline_for_stack > +authenticate_sleb_hash(struct ubifs_info *c, > + struct shash_desc *log_hash, u8 *hash) > { > SHASH_DESC_ON_STACK(hash_desc, c->hash_tfm); > > -- > 2.29.2 >