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, 22 Nov 2016 08:25:52 -0600
From:   Tom Lendacky <thomas.lendacky@....com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Brijesh Singh <brijesh.singh@....com>, <kvm@...r.kernel.org>
CC:     <rkrcmar@...hat.com>, <joro@...tes.org>, <x86@...nel.org>,
        <linux-kernel@...r.kernel.org>, <mingo@...hat.com>,
        <hpa@...or.com>, <tglx@...utronix.de>, <bp@...e.de>
Subject: Re: [PATCH v1 2/3] kvm: svm: Add kvm_fast_pio_in support

On 11/21/2016 8:50 AM, Paolo Bonzini wrote:
> 
> 
> On 14/11/2016 23:15, Brijesh Singh wrote:
>> +	/* For size less than 4 we merge, else we zero extend */
>> +	val = (size < 4) ? kvm_register_read(vcpu, VCPU_REGS_RAX) : 0;
> 
> Are you sure it shouldn't always zero extend the high 32-bits?  So "val"
> should be declared as u32.
> 
> Paolo

It should only zero extend when dealing with a 32-bit operation. Any use
of 8 or 16 bit registers leaves the upper 56 or 48 bits as is (see
section 3.1.2.3 in http://support.amd.com/TechDocs/24592.pdf).

Thanks,
Tom

> 
>> +	ret = emulator_pio_in_emulated(&vcpu->arch.emulate_ctxt, size, port,
>> +				       &val, 1);
>> +	if (ret) {
>> +		kvm_register_write(vcpu, VCPU_REGS_RAX, val);
>> +		return ret;
>> +	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ