Re: [Patch] Elf loader crash while zero-filling .bss
From: Jiri Kosina
Date: Mon Feb 11 2008 - 13:47:38 EST
On Mon, 11 Feb 2008, Abel Bernabeu wrote:
> > set_brk(start, end) allocs just page aligned regions (by "colapsing"
> > both extremes to the start of the page in which they lay)... That
> > means than even if both pointers are not equal there are still some
> > chances that set_brk has allocated no space at all because
> > ELF_PAGEALIGN(elf_bss) != ELF_PAGEALIGN(elf_brk).
> Sorry this was an errata in my comment: no space is allocated at all
> because ELF_PAGEALIGN(elf_bss) == ELF_PAGEALIGN(elf_brk)
I also don't fully understand the "colapsing" part ... ELF_PAGEALIGN()
really aligns the address to the nearest page boundary at the higher
address ... so I don't understand the comment about colapsing to the start
of the page that contains the address, it's seems to me that the real
behavior is quite the opposite.
--
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/