public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RESEND] i386 and x86_64: randomize brk()
Date: Thu, 11 Oct 2007 01:18:00 -0700	[thread overview]
Message-ID: <20071011011800.0c051792.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0709111416390.7343@jikos.suse.cz>

On Tue, 11 Sep 2007 14:17:24 +0200 (CEST) Jiri Kosina <jkosina@suse.cz> 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 <davidm@hpl.hp.com>
 */

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 */
+#endif
_

Wanna see if there's something saner we can do please?

  parent reply	other threads:[~2007-10-11  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11 12:17 [PATCH] [RESEND] i386 and x86_64: randomize brk() Jiri Kosina
2007-09-14  5:07 ` Andrew Morton
2007-09-14  8:30   ` Jiri Kosina
2007-10-11  8:18 ` Andrew Morton [this message]
2007-10-11  8:26   ` Andrew Morton
2007-10-11  8:55   ` Andrew Morton
2007-10-11  9:27     ` Jiri Kosina
2007-10-19 22:10     ` Jiri Kosina
2007-10-23 22:13       ` Jiri Kosina
2007-10-11  9:23   ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071011011800.0c051792.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox