diff options
| author | Russell Currey <[email protected]> | 2019-12-24 17:41:25 +1100 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2020-01-16 14:59:36 +1000 |
| commit | 970d54f99ceac5bbf27929cb5ebfe18338ba1543 (patch) | |
| tree | d4a61eb30293e482c122096f300c1072bf684227 /tools/perf/scripts/python | |
| parent | fbee6ba2dca30d302efe6bddb3a886f5e964a257 (diff) | |
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 <[email protected]>
[mpe: Add details of the failure mode]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions