Re: brk randomization breaks columns

From: Pavel Machek
Date: Mon Feb 04 2008 - 15:25:31 EST


Hi!

> > Not sure this helps... If I only randomize _end_ of heap, it still
> > works. If I try to randomize beggining of heap, too, it will not even
> > start recent binaries :-(.
>
> I don't uderstand this, sorry. Ehen the mapping for the new process is
> being established during loading of the binary, the beginning and the end
> of the heap are the same ...

Okay, I was assuming this is mapping heap..

/* Calling set_brk effectively mmaps the pages that we need
* for the bss and break sections. We must do this before
* mapping in the interpreter, to make sure it doesn't wind
* up getting placed where the bss needs to go.
*/
retval = set_brk(elf_bss, elf_brk);

If I add

+ elf_brk += random;

before set_brk() (and revert the brk randomization), it works,
including columns.

If I add

+// elf_bss += random;

before set_brk(), I break everything.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/