powerpc/mm: Fix missing page attributes in page table dump
PATCH v2 1/1 powerpc/mm: Fix missing page attributes in page table dump
On some targets, _PAGE_RW is 0 and this is _PAGE_RO which is used. There is also _PAGE_SHARED that is missing.
Signed-off-by Christophe Leroy <[email protected]>
---
v2: Unlike the 3 other pgtable.h, arch/powerpc/include/asm/book3s/64/pgtable.h doesn't include pte-common.h . Therefore, _PAGE_SHARED has to be defined explicitly there, just like _PAGE_RO is. (build issue reported by kbuild robot)
arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/mm/dump_linuxpagetables.c | 9 +++++++++ 2 files changed, 10 insertions(+)
arch/powerpc/include/asm/book3s/64/pgtable.h +1 -0
@@ -13,6 +13,7 @@#define _PAGE_BIT_SWAP_TYPE 0#define _PAGE_RO 0 +#define _PAGE_SHARED 0#define _PAGE_EXEC 0x00001/* execute permission */ #define _PAGE_WRITE 0x00002/* write access allowed */
arch/powerpc/mm/dump_linuxpagetables.c +9 -0
@@ -119,8 +119,13 @@ static const struct flag_info flag_array[] = { .set = "user", .clear = " ", }, { +#if _PAGE_RO == 0 .mask = _PAGE_RW, .val = _PAGE_RW, +#else + .mask = _PAGE_RO, + .val = 0, +#endif .set = "rw", .clear = "ro", }, {
@@ -207,6 +212,10 @@ static const struct flag_info flag_array[] = { .mask = _PAGE_SPECIAL, .val = _PAGE_SPECIAL, .set = "special", + }, { + .mask = _PAGE_SHARED, + .val = _PAGE_SHARED, + .set = "shared", } };
Signature · 1 line
2.12.0
Michael Ellerman
AppliedQuoted 4 lines · Christophe Leroy
On some targets,
_PAGE_RWis 0 and this is_PAGE_ROwhich is used. There is also_PAGE_SHAREDthat is missing.Signed-off-by Christophe Leroy <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/c99317953323d6251245022cb3af54
cheers