From patchwork Thu Jan 14 21:30:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 362877 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp860935jap; Thu, 14 Jan 2021 13:31:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwq4S9odnZBH6KQ02SmTp6QY3Nd3rw7lrkPnPks79woHMC8WKnGnjmwbXdTpFd+d+lddZOt X-Received: by 2002:a05:6e02:10c3:: with SMTP id s3mr8510134ilj.269.1610659894572; Thu, 14 Jan 2021 13:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610659894; cv=none; d=google.com; s=arc-20160816; b=zwznFIbMp7taicY7rn46nNNmWR06v/WV7BrO2ymEF3nyVKUwBXmOt9n1/AXnDZLtKs icZb9uVGSZXpc0AJLOTADkOt8xiNskPjBZqZkJuOuh3W6UtIa/lduhk8iRSEtoBK3al4 Zg0yIIVHGy6Z4OcLnOQkxKw/fAKvxbjwZyTrMiHqp/uz6m3wlaMdkvWd14h1J+HFoAMB eN+AevKnHFC5EMTTcvueaFicV/D5TKJVFUrT0JLwhdCtVGYFeMQLG8/z2hyqDsfJPlzz 4jiNy5E3TdoFbObfOjhL9gSQL48tL7mJrvXI4VZKQyZ2oFEwuEvA0zmdtpZr5Y4sr+ga gUtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:dkim-signature; bh=311hbh10yIEFinauAyJSKWrA6t36ruskTU2HY66wx6o=; b=FdBfNPl2o3I9lskr+gMAnuT3HNaNEtXvtoeV2rgHE+OcafMo32nIkGJxiD8kyquxpK 1Cf/Tx9qIWtVWnJ7S7FFI1H7UAvEiyvz1S6llPkq8QtQRnWGEliNEpFB6TsB6R6qi2ML i+56IxD0hCjS96mgJKdeI4Ul8aF2FiOY6P68JqNHltcItw7vOPW459kEFcKCP0O+Psne 1zYqKGNFdLkSOcyvNhkKiYtDmbqGqSAQgHx86YzQLTJAST8Hjp9snqx/RXpkP6hMwYIk nmonn8sVEV/Az77xkfbOueb956KC4Zkj1BHfpiXWs25BL0jcIm201CGcOMYMu8pETaQS MfWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DxussS8E; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=tQNkbEvx; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id q20si4083788jar.10.2021.01.14.13.31.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 13:31:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DxussS8E; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=tQNkbEvx; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=311hbh10yIEFinauAyJSKWrA6t36ruskTU2HY66wx6o=; b=DxussS8EmGuM7JdYqMfzcQ/y5f 0x/AimdmN469ygy/91VvxgL8GqxCy+61FCxYYWLcdAj3Zf0MbM1bxXBdO1J+uybfkxXfBPGAr18N7 vrCf+whsinGIcBhQkUOCl5vWgjttNc8qdezIVevzsoTJ5WzN6jfl3x6o9ssYP8ZOqKzyjTeFOqRm4 InGdAciY601+5DMI2W7Q72B1VldGRewMY9ML1fBKzHMM930vQ1E63K1O6yEFoYXDZLTygC2Met2Jn 5TllXlOEi26N3OSeZk8EvT+ALBQSfF4e/k8A7bPgvA0huiL0FoG1DEQtvMWEYw6sQ2vwprjWl0D5Y hqrYaI3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0ACL-0006eT-6H; Thu, 14 Jan 2021 21:30:29 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0ACI-0006dd-Pi for linux-mtd@lists.infradead.org; Thu, 14 Jan 2021 21:30:27 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210114_163026_933551_3AD8B177 X-CRM114-Status: GOOD ( 11.82 ) X-Spam-Score: -5.4 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wang Hai , Randy Dunlap , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-mtd@lists.infradead.org, Zhihao Cheng Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.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(-) -- 2.29.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ Reviewed-by: Nathan Chancellor 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);