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 DA735C4345F for ; Sun, 28 Apr 2024 10:38:01 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jRcnEfb0TUYIJlq1E1KpgaE04MEdft6SfsxMGClAsK8=; b=e7vaCez1hiOo/6 6td3BNzQsO1C8W9/em3bIT3fzZaVsZ7neopnUh8a60j6NZbg4bz27Z0Mab1CAuqfAzvL8kt+hHlsw ILVUOvlttgtpLDmmJktPAwr3KJ1miU1Wd5hqIqTASukVebatL9a6elc1xCx3yhfsgLNqOEV/sIjoO nAcNTwauQUig8auoMIr+nvpiSFIraXCmNYpQj8dM4EOVlNyhSUkq5bD6GbCil9Q4Owum+TyNGUJQm p4siDxgvzzz80npymHEs0/DxA69EohvJbozaMxijX5IzbHYSafTPmfxaZyqZb8yExlf+/Iss6q7PL 5GwahNhk3vy7FSZWdb0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s11ul-0000000HM8E-3TYN; Sun, 28 Apr 2024 10:37:47 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s11ui-0000000HM7d-0Lac for linux-arm-kernel@lists.infradead.org; Sun, 28 Apr 2024 10:37:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8C8C0CE0025; Sun, 28 Apr 2024 10:37:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A068EC113CC; Sun, 28 Apr 2024 10:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714300659; bh=keyzqxxclafKbcZ0U5ZQvk9uNvmHhucmjaBhrCXU81I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=g0wAKxvNDqzSklIgOvqM5k5mA3y6qcHJhI6pciPDyVRv4EseD0rc6p06OpNEUzB7a z3MOVnvL2MzkZ/hW0+ZrxhduCQR9ZRdk2cSzeNIxZRFc5sFGIFD1JNRmHhZnLS3WfZ GW8RLksoXizi1pE6n6cQs96mxHhLUEuw8iDjso0dxnOlM3Fe5HhnOrrZ52SKT2bpPi TIFZ6CTei/A41OqOXGUFVtHG34z4v9gXQ/ytmff2vVQTZu9zPL1lFQUKTKyW7VLWX7 UfrsYCB4Gm36W21LdIwrqoqwx9wQNP+IMdwtg4tJGs9WP6x3UyhCZrWOntbkbE4GAB 5BE5zfJpoAp6Q== Received: from 82-132-246-56.dab.02.net ([82.132.246.56] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s11ua-008nHU-TD; Sun, 28 Apr 2024 11:37:37 +0100 Date: Sun, 28 Apr 2024 11:37:34 +0100 Message-ID: <87h6flu61d.wl-maz@kernel.org> From: Marc Zyngier To: Peter Collingbourne Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Yichao Yu , "Robert O'Callahan" , Keno Fischer Subject: Re: [PATCH] arm64: Implement prctl(PR_{G,S}ET_TSC) In-Reply-To: <20240427052754.2014024-1-pcc@google.com> References: <20240427052754.2014024-1-pcc@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.246.56 X-SA-Exim-Rcpt-To: pcc@google.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, yyc1992@gmail.com, robert@ocallahan.org, keno@juliacomputing.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240428_033744_324629_2212A4E6 X-CRM114-Status: GOOD ( 12.60 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 27 Apr 2024 06:27:51 +0100, Peter Collingbourne wrote: > > On arm64, this prctl controls access to CNTVCT_EL0, CNTVCTSS_EL0 and > CNTFRQ_EL0 via CNTKCTL_EL1.EL0VCTEN. Since this bit is also used to > implement various erratum workarounds, check whether the CPU needs > a workaround whenever we potentially need to change it. Why would we ever consider preventing access to CNTVTL_EL0? This register is part of the arm64 ABI, together with CNTFRQ_EL0. Disabling it also prevents the VDSO from working correctly, making something as simple as getttimeofday() unexpectedly fail. I'm sure you have some rationale behind it, but it is nowhere to be found above, and I cannot see why we'd want to mimic whatever x86 does. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel