diff mbox

powerpc/mm: Fix missing page attributes in page table dump

Message ID 20170413124126.301CF6E664@localhost.localdomain (mailing list archive)
State Superseded
Headers show

Commit Message

Christophe Leroy April 13, 2017, 12:41 p.m. UTC
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 <christophe.leroy@c-s.fr>
---
 arch/powerpc/mm/dump_linuxpagetables.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

kernel test robot April 14, 2017, 4:10 a.m. UTC | #1
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 >>):

>> 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
diff mbox

Patch

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",
 	}
 };