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: <58C28DDA.4050001@linux.intel.com>
Date:   Fri, 10 Mar 2017 19:28:26 +0800
From:   Yu Zhang <yu.c.zhang@...ux.intel.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     qian.ouyang@...el.com,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [RFC PATCH 0/4] KVM: Emulate UMIP (or almost do so)



On 3/10/2017 5:31 PM, Yu Zhang wrote:
>
>
> On 3/10/2017 4:36 PM, Paolo Bonzini wrote:
>>
>> On 10/03/2017 09:02, Yu Zhang wrote:
>>>>    Besides, is this all the test for UMIP unit test? I.e. do we 
>>>> need to
>>>> construct a scenario in the test to trigger vm exit and let hypervisor
>>>> inject a GP fault? - I did not see this scenario in this patch. Or any
>>>> other suggestions? :-)
>>> Hi Paolo, any suggestions?
>>> Sorry for the disturb. :)
>> Hi, you get the scenario where a vmexit is triggered by the hypervisor
>> if you run the unit test on a machine that lacks UMIP support.
>>
>> We can also add a module parameter to force emulation, so that it will
>> be possible to test UMIP emulation on newer processors too.
>
> Thanks for your reply, Paolo. :-)
>
> Well, my previous understanding is that there might be a situation on 
> a machine with UMIP
> feature:
> 1> when an APP in VM runs instructions such as sgdt addrA,
> 2> and the addrA may cause anVM exit(e.g. ept violation),
> 3> next, the emulator in hypervisor need to inject a GP fault to the VM.
> Is this situation possible?
> This is the case I'd like to test, yet do not know to construct the 
> scenario.
>

Sorry, Paolo. I may have misunderstanding on this.

In intel SDM chapt 25, it says "Certain exceptions have priority over VM 
exits. These include
invalid-opcode exceptions, faults based on privilege level...".
So in above case, it is GP fault in VM that should happen, instead of VM 
exit, right?

> But as to the scenario you described, I do not quit understand.
> I mean, on a host which do not support UMIP, although hypervisor may 
> intercept cpuid and
> provide an emulated cr4 to guest, how does it guarantee those 
> instructions in VM will cause
> a VM exit?

For this scenario, vm exit should be caused if "descriptor-table 
exiting” VM-execution control is 1,
then hypervisor should have opportunity to do the force emulation.

Is my new understanding correct?

Another question is, what if host do have the UMIP feature, and the 
"descriptor-table exiting” VM-execution
control is 1? Will a GP fault in VM happen, or a VM exit?

Thanks
Yu

> Yu
>> Paolo
>>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ