[PATCH] powerpc/mm: Fix missing page attributes in page table dump

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3414d

2 messages, 2 authors, 2017-04-14 · open the first message on its own page

[PATCH] powerpc/mm: Fix missing page attributes in page table dump

From: Christophe Leroy <hidden>
Date: 2017-04-13 12:41:40

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 <redacted>
---
 arch/powerpc/mm/dump_linuxpagetables.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c
index 05109d7fa027..22d2433333f5 100644
--- a/arch/powerpc/mm/dump_linuxpagetables.c
+++ b/arch/powerpc/mm/dump_linuxpagetables.c
@@ -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",
 	}
 };
 
-- 
2.12.0

Re: [PATCH] powerpc/mm: Fix missing page attributes in page table dump

From: kbuild test robot <hidden>
Date: 2017-04-14 04:10:34

Hi Christophe,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.11-rc6 next-20170413]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-mm-Fix-missing-page-attributes-in-page-table-dump/20170414-013347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):
quoted
arch/powerpc/mm/dump_linuxpagetables.c:212:11: error: '_PAGE_SHARED' undeclared here (not in a function)
      .mask = _PAGE_SHARED,
              ^~~~~~~~~~~~

vim +/_PAGE_SHARED +212 arch/powerpc/mm/dump_linuxpagetables.c

   206		}, {
   207	#endif
   208			.mask	= _PAGE_SPECIAL,
   209			.val	= _PAGE_SPECIAL,
   210			.set	= "special",
   211		}, {
 > 212			.mask	= _PAGE_SHARED,
   213			.val	= _PAGE_SHARED,
   214			.set	= "shared",
   215		}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help