On Fri, 02 May 2025 19:04:12 +0100, Yeoreum Yun wrote:
create_init_idmap() could be called before .bss section initialization which is done in early_map_kernel(). Therefore, data/test_prot could be set incorrectly by PTE_MAYBE_NG macro.
PTE_MAYBE_NG macro set NG bit according to value of "arm64_use_ng_mappings". and this variable places in .bss section.
[...]
Applied to arm64 (for-next/fixes), with some slight tweaking of the comment, thanks!
[1/1] arm64/cpufeature: annotate arm64_use_ng_mappings with ro_after_init to prevent wrong idmap generation https://git.kernel.org/arm64/c/12657bcd1835