arm64 code looking for variable rodata_enabled when STRICT_KERNEL_RWX = n

Pavel Skripkin paskripkin at gmail.com
Wed Mar 23 17:16:06 EDT 2022


Hi Chan,

On 3/18/22 09:03, Chan Kim wrote:
> Hello all,
> 

[...]

> 
> But now since CONFIG_STRICT_KERNEL_RWX=n, it is not defined
> here(CONFIG_STRICT_MODULE_RWX=n too).
> 
> and arch/arm64/mm/mmu.c code is still using `rodata_enabled`. Is this a bug
> of the code? Or am I missing something?
> 
>   

If arch specifies something in its Kconfig then arch code is not 
prepared to be built with modified configuration. Arch Kconfig is 
persistent, that means if you change it you should also change the code.

> I can modify init/main.c and include/linux/init.h so that this
> rodata_enabled and related functions be defined regardless of these CONFIG
> values and make the errors go away, but I'm curious if this a kind of kernel
> bug raising compiler error.
> 

It's not a kernel bug. You have misconfigured the kernel and faced 
compile error. Common case



With regards,
Pavel Skripkin



More information about the Kernelnewbies mailing list