From patchwork Mon Mar 1 16:08:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388691 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3592754jap; Mon, 1 Mar 2021 10:34:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlaG4VGA+kgsEcgRACxDVLu3tkKXylQ/Dy5jf0czHs1C83QjP0ya3uGytMvr9R6wlsEk21 X-Received: by 2002:a17:906:bccc:: with SMTP id lw12mr14940918ejb.268.1614623656310; Mon, 01 Mar 2021 10:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614623656; cv=none; d=google.com; s=arc-20160816; b=wO7yQnoI6P1ptKTzz3E74LxU017VdXkCkSJKRyLKjN9izrzz1tUypqvIXCMmzj7viP ai/EgQA5Ws5shTdyn9MWYgKcglm7OgpJ2T2gV9+wR/yAhlZ0Gg6vOTvapWXsY6nqGx6p 4ut0Pp5UfSP90N9Upm8Bv49b3ls9g8d5WBsW1yLvdh6ZmS9Q9krzL+CSziaa/eT/SwS1 pQyJA++iggBItNpk1onGbUWDBu4avFVPpDAGCbp3fOWLiILqVVr/XgBultrxraNojys9 3XDl+Lle5baIAPlN91mTJkYMJP3NA8kEXHQ8yLdECiPGjBrUsn80NyNRM/XdhEavbbA6 2y1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Yh4FLbWo6zcja+z+BM3MBnCy/z/GYGm9tTWDGjvhUrI=; b=m8+4skp+VKmjdKjo5oXliGuAiMK0sPYU/koWheFhnQOqxD9Vc7bTf7m5gosty6vXeS r9eNqqGkEqnDMwbk4+KXmGNk5uE7SBGVou2Ke/Epma7tStWMO9+A2Cy7n+B+aqBsbkUH sxjtmtj3k7vyEcagIo7zNTdaMqKgOcMYKyTNONCzAAN6nOcb6uq93Fgy0AGYu679Nuau T/gnxD2zS+gXrRaQ5YtCducEsM+MZtVeqqwhPOez30rdHw/dRAXf3E+bfQHjdL2Nyxlu XmTMJgDkGCDTzusBMaP0FABUTMsBJihxJYc7+Gl3TnkE2TqiF75EzzjDmQteWiVWSHQD U7gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NShkA4Sf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si11447952ejy.191.2021.03.01.10.34.16; Mon, 01 Mar 2021 10:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=NShkA4Sf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240120AbhCASdS (ORCPT + 13 others); Mon, 1 Mar 2021 13:33:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:43174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239870AbhCAS0U (ORCPT ); Mon, 1 Mar 2021 13:26:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B885D65031; Mon, 1 Mar 2021 17:14:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618883; bh=RWZ0t2C+ihDUtut14L4NWLFD3jQigbJcjRCa8RDkrA0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NShkA4Sf57a4Y6FlfH3O3/JAS1P9oa6eYJ8bUPLsKQaKJAyKDSjZDwMHKXOeU7x1Q mveP/oMZqc7AYiknDE9wLSU5pA+RGckOo0ixHYp5Sihhex4yna2g/ZP55PQE9zm+sV DzbnQGvuxj5l2rxERlC4Z6rPaBj1WEMKENgfeNDg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Nathan Chancellor , Richard Weinberger , Sasha Levin Subject: [PATCH 5.10 252/663] ubifs: replay: Fix high stack usage, again Date: Mon, 1 Mar 2021 17:08:20 +0100 Message-Id: <20210301161154.293938550@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 410b6de702ef84fea6e7abcb6620ef8bfc112fae ] 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 Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- fs/ubifs/replay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 2f8d8f4f411ab..9a151a1f5e260 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);