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] [thread-next>] [day] [month] [year] [list]
Message-ID: <86cymk3b4i.wl-maz@kernel.org>
Date: Wed, 07 Aug 2024 11:01:17 +0100
From: Marc Zyngier <maz@...nel.org>
To: Zenghui Yu <yuzenghui@...wei.com>
Cc: <kvmarm@...ts.linux.dev>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>,
	<oliver.upton@...ux.dev>,
	<james.morse@....com>,
	<suzuki.poulose@....com>,
	<wanghaibin.wang@...wei.com>
Subject: Re: [PATCH] KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI

On Wed, 07 Aug 2024 06:20:24 +0100,
Zenghui Yu <yuzenghui@...wei.com> wrote:
> 
> In case the guest doesn't have any LPI, we previously relied on the
> iterator setting
> 
> 	'intid = nr_spis + VGIC_NR_PRIVATE_IRQS' && 'lpi_idx = 1'
> 
> to exit the iterator. But it was broken with commit 85d3ccc8b75b ("KVM:
> arm64: vgic-debug: Use an xarray mark for debug iterator") -- the intid
> remains at 'nr_spis + VGIC_NR_PRIVATE_IRQS - 1', and we end up endlessly
> printing the last SPI's state.
> 
> Consider that it's meaningless to search the LPI xarray and populate
> lpi_idx when there is no LPI, let's just skip the process for that case.
> 
> The result is that
> 
> * If there's no LPI, we focus on the intid and exit the iterator when it
>   runs out of the valid SPI range.
> * Otherwise we keep the current logic and let the xarray drive the
>   iterator.
> 
> Fixes: 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator")
> Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>

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

	M.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ