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

ARM: 8734/1: mm: idmap: Mark variables as ro_after_init

idmap_pgd, arch_phys_to_idmap_offset are setup once
while init stage, and never changed after that.
so, it is good candidate for __ro_after_init.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jinbum Park <jinb.park7@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

authored by

Jinbum Park and committed by
Russell King
6fbab054 670431ea

+2 -2
+2 -2
arch/arm/mm/idmap.c
··· 16 16 * are not supported on any CPU using the idmap tables as its current 17 17 * page tables. 18 18 */ 19 - pgd_t *idmap_pgd; 20 - long long arch_phys_to_idmap_offset; 19 + pgd_t *idmap_pgd __ro_after_init; 20 + long long arch_phys_to_idmap_offset __ro_after_init; 21 21 22 22 #ifdef CONFIG_ARM_LPAE 23 23 static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,