Re: [Xen-devel] [PATCH v2 1/3] x86/vmx: introduce vmx_find_msr()

2017-02-22 Thread Jan Beulich
>>> On 22.02.17 at 09:45, wrote: > On Wed, 2017-02-22 at 08:40 +, Tian, Kevin wrote: >> > From: Sergey Dyasli [mailto:sergey.dya...@citrix.com] >> > Sent: Wednesday, February 22, 2017 4:38 PM >> > >> > > > >> > > > -for ( idx = 0; idx < *msr_count; idx++ ) >> > > > +for ( idx = 0; (*

Re: [Xen-devel] [PATCH v2 1/3] x86/vmx: introduce vmx_find_msr()

2017-02-22 Thread Sergey Dyasli
On Wed, 2017-02-22 at 08:40 +, Tian, Kevin wrote: > > From: Sergey Dyasli [mailto:sergey.dya...@citrix.com] > > Sent: Wednesday, February 22, 2017 4:38 PM > > > > > > > > > > -for ( idx = 0; idx < *msr_count; idx++ ) > > > > +for ( idx = 0; (*msr_area)[idx].index <= msr && idx < *msr_

Re: [Xen-devel] [PATCH v2 1/3] x86/vmx: introduce vmx_find_msr()

2017-02-22 Thread Tian, Kevin
> From: Sergey Dyasli [mailto:sergey.dya...@citrix.com] > Sent: Wednesday, February 22, 2017 4:38 PM > > > > > > > -for ( idx = 0; idx < *msr_count; idx++ ) > > > +for ( idx = 0; (*msr_area)[idx].index <= msr && idx < *msr_count; > > > idx++ ) > > > > risk of out-of-boundary access. > >

Re: [Xen-devel] [PATCH v2 1/3] x86/vmx: introduce vmx_find_msr()

2017-02-22 Thread Sergey Dyasli
On Tue, 2017-02-21 at 09:29 +, Tian, Kevin wrote: > > From: Sergey Dyasli [mailto:sergey.dya...@citrix.com] > > Sent: Friday, February 17, 2017 11:43 PM > > > > Modify vmx_add_msr() to use a variation of insertion sort algorithm: > > find a place for the new entry and shift all subsequent elem