lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86msbffsbb.wl-maz@kernel.org>
Date: Wed, 14 May 2025 10:35:36 +0100
From: Marc Zyngier <maz@...nel.org>
To: Maxim Levitsky <mlevitsk@...hat.com>
Cc: kvm@...r.kernel.org,
	Suzuki K Poulose <suzuki.poulose@....com>,
	Jing Zhang <jingzhangos@...gle.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Sebastian Ott <sebott@...hat.com>,
	Shusen Li <lishusen2@...wei.com>,
	Waiman Long <longman@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-arm-kernel@...ts.infradead.org,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Borislav Petkov <bp@...en8.de>,
	Anup Patel <anup@...infault.org>,
	Will Deacon <will@...nel.org>,
	Palmer Dabbelt <palmer@...belt.com>,
	Alexander Potapenko <glider@...gle.com>,
	kvmarm@...ts.linux.dev,
	Keisuke Nishimura <keisuke.nishimura@...ia.fr>,
	Zenghui Yu <yuzenghui@...wei.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Atish Patra <atishp@...shpatra.org>,
	Joey Gouly <joey.gouly@....com>,
	x86@...nel.org,
	Sean Christopherson <seanjc@...gle.com>,
	Andre Przywara <andre.przywara@....com>,
	Kunkun Jiang <jiangkunkun@...wei.com>,
	linux-riscv@...ts.infradead.org,
	Randy Dunlap <rdunlap@...radead.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Boqun Feng <boqun.feng@...il.com>,
	Catalin Marinas <catalin.marinas@....com>,
	Alexandre Ghiti <alex@...ti.fr>,
	linux-kernel@...r.kernel.org,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Oliver Upton <oliver.upton@...ux.dev>,
	kvm-riscv@...ts.infradead.org,
	Ingo Molnar <mingo@...hat.com>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Albert Ou <aou@...s.berkeley.edu>
Subject: Re: [PATCH v5 5/6] KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs

On Mon, 12 May 2025 19:04:06 +0100,
Maxim Levitsky <mlevitsk@...hat.com> wrote:
> 
> Use kvm_trylock_all_vcpus instead of a custom implementation when locking
> all vCPUs of a VM, to avoid triggering a lockdep warning, in the case in
> which the VM is configured to have more than MAX_LOCK_DEPTH vCPUs.
> 
> This fixes the following false lockdep warning:
> 
> [  328.171264] BUG: MAX_LOCK_DEPTH too low!
> [  328.175227] turning off the locking correctness validator.
> [  328.180726] Please attach the output of /proc/lock_stat to the bug report
> [  328.187531] depth: 48  max: 48!
> [  328.190678] 48 locks held by qemu-kvm/11664:
> [  328.194957]  #0: ffff800086de5ba0 (&kvm->lock){+.+.}-{3:3}, at: kvm_ioctl_create_device+0x174/0x5b0
> [  328.204048]  #1: ffff0800e78800b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [  328.212521]  #2: ffff07ffeee51e98 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [  328.220991]  #3: ffff0800dc7d80b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [  328.229463]  #4: ffff07ffe0c980b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [  328.237934]  #5: ffff0800a3883c78 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [  328.246405]  #6: ffff07fffbe480b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> 
> Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
> Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>

Acked-by: Marc Zyngier <maz@...nel.org>

Paolo: if you are queuing this for 6.16, please put it on a stable
branch so that I can merge it back in case of conflicts.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ