Skip to content
  • Franck Bui-Huu's avatar
    Break ELF_PLATFORM and stack pointer randomization dependency · d68c9d6a
    Franck Bui-Huu authored
    Currently arch_align_stack() is used by fs/binfmt_elf.c to randomize
    stack pointer inside a page. But this happens only if ELF_PLATFORM
    symbol is defined.
    ELF_PLATFORM is normally set if the architecture wants to load
    implementation specific libraries for optimization. And currently a
    lot of architectures just yield this symbol to NULL.
    This is the case for MIPS architecture where ELF_PLATFORM is NULL but
    arch_align_stack() has been redefined to do stack inside page
    randomization. So in this case no randomization is actually done.
    This patch breaks this dependency which seems to be useless and allows
    platforms such MIPS to do the randomization.
    Signed-off-by: default avatarFranck Bui-Huu <>
    Cc: Ingo Molnar <>
    Cc: Arjan van de Ven <>
    Cc: Ralf Baechle <>
    Signed-off-by: default avatarAndrew Morton <>
    Signed-off-by: default avatarLinus Torvalds <>