[lkml]   [2007]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] [RESEND] i386 and x86_64: randomize brk()
On Tue, 11 Sep 2007 14:17:24 +0200 (CEST) Jiri Kosina <> wrote:

> i386 and x86_64: randomize brk()

I seem to have a different copy of this patch from the one which you
originally sent. It's the one which implements arch_randomize_brk() in
each arch's header file. Mayeb it wasn't cc'ed to a mailing list of maybe
I just lost the email, dunno.

Anyway, it breaks on ia64:

CC arch/ia64/ia32/binfmt_elf32.o
In file included from arch/ia64/ia32/binfmt_elf32.c:49:
arch/ia64/ia32/../../../fs/binfmt_elf.c: In function `load_elf_binary':
arch/ia64/ia32/../../../fs/binfmt_elf.c:1085: error: implicit declaration of function `arch_randomize_brk'
make[1]: *** [arch/ia64/ia32/binfmt_elf32.o] Error 1
make: *** [arch/ia64/ia32/binfmt_elf32.o] Error 2

This is because ia64 takes the exceptional stupidity which is our
elf-handling build system and adds an extra layer of stupidity on top of
it. Look:

akpm2:/usr/src/25> head include/asm-ia64/elf.h
#ifndef _ASM_IA64_ELF_H
#define _ASM_IA64_ELF_H

* ELF-specific definitions.
* Copyright (C) 1998-1999, 2002-2004 Hewlett-Packard Co
* David Mosberger-Tang <>

akpm2:/usr/src/25> grep -r _ASM_IA64_ELF_H arch/ia64
arch/ia64/ia32/ia32priv.h:#define _ASM_IA64_ELF_H /* Don't include elf.h */

can you believe this stuff?

Anyway, I'm presently running with this loveliness:

--- a/include/asm-ia64/elf.h~i386-and-x86_64-randomize-brk-2-fix
+++ a/include/asm-ia64/elf.h
@@ -249,8 +249,10 @@ do { \

#endif /* __KERNEL__ */

+#endif /* _ASM_IA64_ELF_H */
+#ifndef IA64_IS_WEIRD
static inline void arch_randomize_brk(void)
-#endif /* _ASM_IA64_ELF_H */
Wanna see if there's something saner we can do please?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-10-11 10:21    [W:0.122 / U:35.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site