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]
Message-ID: <55479895.4030400@redhat.com>
Date:	Mon, 04 May 2015 18:04:37 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Radim Krčmář <rkrcmar@...hat.com>
CC:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org, bsd@...hat.com,
	guangrong.xiao@...ux.intel.com,
	Yang Zhang <yang.z.zhang@...el.com>, wanpeng.li@...ux.intel.com
Subject: Re: [PATCH 05/13] KVM: x86: pass host_initiated to functions that
 read MSRs



On 04/05/2015 16:01, Radim Krčmář wrote:
>>  static int emulator_get_msr(struct x86_emulate_ctxt *ctxt,
>>  			    u32 msr_index, u64 *pdata)
>>  {
>> -	return kvm_get_msr(emul_to_vcpu(ctxt), msr_index, pdata);
>> +	struct msr_data msr;
>> +	int r;
>> +
>> +	msr.index = msr_index;
>> +	msr.host_initiated = false;
>> +	r = kvm_get_msr(emul_to_vcpu(ctxt), &msr);
>> +	if (r)
>> +		return r;
>> +
>> +	*pdata = msr.data;
>> +	return 0;
>>  }
> 
> (Only msr.host_initiated changed from do_get_msr() ...
>  I'd add a function with an extra bool arg and call it twice.)

True, but the same situation is there already for do_set_msr vs.
emulator_set_msr

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ