]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 20 Apr 2020 05:37:42 +0000 (05:37 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 22 Apr 2020 10:23:41 +0000 (20:23 +1000)
commit5f7aca5b0723c425d319509cbb8502c2ec73f003
tree65d945fe4357e8c7b2cbe23c207fc48cb66f32c3
parent8a5afc39f9f0f8ff54387a56f530e95e8d7c9884
powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure

WRITE_RO lkdtm test works.

But when selecting CONFIG_DEBUG_RODATA_TEST, the kernel reports
rodata_test: test data was not read only

This is because when rodata test runs, there are still old entries
in TLB.

Flush TLB after setting kernel pages RO or NX.

Fixes: 2e9a3740f982 ("powerpc/8xx: don't disable large TLBs with CONFIG_STRICT_KERNEL_RWX")
Cc: stable@vger.kernel.org # v5.1+
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/485caac75f195f18c11eb077b0031fdd2bb7fb9e.1587361039.git.christophe.leroy@c-s.fr
arch/powerpc/mm/nohash/8xx.c