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 717C43093A5 for ; Fri, 5 Sep 2025 08:29:46 +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=1757060986; cv=none; b=ZT2k44b0pTvgYHGG9K/b9+rMK3uF15o5yyUqfF67Pn+rtV39znrGKR0mSgpJoa0DVz3HdUfPlAQtTIWoBilQz72mKwwzpXCKHMwvDendmm/A9lq6/ad1vkYLYHqoJaQhL8Y0hvyKUs4CdlWUqv2QqYZ8OJR+3xJR2frlzySbpDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060986; c=relaxed/simple; bh=6nX2Fhe2M62J80QY266vPOZ6TMOcnLaxIZD7e8xT0oE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=steH1y+xQLN9/E+5xJzi0uJkF6nTwb+LsQGwqQ/Pz7MRXfSD4u7r0Ob/RMk2ZB7wWP8Z4vHqPOYsPwELGh5/QCepVFUQ6NkY1lgG7j6elW5fCak+PPJd2oCY2DnILwZwD7IUfbFW3QI0UQFOUFZv7dPsvbEvAJh8/1TYeu6PReo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rNdDNBTI; 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="rNdDNBTI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16B27C4CEF1; Fri, 5 Sep 2025 08:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757060986; bh=6nX2Fhe2M62J80QY266vPOZ6TMOcnLaxIZD7e8xT0oE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rNdDNBTI4jrSt/pP6BXw4yhJDRRTFGPosy2fYsLBfXQeP00ORMA6BSe/oU5iMcHXB FgIzCPpSAL+tmFk6WCh0vXBYyHq/0Ur/R515D9SzZkHje8lbkxpuOL2wkEij2gAGg7 QqoL+M8xL+cUIpXtJwGZyo5xv9pZm9ohwAFXd0rGEQh0rCyp7ygDg202f6yWh19aWo 0VNqciYwIaovY2Pt1aT2aYJPLLFU0GKf/eNKRpEHkWftHfvygCSj5qJgr+yZ6I6YjF nPSXrE6z0SeQkm1mWDg6B74YT2fXP1fFe2PrpK5yt5kZqry8/4aWaXphEM7I8aj/FI lrs1hy7aCmXYg== Received: from [131.175.126.3] (helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1uuRpI-00000003ZDj-0Z2s; Fri, 05 Sep 2025 08:29:44 +0000 Date: Fri, 05 Sep 2025 09:29:43 +0100 Message-ID: <87o6rpz4i0.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, Joey Gouly , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH 0/5] KVM: arm64: vgic-v3: Fix yet another lock ordering turd In-Reply-To: <20250904062348.223976-1-oliver.upton@linux.dev> References: <20250904062348.223976-1-oliver.upton@linux.dev> 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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev 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: 131.175.126.3 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 04 Sep 2025 07:23:43 +0100, Oliver Upton wrote: > > syzkaller found yet another locking bug in the VGIC [*], this time due > to nesting a 'plain' spinlock (xa_lock) inside of a raw spinlock > (ap_list_lock). Given the way we do refcounts on LPIs it is possible > for this exact sort of issue to crop up where the last reference may > be dropped in unexpected places. > > Small series to fix the issue by deferring xarray modifications outside > of the ap_list_lock critical section along with some slight lockdep > hinting to make these rare bugs a bit more obvious. I quite like that we get a release operation, rather than the slightly counter-intuitive construct we have today. With the couple of issues that Ben and I raised fixed: Reviewed-by: Marc Zyngier M. -- Jazz isn't dead. It just smells funny.