From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FF67ECAAD8 for ; Tue, 30 Aug 2022 17:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231963AbiH3RcB (ORCPT ); Tue, 30 Aug 2022 13:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbiH3RbU (ORCPT ); Tue, 30 Aug 2022 13:31:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F97A15A202; Tue, 30 Aug 2022 10:28:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2EC03B81D1D; Tue, 30 Aug 2022 17:26:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC190C433C1; Tue, 30 Aug 2022 17:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661880371; bh=gU0OH3XIhcADfT31F2l53Sglvesw+5FFs/Nss/7JBTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JOVfmauowjA0ckbgiO/BU/0E6X6WoVX+qrI6GuWQ76pLMIyKLHlxZJoUYyiiuetPG 5nl8WEGVaCmT96h3rSowEqsajggPdbpVkBVAytB2yrLKyfHXnU3ZN4pfjWU6U9ij8A QfBWkJL7pYSf2Y5xYQZxeob3ghEjHGX/mSA5mFG+F/awo8/4C+oI9lfDtQrp/JyMHt q0RSYU1ycfhHHjEuJRjoGC7lErqfa9VBrd+weqi+0a6QBO1InoCSI8ssYpcIqEgDuq wW+BuI7HwEWlnB0U0wLixpNS5SFBH4ExYkQjmd5DuCLmoT+LphTWhzUu7DqhTD2hdM JM98YhfZ4Fkvw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Brown , Catalin Marinas , Will Deacon , Sasha Levin , ebiederm@xmission.com, elver@google.com, mark.rutland@arm.com, david.engraf@sysgo.com, seanjc@google.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 07/10] arm64/signal: Raise limit on stack frames Date: Tue, 30 Aug 2022 13:25:38 -0400 Message-Id: <20220830172541.581820-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220830172541.581820-1-sashal@kernel.org> References: <20220830172541.581820-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Brown [ Upstream commit 7ddcaf78e93c9282b4d92184f511b4d5bee75355 ] The signal code has a limit of 64K on the size of a stack frame that it will generate, if this limit is exceeded then a process will be killed if it receives a signal. Unfortunately with the advent of SME this limit is too small - the maximum possible size of the ZA register alone is 64K. This is not an issue for practical systems at present but is easily seen using virtual platforms. Raise the limit to 256K, this is substantially more than could be used by any current architecture extension. Signed-off-by: Mark Brown Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20220817182324.638214-2-broonie@kernel.org Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index ca565853dea64..bd9b36ab35f0f 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -101,7 +101,7 @@ static size_t sigframe_size(struct rt_sigframe_user_layout const *user) * not taken into account. This limit is not a guarantee and is * NOT ABI. */ -#define SIGFRAME_MAXSZ SZ_64K +#define SIGFRAME_MAXSZ SZ_256K static int __sigframe_alloc(struct rt_sigframe_user_layout *user, unsigned long *offset, size_t size, bool extend) -- 2.35.1