linux-stable/arch/arm64/mm
Catalin Marinas d89a351b08 arm64: Revert support for execute-only user mappings
commit 24cecc3774 upstream.

The ARMv8 64-bit architecture supports execute-only user permissions by
clearing the PTE_USER and PTE_UXN bits, practically making it a mostly
privileged mapping but from which user running at EL0 can still execute.

The downside, however, is that the kernel at EL1 inadvertently reading
such mapping would not trip over the PAN (privileged access never)
protection.

Revert the relevant bits from commit cab15ce604 ("arm64: Introduce
execute-only page access permissions") so that PROT_EXEC implies
PROT_READ (and therefore PTE_USER) until the architecture gains proper
support for execute-only user mappings.

Fixes: cab15ce604 ("arm64: Introduce execute-only page access permissions")
Cc: <stable@vger.kernel.org> # 4.9.x-
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09 10:19:03 +01:00
..
cache.S arm64: Fix minor issues with the dcache_by_line_op macro 2019-01-26 09:32:39 +01:00
context.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
copypage.c
dma-mapping.c arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable 2019-05-31 06:46:01 -07:00
dump.c arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables 2018-02-16 18:13:57 +00:00
extable.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fault.c arm64: Revert support for execute-only user mappings 2020-01-09 10:19:03 +01:00
flush.c arm64: Do not issue IPIs for user executable ptes 2019-02-06 17:30:12 +01:00
hugetlbpage.c arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags 2018-09-24 17:51:50 +01:00
init.c arm64: mm: make CONFIG_ZONE_DMA32 configurable 2019-07-26 09:14:04 +02:00
ioremap.c arm64: use is_vmalloc_addr 2017-02-09 13:47:56 +00:00
kasan_init.c arm64: kasan: avoid pfn_to_nid() before page array is initialized 2018-04-17 16:16:59 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c arm64: consider stack randomization for mmap base only when necessary 2019-10-07 18:57:17 +02:00
mmu.c arm64/mm: Inhibit huge-vmap with ptdump 2019-06-19 08:18:02 +02:00
numa.c arm64/numa: Report correct memblock range for the dummy node 2019-11-24 08:19:31 +01:00
pageattr.c arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables 2018-02-16 18:13:57 +00:00
pgd.c arm64: handle 52-bit addresses in TTBR 2017-12-22 17:35:21 +00:00
physaddr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.S arm64: kpti: ensure patched kernel text is fetched from PoU 2019-10-05 13:09:51 +02:00
ptdump_debugfs.c ARM64: dump: Convert to use DEFINE_SHOW_ATTRIBUTE macro 2018-07-02 10:36:37 +01:00