]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Simplify and move arch_randomize_brk()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sat, 9 Apr 2022 17:17:37 +0000 (19:17 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 May 2022 12:11:58 +0000 (22:11 +1000)
commit43bbf34cf92ff4e30449d5c1cecc831a8eb5206c
tree3a66e65955d97ab18ad180ff31a45e0defe4175f
parent623fc136a81e01232fffb1a0c1322ce319c08e68
powerpc: Simplify and move arch_randomize_brk()

arch_randomize_brk() is only needed for hash on book3s/64, for other
platforms the one provided by the default mmap layout is good enough.

Move it to hash_utils.c and use randomize_page() like the generic one.

And properly opt out the radix case instead of making an assumption
on mmu_highuser_ssize.

Also change to a 32M range like most other architectures instead of 8M.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/eafa4d18ec8ac7b98dd02b40181e61643707cc7c.1649523076.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/process.c
arch/powerpc/mm/book3s64/hash_utils.c