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]
Date:   Tue, 20 Oct 2020 14:32:12 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Zhenzhong Duan <zhenzhong.duan@...il.com>,
        linux-kernel@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org
Cc:     netdev@...r.kernel.org, pbonzini@...hat.com,
        sean.j.christopherson@...el.com, vkuznets@...hat.com,
        wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, mst@...hat.com
Subject: Re: [PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer


On 2020/10/19 下午5:06, Zhenzhong Duan wrote:
> In case failure to setup Post interrupt for an IRQ, it make no sense
> to assign irqfd->producer to the producer.
>
> This change makes code more robust.


It's better to describe what issue we will get without this patch.

Thanks


>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...il.com>
> ---
>   arch/x86/kvm/x86.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index ce856e0..277e961 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -10683,13 +10683,14 @@ int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
>   		container_of(cons, struct kvm_kernel_irqfd, consumer);
>   	int ret;
>   
> -	irqfd->producer = prod;
>   	kvm_arch_start_assignment(irqfd->kvm);
>   	ret = kvm_x86_ops.update_pi_irte(irqfd->kvm,
>   					 prod->irq, irqfd->gsi, 1);
>   
>   	if (ret)
>   		kvm_arch_end_assignment(irqfd->kvm);
> +	else
> +		irqfd->producer = prod;
>   
>   	return ret;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ