Re: [PATCH 3/7] KVM: x86: Add emulation_type to not raise #UD on CPL=3 emulation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/12/2017 16:53, Liran Alon wrote:
>>
>> Yup, however EMULTYPE_VMWARE has filtered the opcodes, hasn't it?  So in
>> this case you shouldn't fail the decoding.
> 
> In my current implementation EMULTYPE_VMWARE is considered only after
> the disassembly engine (x86_decode_insn()) has succeeded. It is true I
> could have filtered the opcodes before invoking the disassembly engine
> but that will make code a bit more complex. In addition, I didn't saw a
> lot of value in reducing the attack surface from the disassembly engine
> itself. Only from the emulation.

We've had oopses from incorrect decoding, so it can be useful.  You're
right that the RDPMC case has a two-byte opcode and therefore it makes
decoding a bit more complex.

I'd say, let's keep it simple and start with EMULTYPE_NO_UD_ON_FAIL.

Thanks,

Paolo

> Therefore, I decided to make the EMULTYPE_NO_UD_ON_FAIL flag which may
> be also useful in the future for other use cases.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux