summaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-04-09 19:17:26 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-05-05 22:11:56 +1000
commit723820f3f77dc9f7ffdceb076ebcf6a5b91d0a27 (patch)
tree03bd82e2fd5f37b15e84eb16ee514fb0632f19cc /mm/util.c
parentd0a31acc34dc2921ad32a67a7534704114e64f82 (diff)
downloadlinux-723820f3f77dc9f7ffdceb076ebcf6a5b91d0a27.tar.bz2
mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to provide its own arch_randomize_brk(). In order to allow that, define generic version of arch_randomize_brk() as a __weak symbol. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b222f1ca06c850daf1b2f26afdb46c6dd97d21ba.1649523076.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/util.c b/mm/util.c
index 3492a9e81aa3..44fbf211312d 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -344,7 +344,7 @@ unsigned long randomize_stack_top(unsigned long stack_top)
}
#ifdef CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
-unsigned long arch_randomize_brk(struct mm_struct *mm)
+unsigned long __weak arch_randomize_brk(struct mm_struct *mm)
{
/* Is the current task 32bit ? */
if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task())