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: <99900ad4-6b05-4bba-ec7a-f4f4d36ab71b@huawei.com>
Date: Sat, 17 Aug 2024 18:31:45 +0800
From: Zenghui Yu <yuzenghui@...wei.com>
To: Marc Zyngier <maz@...nel.org>
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: Don't put unmarked LPIs

On 2024/8/17 18:25, Marc Zyngier wrote:
> On Sat, 17 Aug 2024 11:15:41 +0100,
> Zenghui Yu <yuzenghui@...wei.com> wrote:
> >
> > If there were LPIs being mapped behind our back (i.e., between .start() and
> > .stop()), we would put them at iter_unmark_lpis() without checking if they
> > were actually *marked*, which is obviously not good.
> >
> > Switch to use the xa_for_each_marked() iterator to fix it.
> >
> > Fixes: 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator")
> > Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>
> > ---
> >  arch/arm64/kvm/vgic/vgic-debug.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c
> > index bc74d06398ef..e1397ab2072a 100644
> > --- a/arch/arm64/kvm/vgic/vgic-debug.c
> > +++ b/arch/arm64/kvm/vgic/vgic-debug.c
> > @@ -85,7 +85,7 @@ static void iter_unmark_lpis(struct kvm *kvm)
> >  	struct vgic_irq *irq;
> >  	unsigned long intid;
> >  
> > -	xa_for_each(&dist->lpi_xa, intid, irq) {
> > +	xa_for_each_marked(&dist->lpi_xa, intid, irq, LPI_XA_MARK_DEBUG_ITER) {
> >  		xa_clear_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER);
> >  		vgic_put_irq(kvm, irq);
> >  	}
> 
> Ouch. Nicely caught. I think this deserves a
> 
> Cc: stable@...r.kernel.org # v6.10

Yup. I guess Oliver will help to add it when applying ;-)

> 
> With that,
> 
> Reviewed-by: Marc Zyngier <maz@...nel.org>

Thanks!

Zenghui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ