With CONFIG_UNMAP_KERNEL_AT_EL0 enabled, before this change, there was an RWX
mapping at a fixed `fixmap` address (as discovered using CONFIG_ARM64_PTDUMP).
0xffff7ffffe7fc000-0xffff7ffffe7fd000 4K RW x SHD AF UXN MEM/NORMAL
Having PAGE_KERNEL_ROX by default for this fixmap makes sense for a security
POV, for reducing the ability to load and run shellcode.
Originally, the commit that introduced CONFIG_UNMAP_KERNEL_AT_EL0, had the following:
pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
However rodata_enabled is not available in arch/arm64 on this early version of
the kernel.
Change-Id: I21f26df498fb591fc28e32f4dfad671a9ed3d8d3
Fixes: 39685f556c ("FROMLIST: arm64: mm: Map entry trampoline into
trampoline and kernel page tables")
Signed-off-by: Dan Aloni <daloni@magicleap.com>