]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sat, 16 Mar 2024 11:18:21 +0000 (12:18 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 17 Mar 2024 02:33:21 +0000 (13:33 +1100)
commit78cb0945f7141961781f815168f6873ad2b7ed29
treeb6855d3d005eb6f15e6d30dd563a526899efaf4f
parent66a27abac311a30edbbb65fe8c41ff1b13876faa
powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()

mark_rodata_ro() and mark_initmem_nx() use functions that can
fail like set_memory_nx() and set_memory_ro(), leading to a not
protected kernel.

In case of failure, panic.

Link: https://github.com/KSPP/linux/issues/7
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/b16329611deb89e1af505d43f0e2a91310584d26.1710587887.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/nohash/8xx.c
arch/powerpc/mm/nohash/e500.c
arch/powerpc/mm/pgtable_32.c