mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 13:02:19 +07:00
970d54f99c
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 |
||
---|---|---|
.. | ||
hash_4k.c | ||
hash_64k.c | ||
hash_hugepage.c | ||
hash_hugetlbpage.c | ||
hash_native.c | ||
hash_pgtable.c | ||
hash_tlb.c | ||
hash_utils.c | ||
iommu_api.c | ||
Makefile | ||
mmu_context.c | ||
pgtable.c | ||
pkeys.c | ||
radix_hugetlbpage.c | ||
radix_pgtable.c | ||
radix_tlb.c | ||
slb.c | ||
subpage_prot.c |