Re: [PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-12-19 Thread Jiri Kosina
On Thu, 19 Dec 2013, Timo Teras wrote: > > > As you see, the main executable is mapped 5762-57708000 and > > > 57708000-5770a000. Heap follow immediately after that > > > 5770a000-5770c000 followed by anything mmaped after it (stack or > > > some other libraries). Heap can grow only up to 5ffd

Re: [PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-12-19 Thread Timo Teras
On Thu, 19 Dec 2013 16:02:19 +0100 (CET) Jiri Kosina wrote: > On Thu, 19 Dec 2013, Timo Teras wrote: > > > As you see, the main executable is mapped 5762-57708000 and > > 57708000-5770a000. Heap follow immediately after that > > 5770a000-5770c000 followed by anything mmaped after it (stack o

Re: [PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-12-19 Thread Jiri Kosina
On Thu, 19 Dec 2013, Timo Teras wrote: > 5756c000-5757 rw-p 00:00 0 > 5757-575dd000 r-xp 00:0f 2039 > /lib/libuClibc-0.9.33.2-git.so > 575dd000-575de000 r--p 0006c000 00:0f 2039 > /lib/libuClibc-0.9.33.2-git.so > 575de000-575df000 rw-p 0006d000 00:0f 2039

Re: [PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-12-19 Thread Timo Teras
On Thu, 19 Dec 2013 15:17:03 +0100 (CET) Jiri Kosina wrote: > On Wed, 2 Oct 2013, Timo Teräs wrote: > > > arch/*/include/asm/elf.h comments say: > > ELF_ET_DYN_BASE is the location that an ET_DYN program is loaded > > if exec'ed. Typical use of this is to invoke "./ld.so someprog" > > to

Re: [PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-12-19 Thread Jiri Kosina
On Wed, 2 Oct 2013, Timo Teräs wrote: > arch/*/include/asm/elf.h comments say: > ELF_ET_DYN_BASE is the location that an ET_DYN program is loaded > if exec'ed. Typical use of this is to invoke "./ld.so someprog" > to test out a new version of the loader. We need to make sure > that it is

[PATCH RFC] fs/binfmt_elf: fix memory map for PIE applications

2013-10-02 Thread Timo Teräs
arch/*/include/asm/elf.h comments say: ELF_ET_DYN_BASE is the location that an ET_DYN program is loaded if exec'ed. Typical use of this is to invoke "./ld.so someprog" to test out a new version of the loader. We need to make sure that it is out of the way of the program that it will "exec