Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4486465rwe; Tue, 30 Aug 2022 10:57:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Ox47SYo33c70/gmKLqZ5QjlsoLegiBM3EIOCZ7Bu8cSOPLfZ93zJBgir9rdp9lQJT9393 X-Received: by 2002:a05:6a00:23c1:b0:53a:9381:2987 with SMTP id g1-20020a056a0023c100b0053a93812987mr1714436pfc.16.1661882248656; Tue, 30 Aug 2022 10:57:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661882248; cv=none; d=google.com; s=arc-20160816; b=hKxz6kfq2T+tiQYgeVzCgkV/b30AvjZ4aNSauxPIkWEubvEKLliBZVkqYOd5ifkL4E rrZdA+I1ObUYA4UB10VgjsyXE3QQ30cxnl43cdsAc89ZSL5pP0KRmYTbqkt20pJOgthZ 7mTBVsYT86JrxO5cse9TX4HMo/LhGjUHmB/uxQQSl9Dit/PjxxNgQhfOXHZyBmuA1ehe Ct2TIMjLzEWK5BrrHk/YNdUvfdMr8Rut+PbGXM9yAgCRkzXT2JS6E/gTmmplxm7KBmBE h4CjC6VQvsrpCS29Z+8Bk1qKGoirzWwX4YXDgoetI1AeOSw12tqxDMZnGMlAqA39Uojl ZSKg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/ECrBoXRbH2poO3/BR1Btv2hRe4MR9eI0VbWUPgSPNM=; b=TsDvIznwCEA/NEjDgtdz06mWq7LyyTPzWa+V3VpvS2pMiqGW++3VV6qK1AJMI9JETX 4ZLJdQBfF8yzglFjTEimD5uYLIQDH/c9EwEjVPcofnq8rxJsCGXVYOYRVjOTUQtm7M0N TXH0Q0RxgJ35gu9vOgPn+KaUtpkyM2co0n5gI47EGPyaS4DMP/YhrrB8vZNIJDlkRPf8 LCzX4Pj0oSV4716TuiRTNhcvrHA2+KuZ9wT0HNs7dbWG+eh1rVdfba2yAWTOxZlLHUqy OC2RebcQDu+Nfkg2hjNALbsjvBNLeAORhDO/GHGS0ac/AHRyMrGiWSE3U3xngkXEbA2J PLrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EfFWpjCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a63fa07000000b0042b926349d0si2534636pgh.370.2022.08.30.10.57.16; Tue, 30 Aug 2022 10:57:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EfFWpjCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231355AbiH3RWT (ORCPT + 99 others); Tue, 30 Aug 2022 13:22:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231135AbiH3RVh (ORCPT ); Tue, 30 Aug 2022 13:21:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1575DF662; Tue, 30 Aug 2022 10:20:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id DD5E161781; Tue, 30 Aug 2022 17:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02D8FC433C1; Tue, 30 Aug 2022 17:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661880021; bh=qmmHo+XCKyEvqzJMxMcUvhPV//az47qcZ/1JnpnPPMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfFWpjCGG2p919UENd294qWKLL92kaTNnQ5M6v78ZBr5w7BEQ7tg97qzaWi4buKjE Ze5g6YkQdKGkVzIFFfHBHe8kELQ28wZXUGRwBUD7UcxsTTzoKSIPAP1ADveSkUHIIS 7cvP5rxdeQ80VlS3LyyYOtbUgWbc0/SYgnCqXqJCgnnmm6J+zrLvrIGPU30DPoPSwB 5xdwJB6VoSB3BaDVKijQD7J3RuDtG3eKjsiJ4kw+ZgdZ8NQzTOYzS1EWqFxeGZ2ix0 s5WLbRHPCKjRsXrOAQXv0wfscBcb5HfjGmZc9kE7e3nJfupG2aOLda0glmyd0l32BH 46WpuEhhhmVhA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Brown , Catalin Marinas , Will Deacon , Sasha Levin , seanjc@google.com, pbonzini@redhat.com, ebiederm@xmission.com, mark.rutland@arm.com, elver@google.com, david.engraf@sysgo.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.19 20/33] arm64/signal: Raise limit on stack frames Date: Tue, 30 Aug 2022 13:18:11 -0400 Message-Id: <20220830171825.580603-20-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220830171825.580603-1-sashal@kernel.org> References: <20220830171825.580603-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 b0980fbb6bc7f..118cc652468ff 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -91,7 +91,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