Re: [PATCH] riscv: mm: Proper page permissions after initmem free

From: Björn Töpel
Date: Mon Nov 14 2022 - 10:26:00 EST


Alexandre Ghiti <alex@xxxxxxxx> writes:

>> + set_kernel_memory(__init_begin, __init_end, set_memory_rw_nx);
>
>
> That's nits but for 64-bit kernels, do we really want to make the kernel
> mapping writable? I think catching a write access here would be better
> because IMO that should not happen.

Thanks for having a look!

Hmm, so what you're suggesting is a "set_memory_r_nx" for CONFIG_64BIT?
What do other archs do? Is it worth the extra ifdef clutter?


Björn