Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp520164pxb; Wed, 3 Mar 2021 08:46:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGNhE1aZstiQIE6BKgoRYfE6jGGOcye+6TupMM6MB3nSw8VN879LxZIuGWOgWuMO3bm3h3 X-Received: by 2002:a05:6402:1545:: with SMTP id p5mr124086edx.155.1614789995831; Wed, 03 Mar 2021 08:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614789995; cv=none; d=google.com; s=arc-20160816; b=ekW2fdWxVBiZLyspYEOY69VSdfXOOmBEhk607ufbV5Viqh4NzCqeq+hLGy+jGUS4qG xkD60IRjIwfQSNTuH/H3CHGpIQBE4TL9LGeG3hl0O+A5jcii+vmE3M5j+6ddEm2nL2JZ OHTMcXg/xysXXBdl19Z1ZnABhz8dLdNrtWIMYYzXxKLFMbMgLZoxDdUoivA0E/vqZofn AxrqAWJ659mG5hVbYoYnA3V3KX991IjXu2Wko5PGEltP0utJZJ5l82KnUSkBeN4ZfZgA WeW/u/50mu0rGcXfFJRJZA4EKyJarw1SnuVxkt3Pp9mBnCCcv2LG/ztQpoBsaHJtrmVJ 4RHw== 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=hbUj9mhzopLeO45Y2AYEUFOy4D6+FaDynKuj6fbxuhphs/fGP5Pn9jMUTJ6DMLy/O7 GWnd0DoZpLZ8IoVrafBP1lnmPBZPZNFoW1xN2bxm/8ysfct5eNkyZfRlKe4S0sXIw9AD /yx8ciLs7ggS7g3qtule1rXcKjTGVJgbjeE8CeQHa+sJgPol3oE5N8wmBHdThWHRHzhp Zi+Bovgo7dfLod0a0vTJtW8QnEjEL37jxkrgiANpYHQ1EVGurFkEiTUlKePHZOUk2pLS 2qP7eSjOkLSQPYy1u8b27yCAILYS/alBLxHF2zUz9QU4URll8lgHstJY65RU0kuvbq74 qAUA== 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 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=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 c12si16942855eja.386.2021.03.03.08.45.44; Wed, 03 Mar 2021 08:46:35 -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=@linuxfoundation.org header.s=korg header.b=NShkA4Sf; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376301AbhCBAWg (ORCPT + 99 others); Mon, 1 Mar 2021 19:22:36 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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); -- 2.27.0