diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-04-09 19:17:35 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-05 22:11:58 +1000 |
commit | 5cf7f9a0a54e93a6d3361de5f4ba4358b054c6c2 (patch) | |
tree | 91261076edc16a02ab4f3b99008bc3ac1cc0d20f /arch/powerpc/platforms/powernv/opal-memory-errors.c | |
parent | ab57bd7570d4393beb5a91bf092ed54e9c3574a2 (diff) | |
download | linux-5cf7f9a0a54e93a6d3361de5f4ba4358b054c6c2.tar.gz linux-5cf7f9a0a54e93a6d3361de5f4ba4358b054c6c2.tar.bz2 linux-5cf7f9a0a54e93a6d3361de5f4ba4358b054c6c2.zip |
powerpc/mm: Enable full randomisation of memory mappings
Do like most other architectures and provide randomisation also to
"legacy" memory mappings, by adding the random factor to
mm->mmap_base in arch_pick_mmap_layout().
See commit 8b8addf891de ("x86/mm/32: Enable full randomization on
i386 and X86_32") for all explanations and benefits of that mmap
randomisation.
At the moment, slice_find_area_bottomup() doesn't use mm->mmap_base
but uses the fixed TASK_UNMAPPED_BASE instead.
slice_find_area_bottomup() being used as a fallback to
slice_find_area_topdown(), it can't use mm->mmap_base
directly.
Instead of always using TASK_UNMAPPED_BASE as base address, leave
it to the caller. When called from slice_find_area_topdown()
TASK_UNMAPPED_BASE is used. Otherwise mm->mmap_base is used.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/417fb10dde828534c73a03138b49621d74f4e5be.1649523076.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-memory-errors.c')
0 files changed, 0 insertions, 0 deletions