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

Björn Töpel bjorn at kernel.org
Mon Nov 14 07:25:49 PST 2022


Alexandre Ghiti <alex at ghiti.fr> 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



More information about the linux-riscv mailing list