arm64: mm: use XN table mapping attributes for user/kernel mappings
authorArd Biesheuvel <ardb@kernel.org>
Wed, 10 Mar 2021 10:49:42 +0000 (11:49 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Mar 2021 18:50:46 +0000 (18:50 +0000)
commit59511cfd08f32d0e9d363ffa0fdaaa75afdc52b1
tree0d678972d8cf25ee0b3f4f06f85a464aabc6c6ca
parent87143f404f338dbf0b51374ea48ab05e598af564
arm64: mm: use XN table mapping attributes for user/kernel mappings

As the kernel and user space page tables are strictly mutually exclusive
when it comes to executable permissions, we can set the UXN table attribute
on all table entries that are created while creating kernel mappings in the
swapper page tables, and the PXN table attribute on all table entries that
are created while creating user space mappings in user space page tables.

While at it, get rid of a redundant comment.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20210310104942.174584-4-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgalloc.h