linux_dsm_epyc7002/arch/powerpc/mm/book3s64
Russell Currey 970d54f99c powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned
With STRICT_KERNEL_RWX on in a relocatable kernel under the hash MMU,
if the position the kernel is loaded at is not 16M aligned things go
horribly wrong. Specifically hash__mark_initmem_nx() will call
hash__change_memory_range() which then aligns down the start address,
and due to the text not being 16M aligned causes some of the kernel
text to be marked non-executable.

We can avoid this when selecting the linear mapping size, so do so and
print a warning. I tested this for various alignments and as long as
the position is 64K aligned it's fine (the base requirement for
powerpc).

Signed-off-by: Russell Currey <ruscur@russell.cc>
[mpe: Add details of the failure mode]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191224064126.183670-1-ruscur@russell.cc
2020-01-16 14:59:36 +10:00
..
hash_4k.c
hash_64k.c
hash_hugepage.c
hash_hugetlbpage.c
hash_native.c powerpc/book3s64/hash: Use secondary hash for bolted mapping if the primary is full 2019-10-28 21:54:16 +11:00
hash_pgtable.c powerpc/book3s64: Export has_transparent_hugepage() related functions. 2019-09-24 10:22:29 -07:00
hash_tlb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hash_utils.c powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned 2020-01-16 14:59:36 +10:00
iommu_api.c mm: introduce page_shift() 2019-09-24 15:54:08 -07:00
Makefile powerpc/pseries: Move mm/book3s64/vphn.c under platforms/pseries/ 2019-07-04 22:23:38 +10:00
mmu_context.c powerpc/book3s64/radix: Remove WARN_ON in destroy_context() 2019-09-21 08:36:53 +10:00
pgtable.c powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00
pkeys.c powerpc/pkeys: remove unused pkey_allows_readwrite 2019-10-11 19:34:10 +11:00
radix_hugetlbpage.c
radix_pgtable.c powerpc/mm: remove pmd_huge/pud_huge stubs and include hugetlb.h 2019-12-01 12:59:08 -08:00
radix_tlb.c powerpc/mm/book3s64/radix: Flush the full mm even when need_flush_all is set 2019-11-05 22:24:18 +11:00
slb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subpage_prot.c pagewalk: separate function pointers from iterator data 2019-09-07 04:28:04 -03:00