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

From: Kenneth R. Crudup
Date: Sun Dec 01 2019 - 12:09:03 EST



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.

> 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":

----
PAT memtype list:
write-back @ 0x4c314000-0x4c35f000
write-back @ 0x4c35e000-0x4c35f000
write-back @ 0x4c35e000-0x4c364000
write-back @ 0x4c363000-0x4c366000
write-back @ 0x4c365000-0x4c369000
write-back @ 0x4c368000-0x4c36b000
write-back @ 0x4c36a000-0x4c36e000
write-back @ 0x4c36d000-0x4c36f000
write-back @ 0x4c36e000-0x4c370000
write-back @ 0x4c36f000-0x4c371000
write-back @ 0x4c370000-0x4c372000
write-back @ 0x4c7eb000-0x4c7ec000
write-back @ 0x4c7ec000-0x4c7ef000
write-back @ 0x4c7ec000-0x4c7ed000
write-back @ 0x4c7ef000-0x4c7f0000
write-back @ 0x4c7f0000-0x4c7f1000
write-back @ 0x4c867000-0x4c868000
write-back @ 0x4c868000-0x4c869000
write-back @ 0x4fa86000-0x4fa87000
write-back @ 0x4fefc000-0x4fefd000
uncached-minus @ 0x77f00000-0x77f10000
uncached-minus @ 0x8e000000-0x8e040000
uncached-minus @ 0x8e040000-0x8e041000
uncached-minus @ 0x8e200000-0x8e202000
uncached-minus @ 0x8e203000-0x8e204000
uncached-minus @ 0x8e300000-0x8e301000
uncached-minus @ 0xe0000000-0xf0000000
uncached-minus @ 0xfd6a0000-0xfd6a1000
uncached-minus @ 0xfd6a0000-0xfd6b0000
uncached-minus @ 0xfd6d0000-0xfd6e0000
uncached-minus @ 0xfd6e0000-0xfd6e1000
uncached-minus @ 0xfd6e0000-0xfd6f0000
uncached-minus @ 0xfe000000-0xfe002000
uncached-minus @ 0xfe001000-0xfe002000
uncached-minus @ 0xfed00000-0xfed01000
uncached-minus @ 0xfed10000-0xfed16000
uncached-minus @ 0xfed15000-0xfed16000
uncached-minus @ 0xfed40000-0xfed45000
uncached-minus @ 0xfed90000-0xfed91000
uncached-minus @ 0xfed91000-0xfed92000
uncached-minus @ 0xff340000-0xff341000
write-combining @ 0x4000000000-0x4010000000
uncached-minus @ 0x4010000000-0x4010001000
uncached-minus @ 0x4010000000-0x4010001000
uncached-minus @ 0x4010000000-0x4010001000
uncached-minus @ 0x4010001000-0x4010002000
uncached-minus @ 0x4010001000-0x4010002000
uncached-minus @ 0x4010001000-0x4010002000
uncached-minus @ 0x604a000000-0x604a200000
write-combining @ 0x604a800000-0x604b000000
uncached-minus @ 0x604b100000-0x604b110000
uncached-minus @ 0x604b110000-0x604b118000
uncached-minus @ 0x604b118000-0x604b11c000
uncached-minus @ 0x604b11c000-0x604b120000
uncached-minus @ 0x604b11e000-0x604b11f000
uncached-minus @ 0x604b122000-0x604b124000
uncached-minus @ 0x604b125000-0x604b126000
uncached-minus @ 0x604b129000-0x604b12a000
----

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Silicon Valley