Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Toshi Kani
On Tue, 2015-05-05 at 22:09 +0200, Borislav Petkov wrote: > On Tue, May 05, 2015 at 01:31:32PM -0600, Toshi Kani wrote: > > Well, the comment kinda says it already, but I will try to clarify it. > > > >/* > > * We have start:end spanning across an MTRR. > > * We

Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Borislav Petkov
On Tue, May 05, 2015 at 01:31:32PM -0600, Toshi Kani wrote: > Well, the comment kinda says it already, but I will try to clarify it. > >/* > * We have start:end spanning across an MTRR. > * We split the region into either > * - start_state:1 >

Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Toshi Kani
On Tue, 2015-05-05 at 20:39 +0200, Borislav Petkov wrote: > On Tue, May 05, 2015 at 11:32:08AM -0600, Toshi Kani wrote: > > > Ok, I'm confused. Shouldn't the inclusive:1 case be > > > > > > (start:mtrr_start) (mtrr_start:mtrr_end) (mtrr_end:end) > > > > > > ? > > > > > > If so,

Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Borislav Petkov
On Tue, May 05, 2015 at 11:32:08AM -0600, Toshi Kani wrote: > > Ok, I'm confused. Shouldn't the inclusive:1 case be > > > > (start:mtrr_start) (mtrr_start:mtrr_end) (mtrr_end:end) > > > > ? > > > > If so, this function would need more changes... > > Yes, that's how it gets s

Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Toshi Kani
On Tue, 2015-05-05 at 19:11 +0200, Borislav Petkov wrote: > On Tue, Mar 24, 2015 at 04:08:36PM -0600, Toshi Kani wrote: > > When an MTRR entry is inclusive to a requested range, i.e. > > the start and end of the request are not within the MTRR > > entry range but the range contains the MTRR entry e

Re: [PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-05-05 Thread Borislav Petkov
On Tue, Mar 24, 2015 at 04:08:36PM -0600, Toshi Kani wrote: > When an MTRR entry is inclusive to a requested range, i.e. > the start and end of the request are not within the MTRR > entry range but the range contains the MTRR entry entirely, > __mtrr_type_lookup() ignores such a case because both >

[PATCH v4 2/7] mtrr, x86: Fix MTRR lookup to handle inclusive entry

2015-03-24 Thread Toshi Kani
When an MTRR entry is inclusive to a requested range, i.e. the start and end of the request are not within the MTRR entry range but the range contains the MTRR entry entirely, __mtrr_type_lookup() ignores such a case because both start_state and end_state are set to zero. This bug can cause the fo