mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Abel Bernabeu <abelbg@m2grp.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Patch] Elf loader crash while zero-filling .bss
Date: Mon, 11 Feb 2008 19:53:44 +0100	[thread overview]
Message-ID: <20080211185344.GA25510@uranus.ravnborg.org> (raw)
In-Reply-To: <15577be70802111027s59bc16f7q7c0be42cc44f9ad7@mail.gmail.com>

On Mon, Feb 11, 2008 at 07:27:35PM +0100, Abel Bernabeu wrote:
> I've finally found a solution for the crash in load_binary_elf I
> reported last week:
> 
> http://lkml.org/lkml/2008/1/30/171
> 
> The attached patch solves my problem, but please test it yourself...
> 
> 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).

What architecture was this?
Most architectures align .bss properly but it seems arm does not
and I guess this is needed.

As .bss was empty? in your case you did not trigger
any alignmnet by linker due to largest member in section => boom.

I do think your patch paper over the real bug.

	Sam

      parent reply	other threads:[~2008-02-11 18:53 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
2008-02-11 20:40           ` Jiri Kosina
2008-02-11 22:14             ` Andreas Schwab
2008-02-11 18:53 ` Sam Ravnborg [this message]

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=20080211185344.GA25510@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=abelbg@m2grp.com \
    --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