From patchwork Mon Mar 1 16:07:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 388675 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3565084jap; Mon, 1 Mar 2021 10:00:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgvveKqawTxev1wqBf3xD/+ACni6k7Jmw1dX+l/1gQWBpaRvli7QLTgOAB+kaASmxXLECR X-Received: by 2002:a17:906:260a:: with SMTP id h10mr17364939ejc.392.1614621611442; Mon, 01 Mar 2021 10:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614621611; cv=none; d=google.com; s=arc-20160816; b=hXgl4P50x5D40hw0nKp5KsGhDoLS/9rtLcwd63uV2TSOKttgc2NEOQuE9a4WXOa7+F Wr6RwTMlXwZ9qLzOSz94Fx1OS8Um3nFWTgpueJBXdSEn+aNAaZic4frfT4V/KkLwwYGb adVtv7lSIjmlid1spBsKUPFtQdD2pWyKFLYY/cGgieT5vHWkCpaTxfy+7ud91aalr/Z3 oiDtD+nZDOfPON+AcxCL9Vc9Px4YuLaJ27drRqMuHe2xSlSoupvl3OCEZAnPMXxCOx4x tHFNNmlZ8M2XT6Xe0ZJkwdkIlNfp3/DRNgSVwbVBs04r3MQsFviRql8vSnBZNiBNYDoy OzJQ== 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=uYfWYl/n8UedLklejIht1lQD0ogCfk22FChs5iDJZ4M=; b=FH+D8Tvwrpi3L8NebLVPPODKlRVeX70lG8n04ENtyF/T8HZT+CW7/ln4pA4p+yJ9/B DqozI0Dj8yQVREkTfBu/dZEbwucD83XjbXzDywPNsIiw7OtqW+9B2Ihn82k2YIxyzMQt u3zgsU7m8EpOvUloW5CieuPdEyQw+x/+Pp0HK281lhWmqKB2xI+Yu9Y645zxYYZP9Xgh 7+C4XTqzIPzLVtCTbIlKBDa6/ld4wwY5HgxuDXW9tNChPnhQN+OF3bi5uZPjV8didqlJ QDRozW1Q9fsgffpcnHtPm16VCoiJmQ4/S1BzXnsgd/FUygXgdZaHUanX7WRuRD7CXHxJ cWQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GZpjGLj8; 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 c10si11176187edq.212.2021.03.01.10.00.11; Mon, 01 Mar 2021 10:00:11 -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=GZpjGLj8; 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 S232396AbhCAR7j (ORCPT + 13 others); Mon, 1 Mar 2021 12:59:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:49648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236508AbhCARyE (ORCPT ); Mon, 1 Mar 2021 12:54:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0E67264F1D; Mon, 1 Mar 2021 17:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614620946; bh=Jybc4OSgugDEd+WnNlYBs51KPhRzswDmRbeEr8mZtRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GZpjGLj8FWB4nswArVeyBzL09wlqgPV5GJl6nbrJRhqa3Mb4yqWMfvuVuArDn+gMq tNSsTn9lo+4oSuUeJNSqICuomINjF9YbxFAKEgf7CHspuKB0RT9ciODHkReNtgDONU JCgxd3Cb2WTvXYlZ3aq2p361x9hQyrPJBFYOcDP4= 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.11 297/775] ubifs: replay: Fix high stack usage, again Date: Mon, 1 Mar 2021 17:07:45 +0100 Message-Id: <20210301161216.303024093@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@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 79801c9a5b874..0f8a6a16421b4 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);