Re: [PATCH] x86/pat: Fix off-by-one bugs in interval tree search

From: Ingo Molnar
Date: Sun Dec 01 2019 - 14:55:33 EST



* Kenneth R. Crudup <kenny@xxxxxxxxx> wrote:

>
> On Sun, 1 Dec 2019, Ingo Molnar wrote:
>
> > So it would be nice if everyone who is seeing this bug could test the
> > patch below against Linus's latest tree - does it fix the regression?
>
> The patch fixes the issue for me.

Great, thanks!

> > If not then please send the before/after dump of
> > /sys/kernel/debug/x86/pat_memtype_list - and even if it works please send
> > the dumps so we can double check it all.
>
> I don't have the "before patch" (but could if it is absolutely needed) but
> here's the "after patch":

> uncached-minus @ 0xfed91000-0xfed92000
> uncached-minus @ 0xff340000-0xff341000
> write-combining @ 0x4000000000-0x4010000000
> uncached-minus @ 0x4010000000-0x4010001000

I believe this is the region that caused the problem, the 0x4010000000
'end' address of the WC region is the same as the 0x4010000000 'start'
address of the UC- region that follows it.

> write-combining @ 0x604a800000-0x604b000000
> uncached-minus @ 0x604b100000-0x604b110000

This WC region was probably unaffected by the bug.

Thanks,

Ingo