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 037EBC18E7C for ; Wed, 26 Feb 2025 15:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=2L2IKtDnuV7uV2tb12A8dh6ytMMIhTNCesOe1dF7R9M=; b=TN0oExgOrzzDxQ4LMk7JkMuS3Y DwuyeLTAhYTIU2UKvzmEYw/Tg/A3Na7vHTT89+s2dDh9e+qqHpVPs2SGbSuN7bpsV40R4U/8e4yxI LGN2QXGPjqn4ofMII7noQ8oCL0VBwIPifoiJiNVxHzjmPjmFyIPCqov0BKb1C9Kq/1Ts0sGES/qND dayrjtFn/F0gJ+d3YoFHcGMTD09XbbXWO/R7PaxX/Gk+oOqNyLQHDZinc0jPzKGcFR1boPJsgMb7D BHyiuKb4VWSEMpafcDuLYnTL0v18A7cLh3xKMoBo+nnajMxdqCsIgfOV39RKs5jZpv+imEoUxWouo CS8Db2hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tnJF3-00000004Fh2-06Sx; Wed, 26 Feb 2025 15:22:33 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tnIT3-000000046IJ-0a1Z for linux-arm-kernel@lists.infradead.org; Wed, 26 Feb 2025 14:32:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 6FCAB6123C; Wed, 26 Feb 2025 14:32:48 +0000 (UTC) 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) 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 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.