Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6895959rwn; Tue, 13 Sep 2022 10:27:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gbdJwsNDtF9OLgkIEWO6IZBsiGYylEi9DLnDYZYRxgCkEvpIYIcoqrFzsIQr0DhjkaKqs X-Received: by 2002:a17:907:608e:b0:780:b1f:8d8e with SMTP id ht14-20020a170907608e00b007800b1f8d8emr1973953ejc.568.1663090060919; Tue, 13 Sep 2022 10:27:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663090060; cv=none; d=google.com; s=arc-20160816; b=GQSFrgv8X92k7aIqGgyxTibj6RoecqgTBAsykOgP8NQhT86MIZ759nsgJbo7FAOGKA KMtFs1FWklZwACSMTEcIhsRHhc+NRXT01iTi8cCqUIMeZ1zFJhKMXQLQ2++gLd1bHyLQ 29/qv5xPo2ZjIFcJOGTBo9JB60WELvHW32wNUYrrZecV2WMJYwz0jO4tmdP3ZXPAyLl4 CUfxoVGOULrRz1RpS1vDBE1CLqcCn8TBOc95QuHw8DiuCkSGz5dh75EdmBs6kJ2XxIvK uPA6+SCP75wzPdYk2oK18+N4Dm41Sxzq0bRlrbc4LS2IN5i0QrMRJhGY5Eb6vxQIoxt3 lemA== 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=J25fSrFT3G9cgMfIqGIXW6oFEOPrhqOlNUVu76Ep81Q=; b=Fb9np3rtu1x5uD+M73YKlQ74poWx19u50xB7gMkZxH+eqgTpm8JKkT6PjwHQMmGKrG xMFpknYAmYcQB281Zl4hRR87P5qGklJMtz4HsAHucy4oaA6dT6bxMqd+88Yn0da+miTl zvWcJ/LR8BBQrExmjVc8ezgZ9JuF+Oj9CwvwUMvlfV/1mBOFxwk0A+4fp6yWMrrugsvD F0B525D8FarhAQ1dsR6JTkUIR488i6Gu3t63beU0MpyU2F7bCvF8SC8Z8x4YFOD/byxF 41cNELYWfrchhs/ctkmQAGJDAHuBvcGCMH5DnNclQX2tEna87mvaqKNUK7gO7Erq4rAd di9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mpm+0I9L; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc39-20020a17090716a700b0077b08d909fbsi12898611ejc.53.2022.09.13.10.27.14; Tue, 13 Sep 2022 10:27:40 -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=@linuxfoundation.org header.s=korg header.b=mpm+0I9L; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231440AbiIMQz3 (ORCPT + 99 others); Tue, 13 Sep 2022 12:55:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231175AbiIMQyt (ORCPT ); Tue, 13 Sep 2022 12:54:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EF904E632; Tue, 13 Sep 2022 08:47:46 -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 A41B2614D5; Tue, 13 Sep 2022 14:22:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA1F9C433D7; Tue, 13 Sep 2022 14:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663078943; bh=HXfZo6doQzz9VapJaBP8Fx6rQF3F4A3r+CJnHaVGpWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mpm+0I9LexFUGOg+rKxT2X4r2+PKoXP7F10aqO7mN0StGb1mpLCWzgvIKGkELG/R6 o/N2ISG05PMKi+l0O9Wf1uCQKnl3nbs95UwCaQlrVFhmjglwYiZidXTMm3fwNNiFKn 5G9ntBg2WqtvwJrxaE1IqmV5Sx0Lwiq8E/6692KA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , Catalin Marinas , Will Deacon , Sasha Levin Subject: [PATCH 5.10 20/79] arm64/signal: Raise limit on stack frames Date: Tue, 13 Sep 2022 16:04:25 +0200 Message-Id: <20220913140351.279129063@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140350.291927556@linuxfoundation.org> References: <20220913140350.291927556@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 0dab5679a97d5..c42089ce089f7 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