Commit a078336d authored by Christophe Leroy's avatar Christophe Leroy Committed by Greg Kroah-Hartman
Browse files

powerpc/8xx: Fix initial memory mapping



[ Upstream commit f9f2bff6 ]

Commit cf209951 ("powerpc/8xx: Map linear memory with huge pages")
introduced an initial mapping of kernel TEXT using PAGE_KERNEL_TEXT,
but the pages that contain kernel TEXT may also contain kernel RODATA,
and depending on selected debug options PAGE_KERNEL_TEXT may be either
RWX or ROX. RODATA must be writable during init because it also
contains ro_after_init data.

So use PAGE_KERNEL_X instead to be sure it is RWX.

Fixes: cf209951 ("powerpc/8xx: Map linear memory with huge pages")
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/dac7a828d8497c4548c91840575a706657baa4f1.1724173828.git.christophe.leroy@csgroup.eu


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6f790377
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment