]> www.infradead.org Git - users/dwmw2/linux.git/commit
powerpc/ptdump: Fix W+X verification
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 14 Jan 2020 08:13:09 +0000 (08:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:36:48 +0000 (04:36 -0800)
commite9dd965d02239d85c2a4ef0ac7c270a5767bffbc
treeb48d5345dc99006a5bc572c544e2cdb9a03a6d47
parentc09127a9f8acd0312508c088830899b17e8ca6a7
powerpc/ptdump: Fix W+X verification

commit d80ae83f1f932ab7af47b54d0d3bef4f4dba489f upstream.

Verification cannot rely on simple bit checking because on some
platforms PAGE_RW is 0, checking that a page is not W means
checking that PAGE_RO is set instead of checking that PAGE_RW
is not set.

Use pte helpers instead of checking bits.

Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0d894839fdbb19070f0e1e4140363be4f2bb62fc.1578989540.git.christophe.leroy@c-s.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/ptdump/ptdump.c