Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6815391rwn; Tue, 13 Sep 2022 09:20:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR74Ve4S+XxoFyU2BqqhScQT1x7ka65XLHN7+VN3t1MBmJ8WrYQ37bFeEyS7qcVgHQFrUunw X-Received: by 2002:aa7:80d0:0:b0:52d:f9c6:bb14 with SMTP id a16-20020aa780d0000000b0052df9c6bb14mr33582489pfn.57.1663086016842; Tue, 13 Sep 2022 09:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663086016; cv=none; d=google.com; s=arc-20160816; b=DO5K/E6aW2ZNhtt32rgfaN/gCRJ85lsDvPbEjyI1ur7iQsemoHs2TsEshXmVjBCzJR 2GquGYm1LX7gxZkWYnRpdW6KcI3TSIuDOVZg+voi8Pk0JGoYNL1ZFztxNbfs0+oqpZAs 6yceTp5ocIei9q0Pxv2y8xaZER5q9LlucWhBZXD+D950ll5GBJVAlOopg4KWBPNIM7r1 x72yHxxVxP1UpMiQWc5XWfrWycxJb1E5JYaRTQ9tN5OdV8PkFO3PK+HEwsrAkmISUBSl /UySInAP/x+1J75mSadi+nqp3ryjVO+P6e2D3h/ZF5oJNGHAjUBvgtm06tBQ0DIK6x+3 YroQ== 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=kBFSE1mC1xpcyQY+4/GTJ8sY1dpAZ2fDMkBdJOS56I4=; b=iTP8MKZmtG74hGXwT6yPAQpdHU0RfBLtoG+4S+LuBHUti0WIQrkoUV9qK3Be9SuA1W jEFedESBhFl1khefaLFM9E70Ufttn3utTIEZ5wPUHc+wFyLNSO4O3ieWDhhqMM6Dtbw6 DUxR51C5Vq2QUZCbMmrFUko3Ds0DYpG6ayvgESkWjHm/Q8lc96wJJUBo4g0jttFSVpsn jtJ1s5vVIZkdWoI5XZJP9TGt3i+CszKmOKADH17h+fup0fahHo3EW1KJ0UmKOF+GUvgp Odaukw9wIAVtGXTNP2jiodncEDrSmnjnbNGD63D3JYukMeBYuK4BOkFMVpKoTctrocc3 SAXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pMNT1uVE; 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 y5-20020a63e245000000b0043439e42c1esi12478610pgj.380.2022.09.13.09.20.03; Tue, 13 Sep 2022 09:20:16 -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=pMNT1uVE; 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 S234993AbiIMPCG (ORCPT + 99 others); Tue, 13 Sep 2022 11:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235226AbiIMO7d (ORCPT ); Tue, 13 Sep 2022 10:59:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D55696E4; Tue, 13 Sep 2022 07:29:02 -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 8053FB80FA1; Tue, 13 Sep 2022 14:28:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDF07C433D6; Tue, 13 Sep 2022 14:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079285; bh=sDaOvwr6YJekxpEPBn7NfFtwuiIo6HkgI8ymFIIvqUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pMNT1uVE0g5KB6aOEBRP0b5F23YaaAE3XnPH2NR32X/93Enb52zS+2W6V9eQjEMzo kU5VXnTyiTo/xSOg18VkhE7oLrQKwAwyhVi6JQOsoIKlq3ia+Zm5kpLqQH6VsZN8Nu Dc068XZvhgmISMWYJy/uLYgIF04FnuWL2dYGPbyY= 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.4 074/108] arm64/signal: Raise limit on stack frames Date: Tue, 13 Sep 2022 16:06:45 +0200 Message-Id: <20220913140356.809652708@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140353.549108748@linuxfoundation.org> References: <20220913140353.549108748@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 f6d3278c1a4e0..92afd44db9dd8 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