Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-03 Thread Jiri Kosina
On Mon, 3 Sep 2007, Franck Bui-Huu wrote: > > > +/* overriden by architectures supporting brk randomization */ > > > +void __weak arch_randomize_brk(struct mm_struct *mm) { } > I was actually suggesting in my last email: > unsigned long randomize_brk(unsigned long brk) > therefore arch speci

Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-03 Thread Franck Bui-Huu
Hi, Jiri Kosina wrote: > > [snip] > > +/* overriden by architectures supporting brk randomization */ > > +void __weak arch_randomize_brk(struct mm_struct *mm) { } I was actually suggesting in my last email: unsigned long randomize_brk(unsigned long brk) therefore arch specific code d

Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-03 Thread Jiri Kosina
On Mon, 3 Sep 2007, Jiri Kosina wrote: > the problem I am seeing with __weak functions is that as far as I can > see, gcc 4.1.0 optimizes the empty __weak function away with -O2, so it > is not later properly overridden by the other non-weak function, as the > callsite already doesn't have the

Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-03 Thread Jiri Kosina
On Sun, 2 Sep 2007, Andrew Morton wrote: > > What about using a weak function in that case ? It actually gives a > > default implementation in _one_ place and can be changed easily from a > > nop to something more complex later. > Yeah, weak functions are by far the cleanest way of doing this -

Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-02 Thread Andrew Morton
> On Sat, 01 Sep 2007 22:19:01 +0200 Franck Bui-Huu <[EMAIL PROTECTED]> wrote: > Hello Andrew, > > Andrew Morton wrote: > > On Thu, 30 Aug 2007 17:10:03 +0200 (CEST) Jiri Kosina <[EMAIL PROTECTED]> > > wrote: > >> Andrew, do you still strongly oppose to having ARCH_HAS_RANDOMIZE_BRK > >> macro i

Re: [PATCH] i386 and x86_64: randomize brk()

2007-09-01 Thread Franck Bui-Huu
Hello Andrew, Andrew Morton wrote: > On Thu, 30 Aug 2007 17:10:03 +0200 (CEST) Jiri Kosina <[EMAIL PROTECTED]> > wrote: >> Andrew, do you still strongly oppose to having ARCH_HAS_RANDOMIZE_BRK >> macro instead please? >> > > Not strongly, but the general opinion seems to be that ARCH_HAS_FOO is

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-31 Thread Jiri Kosina
On Thu, 30 Aug 2007, Andrew Morton wrote: > Not strongly, but the general opinion seems to be that ARCH_HAS_FOO is > sucky. It should at least be done in Kconfig rather than in .h, but > even better is just to implement the thing for all architectures. Below is an updated patch. checkpatch com

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Andrew Morton
On Thu, 30 Aug 2007 17:10:03 +0200 (CEST) Jiri Kosina <[EMAIL PROTECTED]> wrote: > On Thu, 30 Aug 2007, Mike Frysinger wrote: > > > Blackfin too please :) i think v850 also falls into this category, but > > i'm not terribly familiar with it ... > > Andrew, do you still strongly oppose to having

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Franck Bui-Huu
Jiri Kosina wrote: > On Thu, 30 Aug 2007, Mike Frysinger wrote: > >> Blackfin too please :) i think v850 also falls into this category, but >> i'm not terribly familiar with it ... > > Andrew, do you still strongly oppose to having ARCH_HAS_RANDOMIZE_BRK > macro instead please? > you might wa

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Mike Frysinger wrote: > Blackfin too please :) i think v850 also falls into this category, but > i'm not terribly familiar with it ... Andrew, do you still strongly oppose to having ARCH_HAS_RANDOMIZE_BRK macro instead please? Thanks, -- Jiri Kosina SUSE Labs - To unsubs

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Mike Frysinger
On 8/30/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > On Thu, 30 Aug 2007, Mike Frysinger wrote: > > does it really make sense to stick stubs into no-mmu ports which cannot > > utilize the ELF binfmt ? > > Good point, thanks. I have removed the stubs for h8300 and m68knommu. Blackfin too please :)

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Mike Frysinger wrote: > does it really make sense to stick stubs into no-mmu ports which cannot > utilize the ELF binfmt ? Good point, thanks. I have removed the stubs for h8300 and m68knommu. From: Jiri Kosina <[EMAIL PROTECTED]> i386 and x86_64: randomize brk() This pa

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-30 Thread Mike Frysinger
On 8/30/07, Jiri Kosina <[EMAIL PROTECTED]> wrote: > From: Jiri Kosina <[EMAIL PROTECTED]> > > i386 and x86_64: randomize brk() > > This patch randomizes the location of the heap (brk) for i386 and x86_64. > The range is randomized in the range starting at current brk location up > to 0x0200 of

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-22 Thread Jiri Kosina
On Wed, 22 Aug 2007, Andrew Morton wrote: > My main concern right now is to try to stabilise the rc3-mm1 mess, so I > think I'll duck this for now. OK, I'll clean the ifdefs up and resubmit to you when -mm stabilizes a little bit. Thanks, -- Jiri Kosina - To unsubscribe from this list: send

Re: [PATCH] i386 and x86_64: randomize brk()

2007-08-22 Thread Andrew Morton
On Wed, 22 Aug 2007 18:05:01 +0200 (CEST) Jiri Kosina <[EMAIL PROTECTED]> wrote: > From: Jiri Kosina <[EMAIL PROTECTED]> > > i386 and x86_64: randomize brk() > > This patch randomizes the location of the heap (brk) for i386 and x86_64. > The range is randomized in the range starting at current