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>] [day] [month] [year] [list]
Message-ID: <10ec16d6c0c54cbc8166e7ef0cd5860e@huawei.com>
Date:   Fri, 25 Oct 2019 10:43:29 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
CC:     "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "wanpengli@...cent.com" <wanpengli@...cent.com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...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, Paolo Bonzini  wrote:
>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

Thanks for your suggestion. I will send a patch v2 to complete it. Many thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ