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 2BD88C4332F for ; Wed, 23 Nov 2022 16:55:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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=hQ9eSemGJFS0lO+NOTaxaoybqrywFajGUAVrXenUL64=; b=OZCIHACoTbkd3XXZHRzryU4PWG P3ubNsuHEuiHxDr0RUqIDRV5KAfV60NWIy0A7kd9j+l6UHpp3bZ1IfYqUSJ98Z3CU2QcLRyV5nx/N hXVRdBSKlSwN8XvjKO50x8EdKW4zQK/Yxq1wOEBr0Dk4dJxdxf5CxZrCOSAcrj7Pi/cD62bRysJ1i bFxhe5yStnxM6DD+l5Bv/LL+bUB74e2ftyoxOwr17OdwtSYner0VB2wP94dFey8vKg6IsVAHveGOF ruB2Gz4JoEr4+oqhiJXGOKHLxuIW8Aaq6AIkadJFXw45QygGOHQF/oX2xC76kz71AzdKN/XHuOgsN DVWWdUTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxt0I-0010iS-Db; Wed, 23 Nov 2022 16:53:42 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxt0F-0010hT-Ht for linux-arm-kernel@lists.infradead.org; Wed, 23 Nov 2022 16:53:40 +0000 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 CD14B61DEF; Wed, 23 Nov 2022 16:53:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEDBFC433C1; Wed, 23 Nov 2022 16:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669222418; bh=USaC7Tn/vpvkakHW5C3E8YpV1ImzuvpTxa7j+JgdLxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e1jhpsuppJ/oszwRPSHB4wqnREC9fI9+/zpqqYUMrdmuT2iXlQvI4DqD6dS2503uP +TsY1ExQ+fYqPdvieTlRov/NyO5sMhhMbnLng4fR9vgUkiuQXrP9lugY5P6IQKmBpy Ypyh0Ofdf1oEb58vcMjn4fCDTHDdb5QDR73v9KP3Q5UQNR26az5a6dzl6muycLx7g4 E+37AZpllrOlvlsmwNvlzQqrFWNNSQWup+R3CiSQXjyH2Q4cV439mFJbsjbhvt4Cnu 3rd0ICE/8FrLV2cHns/eYdMd5rE7JnQJsykXtjzP4rWHgEApyEfbmi8xzE/R3ed9oO 8ZlDHRyDa5Tug== Date: Wed, 23 Nov 2022 16:53:33 +0000 From: Mark Brown To: Catalin Marinas Cc: Will Deacon , Shuah Khan , Shuah Khan , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/4] arm64/signal: Include TPIDR2 in the signal context Message-ID: References: <20221031201736.894374-1-broonie@kernel.org> <20221031201736.894374-3-broonie@kernel.org> <20221114161005.GB31141@willie-the-truck> <20221115122225.GG32523@willie-the-truck> <20221118135552.GD4046@willie-the-truck> MIME-Version: 1.0 In-Reply-To: X-Cookie: I'm rated PG-34!! X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221123_085339_649853_76CDAD0C X-CRM114-Status: GOOD ( 22.13 ) 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: , Content-Type: multipart/mixed; boundary="===============0645248021419972414==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0645248021419972414== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EblCQMP2wfRR4C6u" Content-Disposition: inline --EblCQMP2wfRR4C6u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 18, 2022 at 07:10:16PM +0000, Catalin Marinas wrote: > On Fri, Nov 18, 2022 at 01:55:53PM +0000, Will Deacon wrote: > > So I'd vote for removing the checks from restore_fpsimd_context() which > > raises the same question we were discussing initially: should the check > > in parse_user_sigframe() require an exact size match or instead truncate > > the structure on the stack by only copying a prefix into the kernel? > > I'm actually warming more towards an exact check now that we've spoken > > about it a bit... What do you think? > I'd go for an exact match as well. I don't think we can expand these > structures in the future safely without an additional magic number. > I tend to agree with Mark here that parse_user_sigframe() should only > check the magic numbers and set the corresponding user_ctxs members. We > leave the exact size check to the restore_fpsimd_context() etc. (can > skip the magic check here). Well, not a strong view either way but we > should definitely remove the duplicate checks. I'm working on this, should have something out in the next day or so, but it's getting a bit more involved than just a simple fix (the main thing is that the various frame type parsers aren't consistent in how they're called which makes things a bit more invasive than they should be). --EblCQMP2wfRR4C6u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmN+UAwACgkQJNaLcl1U h9AKWQf/VsyRI59O+NVPJizxDwbos+EecVDE6mzLfiFHUGrGrBZ/Q6X+auhUWAw3 fWZBTXEo9iTWzRVuhWA44aGoBpTz0yB1eCTIkNJUON4gMJPlBegW1zICyUqgQzeg z0io19oiv7yIXUqMTIZb0JOs7NrsBhsF6XYPODz9C79gcr9Nk7Q3TgA7Y5nOTZD5 1Rd3ME10Zv0noikmX8WmXbZ/CuKgO2bN9ccO3xIpw87DCnxZpPNFW7ZaXEYjcNeu GZtUzzqoji1+Xc9S4hI2R4XwKDMUEeuNhlvRDI/zuHLQ8EWrIMGy5FCzcSUpsdzv 2rvYOshi5SkXAJ1MFSbUnlnRnRgjKw== =SXBy -----END PGP SIGNATURE----- --EblCQMP2wfRR4C6u-- --===============0645248021419972414== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0645248021419972414==--