Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers
From: Anshuman Khandual
Date: Thu Jan 30 2020 - 08:32:40 EST
On 01/30/2020 12:57 PM, Mike Rapoport wrote:
> On Wed, Jan 29, 2020 at 11:20:44PM +0100, Gerald Schaefer wrote:
>> On Mon, 27 Jan 2020 22:33:08 -0500
>>
>> For example, who would have thought that pXd_bad() is supposed to
>> report large entries as bad? It's not really documented anywhere,
>
> A bit off-topic,
>
> @Anshuman, maybe you could start a Documentation/ patch that describes at
> least some of the pXd_whaterver()?
> Or that would be too much to ask? ;-)
No, it would not be :) I have been documenting the expected semantics for
the helpers in the test itself. The idea is to collate them all (have been
working on some additional tests but waiting for this one to get merged
first) here and once most of the test gets settled, will move semantics
documentation from here into Documentation/ directory in a proper format.
/*
* Basic operations
*
* mkold(entry) = An old and not a young entry
* mkyoung(entry) = A young and not an old entry
* mkdirty(entry) = A dirty and not a clean entry
* mkclean(entry) = A clean and not a dirty entry
* mkwrite(entry) = A write and not a write protected entry
* wrprotect(entry) = A write protected and not a write entry
* pxx_bad(entry) = A mapped and non-table entry
* pxx_same(entry1, entry2) = Both entries hold the exact same value
*/
>
>> so we just checked them for sanity like normal entries, which
>> apparently worked fine so far, but for how long?
>