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 03851C4332F for ; Tue, 15 Nov 2022 17:15:28 +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=klEXOhHiZkO6S1wRNslAkRScSuGr4IRI0tDy9IuQMSM=; b=AzuPSdYcXOJI7BECKmjbS545Hq fWh7F4HwXGyAagW7QEh2SbWLgPKoZTmkfgxJ8EvK4HXpEP3wYwIAFO22LWuKOk2Smm9hFjxZIBkwO x5kUGF0mvhFN/aO/OyT/EgNNlGDUh/h0eWVUIuku6ehSFf8Q2J5hhGuakMnsvmYKibQYzsfVbMAc5 atQ6q19ekzhNWkGc7MDBsrS2gmWyw6ydv9cOaCi+VZdi0IUdFdbkTKC1Nj0X4TQ89Lu0isO13a6YN ZgkoDMrhf+9NyZZk/IGLtj1CzJQGrl0RNZE/dsyq4bFBDSvQGXmmVJrTZ0ZwLMx7jC/tBAHuwBQFU 2/UpuUtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouzVg-00DORP-SF; Tue, 15 Nov 2022 17:14:08 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouzVd-00DOOl-1P for linux-arm-kernel@lists.infradead.org; Tue, 15 Nov 2022 17:14:06 +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 760A661938; Tue, 15 Nov 2022 17:14:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76D4BC433D7; Tue, 15 Nov 2022 17:13:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668532443; bh=P1DaWC4AYsgVoq+cRVWYFqv6eK73wZCg6GCS6t7Iu4E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h+plYSj83kZG8vvYOv08N1PaXtJOYMCYzB0fuiTWteFXqtaHzYY3HF/B0IT3w84RK NM6Hk3PSV0Tts8Rjuyzg1DgFK0zly5auFoaMJcb36EvGkomUjxEoRunMdrRAYGK2Go yufTfV5v85fKYi5BTXOwot+DzHj1lzND3ipaT8MRXLG8SV/0/cuNQPSVnoCumbQ4or OEgqAiG8CKAaF8jDWa9//RIqktZKKgv0qZRVG3ke42gFlUb0IxMGf6Nv9CUg9C33t/ ok99qVWyCp0ulYw0q7DswESwy027SBbHraduDMOcZSS2jvQrXn2rytE1V44GET68uR pjxfjrS97a48A== Date: Tue, 15 Nov 2022 17:13:39 +0000 From: Mark Brown To: Will Deacon Cc: Catalin Marinas , 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> MIME-Version: 1.0 In-Reply-To: <20221114161005.GB31141@willie-the-truck> X-Cookie: Ego sum ens omnipotens. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_091405_132590_19F8F4A7 X-CRM114-Status: GOOD ( 15.05 ) 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="===============2983809948855578302==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2983809948855578302== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iTu7yq+mXzYdF20s" Content-Disposition: inline --iTu7yq+mXzYdF20s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 14, 2022 at 04:10:06PM +0000, Will Deacon wrote: > On Mon, Oct 31, 2022 at 08:17:34PM +0000, Mark Brown wrote: > > + __get_user_error(tpidr2_el0, &user->tpidr2->tpidr2, err); > > + if (!err) > > + current->thread.tpidr2_el0 = tpidr2_el0; > What guarantees this makes its way into the hardware register before we > return to userspace, context switch or deliver another signal? Context switch is handled, part of context switch is to restore the value from the task struct, but other cases aren't AFAICT. This is in general an oversight in our signal testing framework, it does not have a pattern of validating values set in signals. --iTu7yq+mXzYdF20s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmNzyMMACgkQJNaLcl1U h9BOhQf8CYDXIPtktjpCSidbyAXUbzSRgWHNFV1yrYULdKQMGIVldwcxa1KEYjqw NHD3Z4VPIkcF6aIRXLF5qiS0momGwox3fxJOlfEfInhZIMt1KkxbhSpeoA75tPL/ n/PvHwf4L4hTI25TudLNqWa/6Re7GUSeJ2JaiDWvX3Sy+v2p3EJlCNTV0FNNC+BA BVCtcdtRiFVOC86gzxkGhnqQGLYaFr6PWi646RAay+Z4ZTGtKdlMSd90BUeOprw5 WVJa/+1TbY9gWbPkJFJxuEsrUtKXjAO5yB/BObuo+6eKRclhAdu3UQxP7b3XFEEo FLnhmHCxOe4+0gvG6SpVUhJT3S4zdg== =VWdg -----END PGP SIGNATURE----- --iTu7yq+mXzYdF20s-- --===============2983809948855578302== 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 --===============2983809948855578302==--