From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B218195B1A; Tue, 10 Sep 2024 14:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725980360; cv=none; b=Bf6CY9E2liLxhzmCRAjhnca4WVmBUk4qC0nNJs3jmm7rP8e8M3Aj9rcPUifeqpHN7JKnpo/UXmee2BxYkQdgoE+w5oBEKsMrG4kBS1a+/QH0F1R4Hufocb4Q+9O8VjlYgr1mciSkmKsqGXpYbE4znd6itm75bvhcLrkF/duPC4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725980360; c=relaxed/simple; bh=Lrx/5jAbHLPm9ax3OCUOQ4rhjphqnV8DOZgUPtKabWY=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=DqYheE7rXLDwA/cq9NVrEGdTW7dXABFD4PPCAxMu26VmLMVkVFDnlQ51BDTm+exWBXZGd7yHOmZlHxu5/5MiA2jLRsslvTJdbBcKIIrlJOIqY09X/yLIGAb6ZpzYLDqA6w/35Oz3fSWsxRO1fSwr9IWTphAYOkmzbJpGOMG1YoM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Th+oJit/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Th+oJit/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B4A8C4CEC3; Tue, 10 Sep 2024 14:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725980359; bh=Lrx/5jAbHLPm9ax3OCUOQ4rhjphqnV8DOZgUPtKabWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Th+oJit/xNhK/Iy7kmDvV5yjWLel6iBuSug8TFAFcQpG+1LNprEpU3NmxvQtXiYAQ 6jP0p9zN2bHklhqKbFmpTrXg8CUl6uh9u48VCPXmIdffLQz/kG0sa4vnqpGiOIOIJa Z5hfOW9IEvJa7hCzExqvElHRfW9Ko67oLwpjHWfKST796SA5Xx4lQOvHuviz2ZgTlY sMTFlpg69KQwoAFdfFuOXRMkRnOuFZKZdPQlG5IRnAXqqLjXg5f1OxPyKgUE7FIylL bdw+bdjcZ+v3SOeUi+kG9kvVLMINUTFtxVD5rYratBI9pAlMq3FiRbLP0Hsc20ueTx CTLk5wwaLWLkA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1so2Kq-00Bm8p-Up; Tue, 10 Sep 2024 15:59:17 +0100 Date: Tue, 10 Sep 2024 15:59:15 +0100 Message-ID: <86tten7dx8.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: Catalin Marinas , Anastasia Belova , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, stable@vger.kernel.org Subject: Re: [PATCH v2] arm64: KVM: define ESR_ELx_EC_* constants as UL In-Reply-To: <20240910094746.GA20813@willie-the-truck> References: <865xr5856r.wl-maz@kernel.org> <20240910085016.32120-1-abelova@astralinux.ru> <86v7z37u5a.wl-maz@kernel.org> <20240910094746.GA20813@willie-the-truck> 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/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, catalin.marinas@arm.com, abelova@astralinux.ru, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 10 Sep 2024 10:47:46 +0100, Will Deacon wrote: > > On Tue, Sep 10, 2024 at 10:08:49AM +0100, Marc Zyngier wrote: > > On Tue, 10 Sep 2024 09:50:16 +0100, > > Anastasia Belova wrote: > > > > > > Add explicit casting to prevent expantion of 32th bit of > > > u32 into highest half of u64 in several places. > > > > > > For example, in inject_abt64: > > > ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT = 0x24 << 26. > > > This operation's result is int with 1 in 32th bit. > > > While casting this value into u64 (esr is u64) 1 > > > fills 32 highest bits. > > > > > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > > > > > Fixes: aa8eff9bfbd5 ("arm64: KVM: fault injection into a guest") > > > Signed-off-by: Anastasia Belova > > > > nit: the subject line is misleading, as this doesn't only affect KVM, > > but the whole of the arm64 port (the exception classes form a generic > > architectural construct). > > Weird, this v2 landed in my spam for some reason. > > > This also probably deserve a Cc stable. > > > > Will, Catalin: I'm happy to queue this in the KVM tree, but if you are > > taking it directly: > > > > Acked-by: Marc Zyngier > > > I can take it via arm64. I assume it's ok to land in v6.12 (with the cc: > stable), or is there an urgency to landing this in v6.11? It looks it > was found using verification tools, rather than because of an actual > issue affecting users. Yup, 6.12 is just fine. It would only affect ESR encodings that have an ISS2 in the top 32 bits, and that's only a very small number of features, most of which don't exist in HW yet. Thanks, M. -- Without deviation from the norm, progress is not possible.