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

From: Jiri Kosina
Date: Thu Dec 19 2013 - 09:17:12 EST


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 out of the way of the program that it will "exec",
> and that there is sufficient room for the brk.
>
> In case we have main application linked as PIE, this can cause
> problems as the main program itself is being loaded to this
> alternate address. And this allows limited heap size. While
> this is inevitable when exec'ing the interpreter directly,
> we should do better for PIE applications.

Timo,

could you please provide more specific example of the breakage scenario
you are talking about? It's not completely clear to me from your commit
message.

Thanks,

--
Jiri Kosina
SUSE Labs
--
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/