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: <ecd5eb9a-938b-a8f3-ed69-76d2343bfdcc@redhat.com>
Date:   Fri, 25 Oct 2019 11:43:53 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, rkrcmar@...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, hpa@...or.com
Cc:     x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: get rid of odd out jump label in pdptrs_changed

On 25/10/19 04:01, Miaohe Lin wrote:
> -	if (r < 0)
> -		goto out;
> -	changed = memcmp(pdpte, vcpu->arch.walk_mmu->pdptrs, sizeof(pdpte)) != 0;
> -out:
> +	if (r >= 0)
> +		changed = memcmp(pdpte, vcpu->arch.walk_mmu->pdptrs,
> +				 sizeof(pdpte)) != 0;
>  
>  	return changed;

Even better:

	if (r < 0)
		return true;

	return memcmp(...) != 0;

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ