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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56D6DCD37B4 for ; Wed, 4 Sep 2024 11:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7vd96sWgwoD+WwLCj2yQSkEGo9X0jP389VaQwuB4xI4=; b=YyQmv/U7FPsDV3vNFMWOLL5vtS XX/2SssRXz4Bm4ojvn/Bigj+gD7s6z1vaP4QUGMDjLAv7Z9wxhTT7b/QbCaOoLI2I2Dd3gyV1pdZg mVBmNFQn/Sd7P0HKWe4BpCWt+hAzcLgqvpy3uxNxI5TqRIsmcXtCguOcGNB4QkPFsxT5BpO1RR95j JHxjnIs3+TgAyAxMRaEH2LWc9CuMEgwFinaxh735uL+x2/OueI3jT2xLPYkEkAyyZDw52gAnjcALx HEybLwRO91L9mE6x1DeiGUkN5pP3m2AIOWx45AicfNt7I7aFFTKA63OAV6r1bDQxd8KRP5UcVNLbt Fep4hBVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sloRb-00000004DE3-23dK; Wed, 04 Sep 2024 11:45:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slo7k-000000047Jm-0cUZ for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 11:24:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60C28FEC; Wed, 4 Sep 2024 04:24:57 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2FD1A3F73F; Wed, 4 Sep 2024 04:24:30 -0700 (PDT) Date: Wed, 4 Sep 2024 12:24:24 +0100 From: Dave Martin To: Mark Brown Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Joey Gouly Subject: Re: [PATCH] arm64: signal: Update sigcontext reservations table Message-ID: References: <20240729144149.249096-1-Dave.Martin@arm.com> <20240820133739.GA28338@willie-the-truck> <20240823114602.GA32020@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_042432_255831_CF16493E X-CRM114-Status: GOOD ( 25.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 03, 2024 at 07:26:04PM +0100, Mark Brown wrote: > On Tue, Sep 03, 2024 at 03:18:25PM +0100, Dave Martin wrote: > > On Fri, Aug 23, 2024 at 12:46:05PM +0100, Will Deacon wrote: > > > > I suppose we could, but I must confess that I find this comment a lot > > > easier to digest that the fiddly maze of inconsistent macros we have > > > for the different contexts. Then again, all that really matters, I > > > suppose, is that we don't accidentally over-allocate the maximum size > > > of the sigcontext. That ought to be enforceable. > > ... > > > I think my best approach for now would be to try to wire up something > > that at least helps remind us that we need to review this table when > > something new is added in the sigframe, unless you can think of a > > better idea. > > It be good to add a selftest that flags this, that way people might > notice when adding things and if we miss something it'll probably turn > up in one of the CIs at some point (possibly after it's too late but at > least we'd know). That'd give us some level of integration test with > whatever libcs and other default software are actually doing, as opposed > to what we think they'll do. I suppose we could write a test that sets VL=64, SVL=32 and dirties the SVE and SME regs before triggering a signal, then checks that extra_context is not there. This will only work if SVE and SME are present and big enough. If we can run this as a routine CI test on a model, it might be useful though. Cheers ---Dave