mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Abel Bernabeu <abelbg@m2grp.com>, linux-kernel@vger.kernel.org
Subject: Re: [Patch] Elf loader crash while zero-filling .bss
Date: Mon, 11 Feb 2008 12:35:55 -0800	[thread overview]
Message-ID: <47B0B1AB.3020203@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0802112026470.30955@jikos.suse.cz>

Jiri Kosina wrote:
> On Mon, 11 Feb 2008, Abel Bernabeu wrote:
> 
>> In such a way that set_brk(0x0, 0x100) does not alloc any space at all. 
>> There are just more ways to get no memory allocation than 
>> set_brk(elf_bss, elf_bss) (the equalness condition i've changed).
>> Sorry, the correct description for the patch may be:
>> set_brk(start, end) allocs just page aligned regions (by "colapsing"
>> both extremes to the END 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 because
>> ELF_PAGEALIGN(elf_bss) == ELF_PAGEALIGN(elf_brk)
> 
> Now, the question is whether it is valid for ELF binary to not have the 
> end of .bss section (if present at all) not page-aligned.
> 

Why wouldn't it be?  It would, however, be valid to the kernel to round 
it up to the next boundary.

	-hpa

  reply	other threads:[~2008-02-11 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 18:27 Abel Bernabeu
2008-02-11 18:32 ` Abel Bernabeu
2008-02-11 18:47   ` Jiri Kosina
     [not found]     ` <15577be70802111111x36f61433p321e5b8175a13d08@mail.gmail.com>
2008-02-11 19:28       ` Jiri Kosina
2008-02-11 20:35         ` H. Peter Anvin [this message]
2008-02-11 20:40           ` Jiri Kosina
2008-02-11 22:14             ` Andreas Schwab
2008-02-11 18:53 ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B0B1AB.3020203@zytor.com \
    --to=hpa@zytor.com \
    --cc=abelbg@m2grp.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome