Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Catalin Marinas:
"Move the arm64_use_ng_mappings variable from the .bss to the .data
section as it is accessed very early during boot with the MMU off and
before the .bss has been initialised.

This could lead to incorrect idmap page table"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation

+8 -1
+8 -1
arch/arm64/kernel/cpufeature.c
··· 114 114 115 115 DECLARE_BITMAP(boot_cpucaps, ARM64_NCAPS); 116 116 117 - bool arm64_use_ng_mappings = false; 117 + /* 118 + * arm64_use_ng_mappings must be placed in the .data section, otherwise it 119 + * ends up in the .bss section where it is initialized in early_map_kernel() 120 + * after the MMU (with the idmap) was enabled. create_init_idmap() - which 121 + * runs before early_map_kernel() and reads the variable via PTE_MAYBE_NG - 122 + * may end up generating an incorrect idmap page table attributes. 123 + */ 124 + bool arm64_use_ng_mappings __read_mostly = false; 118 125 EXPORT_SYMBOL(arm64_use_ng_mappings); 119 126 120 127 DEFINE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector) = vectors;