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:   Mon, 11 Nov 2019 14:49:39 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Zhenzhong Duan <zhenzhong.duan@...cle.com>,
        linux-kernel@...r.kernel.org
Cc:     kvm@...r.kernel.org, mtosatti@...hat.com,
        joao.m.martins@...cle.com, rafael.j.wysocki@...el.com,
        rkrcmar@...hat.com
Subject: Re: [PATCH 2/5] KVM: add a check to ensure grow start value is
 nonzero

On 26/10/19 05:23, Zhenzhong Duan wrote:
> vcpu->halt_poll_ns could be zeroed in certain cases (e.g. by
> halt_poll_ns_shrink). If halt_poll_ns_grow_start is zero,
> vcpu->halt_poll_ns will never be larger than zero.
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...cle.com>
> ---
>  virt/kvm/kvm_main.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 2ca2979..1b6fe3b 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2266,6 +2266,13 @@ static void grow_halt_poll_ns(struct kvm_vcpu *vcpu)
>  		goto out;
>  
>  	val *= grow;
> +
> +	/*
> +	 * vcpu->halt_poll_ns needs a nonzero start point to grow if it's zero.
> +	 */
> +	if (!grow_start)
> +		grow_start = 1;
> +
>  	if (val < grow_start)
>  		val = grow_start;
>  
> 

Zeroing grow_start will simply disable halt polling.  Is that a problem?

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ