Thread (7 messages) 7 messages, 3 authors, 2020-05-27

Re: [PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly

From: Steven Price <steven.price@arm.com>
Date: 2020-05-27 15:55:33
Also in: lkml

On 27/05/2020 16:15, Jan Beulich wrote:
On 21.05.2020 17:23, Steven Price wrote:
quoted
By switching the x86 page table dump code to use the generic code the
effective permissions are no longer calculated correctly because the
note_page() function is only called for *leaf* entries. To calculate the
actual effective permissions it is necessary to observe the full
hierarchy of the page tree.

Introduce a new callback for ptdump which is called for every entry and
can therefore update the prot_levels array correctly. note_page() can
then simply access the appropriate element in the array.

Reported-by: Jan Beulich <redacted>
Fixes: 2ae27137b2db ("x86: mm: convert dump_pagetables to use walk_page_range")
Signed-off-by: Steven Price <steven.price@arm.com>
This (with the later correction) and the 2nd patch
Tested-by: Jan Beulich <redacted>

It allowed me to go and finally find why under Xen there was still
a single W+X mapping left - another bug, another patch.

Thanks, Jan
Thanks for testing (and sorry for breaking it in the first place)!

Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help