Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9E65F3B0AF1 for ; Tue, 9 Jun 2026 10:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781001192; cv=none; b=YO6QkVYyxoxs8lCOubyjMJtwo34MDtJTCvkOVcmOs2GWs+uLIs0/KYdvTh0mi55bgquwCuYN4tLwkm9+0lQQ4BuvHtZpmINjFf2AaeykYR5jKgnYfCFPivMhFf69wHIp78bl5EkaUm2i8EDB4G562470ldSRoX0dDPUIQH74Zds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781001192; c=relaxed/simple; bh=bn7oIGM5WxSI5ofyndPPyOE+qIU/0xfC29JtM6/CGqM=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=XQRblI7/WuViLMNQjuvhAMDWrxJkGiZJvw3P5PuFGam4QpT2p7HyAe0hyVRDDKJPWpkAZ2FtbGLfztYjX7yxAvGTYIduBcTZQLwbM5f811sQ3DykrIiCTpv+AR5n4cXv/ysWBzh9C4PVQ8NHqyEAvXYwlSlH11NSf5xeZLUJ2Uk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Khnoe147; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Khnoe147" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36C181F00893; Tue, 9 Jun 2026 10:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781001191; bh=GCr+BQtcuv0PUY38wT2Vl3W44PF5qRVqOiKASBMliCU=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Khnoe147OidzmOpbREMeM2YeZTvuv+yMBJoRDRGG8XyM6vI7liMo9aFslGlPhri/9 82ksQFsa+hJbOvgn8P8D3jvE0w5t8rv7UmWDmuUiou+tI3bHvDCIWdUKdoxsMsoEKb nFYuWRpEAcxYc+kSSaZX210uwUxZfdkV2+399mn0OYnGbboI3by39of0Y0YPO2BKW2 N/EYgoSYdo6FPBa7nkMlFVQMQ0ykKJpP8EWmy7DiEaTrArKWddXhABvYL5zPhaHI/2 KmKed+6VrnWuDtinlXoDf1PgMuoSH6yhnkStK+1Zg2WErGwXxUESdpmbdQd6FJ27pI svHjlPbQMtX1g== 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.98.2) (envelope-from ) id 1wWtld-0000000Arr2-1xQN; Tue, 09 Jun 2026 10:33:09 +0000 Date: Tue, 09 Jun 2026 11:33:09 +0100 Message-ID: <86fr2wt34q.wl-maz@kernel.org> From: Marc Zyngier To: Hyunwoo Kim Cc: gregkh@linuxfoundation.org, stable@vger.kernel.org, oupton@kernel.org Subject: Re: [PATCH 6.12.y] KVM: arm64: Take the SRCU lock for page table walks in fault injection and AT emulation In-Reply-To: References: 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: 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: imv4bel@gmail.com, gregkh@linuxfoundation.org, stable@vger.kernel.org, oupton@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, 09 Jun 2026 11:13:36 +0100, Hyunwoo Kim wrote: > > [ Upstream commit f2ca45b50d4216c9cc7ffabf50d9ad1932209251 ] > > walk_s1() and kvm_walk_nested_s2() expect to be called while holding > kvm->srcu to guard against memslot changes. While this is generally > the case, __kvm_at_s12() and __kvm_find_s1_desc_level() call into the > respective walkers without taking kvm->srcu. > > Fix by acquiring kvm->srcu prior to the table walk in both instances. > > Cc: stable@vger.kernel.org > Fixes: 50f77dc87f13 ("KVM: arm64: Populate level on S1PTW SEA injection") > Fixes: be04cebf3e78 ("KVM: arm64: nv: Add emulation of AT S12E{0,1}{R,W}") > Suggested-by: Oliver Upton > Signed-off-by: Hyunwoo Kim > Reviewed-by: Oliver Upton > Link: https://patch.msgid.link/aiAZfdeyanIvP8SD@v4bel > Signed-off-by: Marc Zyngier > [ Hyunwoo Kim: __kvm_at_s12() returns void in 6.12.y, so the context > differs from upstream (return; instead of return ret;). The > __kvm_find_s1_desc_level() hunk (Fixes: 50f77dc87f13) is dropped, as > that function is v6.18+ and absent here; only the __kvm_at_s12() / > kvm_walk_nested_s2() change (Fixes: be04cebf3e78) applies. ] > Signed-off-by: Hyunwoo Kim I don't think this is necessary. 6.12 doesn't actually have NV support (it was enabled only from userspace in 6.17), therefore the ATS12 emulation isn't reachable. Thanks, M. -- Without deviation from the norm, progress is not possible.