Re: [PATCH v5 1/3] kvm: vmx: fix limit checking in get_vmx_mem_address()

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

 



On Fri, Jun 07, 2019 at 09:02:48AM +0300, Eugene Korenevsky wrote:
> Intel SDM vol. 3, 5.3:
> The processor causes a
> general-protection exception (or, if the segment is SS, a stack-fault
> exception) any time an attempt is made to access the following addresses
> in a segment:
> - A byte at an offset greater than the effective limit
> - A word at an offset greater than the (effective-limit – 1)
> - A doubleword at an offset greater than the (effective-limit – 3)
> - A quadword at an offset greater than the (effective-limit – 7)
> 
> Therefore, the generic limit checking error condition must be
> 
> exn = (off > limit + 1 - access_len) = (off + access_len - 1 > limit)
> 
> but not
> 
> exn = (off + access_len > limit)
> 
> as for now.
> 
> Also avoid integer overflow of `off` at 32-bit KVM by casting it to u64.
> 
> Note: access length is currently sizeof(u64) which is incorrect. This
> will be fixed in the subsequent patch.
> 
> Signed-off-by: Eugene Korenevsky <ekorenevsky@xxxxxxxxx>

When sending a new revision of a patch, please add any supplied tags to
the changelog, e.g. Reviewed-by, Tested-by, Acked-by, etc...  For example,
my Reviewed-by for v4 of this patch.

The one situation where you don't want to carry tags is if you make
non-trivial changes to a patch, e.g. person X reviews a patch but then
it gets reworked based on feedback from person Y, in which case the
Reviewed-by from X should be dropped as they haven't reviewed the new
code.

Thans for the patches!

Reviewed-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>



[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