Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp594070pxb; Thu, 14 Jan 2021 13:34:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzXvWVJjRac0SCsTLRdPY9gqJ7kUB60XqqkcYreesinndqM3xIkpEYBkdaiQDtorjcHrLA X-Received: by 2002:aa7:c78c:: with SMTP id n12mr7251440eds.363.1610660057598; Thu, 14 Jan 2021 13:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610660057; cv=none; d=google.com; s=arc-20160816; b=frI2ml71wS0Qxv/pxM7/ScbCUwtcnfjd1e7w8LVVQY/tS0+KMuOI+2Md1xNdefx8AO haUEAps2beHHYaQdK/OaIhdP5kFqxo0fEJjpbqyd6dp4PzufsJE0u3cFtDiz53nmI1Zx Y9h4IcWecoVHmUtf+uZ8uVT2htFmDz2gvzkZR+2PR6NpL0OkAcK5ExkPeIfbOUXA+5oa m6hDz/EKnQN2KDQhKwMmTi+GgDOY9EGrcntGuqqnqFl+whpqTAcJ30lxvTr4YnTs9wvW ZlYU9gFNOCaHcEFxxSxk6kKVffbTSvoSMuxJDi9OGsKAmt7rY1GzWuQj5W73lAUhGCFL wjBA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6aXl3pZMOc0qS/PHQG24WoGUNNGK8gfse7mlKSfmJBk=; b=gkMrGcHxipYEGFdQPI6PF7wZ3JB7tXYkxm3WxuE7172CojDWMHOy39leQSc8Jd3TXR lBSi4XEmCbCppCWg4PbqsMphT+MaluXcuXjT6jboPIZuDJ9sHlpcDyywG0mTi74A8IhV +uOe8/sxTJrqQw2GIdeQGKZqgOOEWItMYREnOiEZHTkjXNZkbCtEfSfjDky9a5pg68sZ nmqdDrxlLXb60v9AUHTumiJYSjs03kOH9ha/AhH5JkOcdMOAd3TwRADYuYu08djYkuWG tvIaF+nmR6yZRqKW8ZgRtef9yz7FqSI96jgL/jRkj3nAH4YDQAeF06lgWkfrfs/0LIma Nl7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tQNkbEvx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si1578677edi.338.2021.01.14.13.33.53; Thu, 14 Jan 2021 13:34:17 -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=@kernel.org header.s=k20201202 header.b=tQNkbEvx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbhANVbc (ORCPT + 99 others); Thu, 14 Jan 2021 16:31:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:48728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728575AbhANVbG (ORCPT ); Thu, 14 Jan 2021 16:31:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 35C8523977; Thu, 14 Jan 2021 21:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610659825; bh=h8P7pkHW9enuPNWSJCLbaVlV9uAnMB00zjxhwDU+PqA=; h=From:To:Cc:Subject:Date:From; b=tQNkbEvxLFPw5FoBp/nUfgnpQeUHoD7rTUMpGX7Qz11m6B6KVT4ZSqjk54iobrWyF 6V9HTeFO4i8XBoUCIjF9fRGXt4Pae9tWLguMcMBakFEtp+PNYUtgeCok0oCuOtEbqH zndAFzox6Wg30xzRxG7i+m/ivNfs5iCgjiRkUeHVTDAyGN+pOu24/szSjoqRbxEKvW Eecl2SFrbo2Bolr8F1huq89l938kE1tk5GleGaf3liMDcXYh+duSQ2A4K/q/6jItUB kwYWGN2WZTcbgrwxNyCM1L4FeQvpqDq/1XXexXWnNw/fOTuvcXfmoMuzPzgQFBvkqo GGjz+RBMtaTWQ== From: Arnd Bergmann To: Richard Weinberger , Nathan Chancellor , Nick Desaulniers , Eric Biggers , Herbert Xu , Arnd Bergmann Cc: Zhihao Cheng , Randy Dunlap , Wang Hai , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] ubifs: replay: Fix high stack usage, again Date: Thu, 14 Jan 2021 22:30:11 +0100 Message-Id: <20210114213020.4108485-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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