linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] ARM: zImage: make sure not to relocate on top of the relocation code
Date: Fri, 29 Apr 2011 00:03:34 -0700	[thread overview]
Message-ID: <20110429070334.GP3755@atomide.com> (raw)
In-Reply-To: <1304031024-5121-4-git-send-email-nico@fluxnic.net>

* Nicolas Pitre <nico@fluxnic.net> [110428 15:47]:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> If the zImage load address is slightly below the relocation address,
> there is a risk for the copied data to overwrite the copy loop or
> cache flush code that the relocation process requires.  Always
> bump the relocation address by the size of that code to avoid this
> issue.
> 
> Noticed by Tony Lindgren <tony@atomide.com>.
> 
> While at it, let's start the copy from the restart symbol which makes
> the above code size computation possible by the assembler directly,
> given that we don't need to preserve the code before that point anyway.
> And therefore we don't need to carry the _start pointer in r5 anymore.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

Cool, this works for my test case:

Tested-by: Tony Lindgren <tony@atomide.com>

  reply	other threads:[~2011-04-29  7:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 22:50 [PATCH 0/9] zImage fixes Nicolas Pitre
2011-04-28 22:50 ` [PATCH 1/9] ARM: zImage: make sure the stack is 64-bit aligned Nicolas Pitre
2011-04-29  6:58   ` Tony Lindgren
2011-04-28 22:50 ` [PATCH 2/9] ARM: zImage: Fix bad SP address after relocating kernel Nicolas Pitre
2011-04-28 22:50 ` [PATCH 3/9] ARM: zImage: make sure not to relocate on top of the relocation code Nicolas Pitre
2011-04-29  7:03   ` Tony Lindgren [this message]
2011-04-28 22:50 ` [PATCH 4/9] ARM: zImage: the page table memory must be considered before relocation Nicolas Pitre
2011-04-29  7:04   ` Tony Lindgren
2011-04-28 22:50 ` [PATCH 5/9] ARM: zImage: no need to get the decompressed size from the filesystem Nicolas Pitre
2011-04-28 22:50 ` [PATCH 6/9] ARM: zImage: simplify decompress_kernel() Nicolas Pitre
2011-04-28 22:50 ` [PATCH 7/9] ARM: zImage: don't ignore error returned from decompress() Nicolas Pitre
2011-04-29  7:05   ` Tony Lindgren
2011-04-28 22:50 ` [PATCH 8/9] ARM: zImage: remove the static qualifier from global data variables Nicolas Pitre
2011-04-29  7:07   ` Tony Lindgren
2011-04-29 20:12   ` Uwe Kleine-König
2011-04-29 20:37     ` Nicolas Pitre
2011-04-28 22:50 ` [PATCH 9/9] ARM: zImage: make sure no GOTOFF relocs are used with .bss symbols Nicolas Pitre
2011-04-29  7:11   ` Tony Lindgren

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=20110429070334.GP3755@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).