RISC-V: Fix .init section permission update
.init section permission should only updated to non-execute if
STRICT_KERNEL_RWX is enabled. Otherwise, this will lead to a kernel hang.
Fixes: 19a00869028f ("RISC-V: Protect all kernel sections including init early")
Cc: [email protected]
Suggested-by: Geert Uytterhoeven <[email protected]>
Reported-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>