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 7E6D821519B; Wed, 26 Feb 2025 14:32:56 +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=1740580376; cv=none; b=YcsXyKcpmyBa09IUXYCyqAS+O8NIRlY/8e3vFIdFCeuHeY5J/0SIPYfIC7g+PWV43hb/pUX76IusgvU6f2DxxCeT9MRVlV8iYvLU50pEo4nH0v91dWzICUT4VOkwGJC3G1RRGgJHQH4yAnZXz2BnT0Ht5ZF60VmMQRMZWNO690o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740580376; c=relaxed/simple; bh=Pu4z19uDCsj6vJThtlLZXqL8ygVPrTJKVQozXSMDv2o=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=miYpEQbMoWaiNIdsyNg0mV8TRp2rFyBGGK1lTd/C5mH5mtCyOKMy1ESWcgq5HkjIqGhOuWFFZ5ocx5PnPtND50O95DU6zO+wF63m+PS/i/sVcUHATRCqpml0qTY3mpYL/SzsRLdgALSKO91W+pnSS+k67TCSlnI46LpX1WxuT1U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NM+AtlZY; 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="NM+AtlZY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD2DBC4CED6; Wed, 26 Feb 2025 14:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740580375; bh=Pu4z19uDCsj6vJThtlLZXqL8ygVPrTJKVQozXSMDv2o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NM+AtlZY/Ljo/PRS88+awd7eLDBiedb0/n2mvWRwTMfNqDBC1gjzEfJbOS+kJr1en Hn30OiUJKJDL2Y/Lxkk2t12HT/VgHR+ZckF244UKSYe7OFI/I7WplWif7pZnWVXyth AqA/K3HiB70+1VgMiGkKRvmeDUfmdlbzii0ZxqBBcX6gXkEGRihJcEklcKMbgAO6eQ d/cOb8d1tqHT2N6bI1dvJmVPfd9UY/BrIwd262mSOhZce8sJT8bGS9eD4Ioh9RDx1f 4pMCa1nzNPSl30CWrlud5Y4KDsSlxTyTHlxn4xo6Nw6wfDz7H1uSsEdHDBhh1T3Kg4 oKM3OGSaXGXkg== 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 1tnISz-008DLj-Ar; Wed, 26 Feb 2025 14:32:53 +0000 Date: Wed, 26 Feb 2025 14:32:52 +0000 Message-ID: <867c5crd2j.wl-maz@kernel.org> From: Marc Zyngier To: Quentin Perret Cc: Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] KVM: arm64: Selftest for pKVM transitions In-Reply-To: <20250225015327.3708420-4-qperret@google.com> References: <20250225015327.3708420-1-qperret@google.com> <20250225015327.3708420-4-qperret@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/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@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: qperret@google.com, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@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, 25 Feb 2025 01:53:26 +0000, Quentin Perret wrote: > > We have recently found a bug [1] in the pKVM memory ownership > transitions by code inspection, but it could have been caught with a > test. > > Introduce a boot-time selftest exercising all the known pKVM memory > transitions and importantly checks the rejection of illegal transitions. > > The new test is hidden behind a new Kconfig option separate from > CONFIG_EL2_NVHE_DEBUG on purpose as that has side effects on the > transition checks ([1] doesn't reproduce with EL2 debug enabled). That's a bit annoying, isn't it? Without EL2_DEBUG selected, you won't get any stacktrace, and the WARN_ON()s are a guaranteed panic. Yes, this is better than nothing, but I'm a bit worried this is going to be hard to use. Is there a way to reduce the impact the EL2 debug has on the rest of the code? It feels like it is more invasive than it should be... Thanks, M. -- Without deviation from the norm, progress is not possible.