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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 brk location up 
> to 0x02000000 offset on both architectures. This, together with 
> pie-executable-randomization.patch and 
> pie-executable-randomization-fix.patch, should make the address space 
> randomization on i386 and x86_64 complete (modulo vDSO randomization).
> 
> The code is based on execshield code written by Ingo Molnar.

My main concern right now is to try to stabilise the rc3-mm1 mess, so I
think I'll duck this for now.  

> +#ifdef ARCH_HAS_RANDOMIZE_BRK
> +	if (current->flags & PF_RANDOMIZE)
> +		arch_randomize_brk();
> +#endif

erk, please no.

It'd be better to put

static inline void arch_randomize_brk(void)
{
}

into all the other architecture's elf.h, then lose all the ifdefs.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux