linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: head-common.S: relocate atags area if necessary
Date: Fri, 18 Oct 2013 17:29:56 +0100	[thread overview]
Message-ID: <20131018162956.GE25034@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1382112776-20300-1-git-send-email-zonque@gmail.com>

On Fri, Oct 18, 2013 at 06:12:56PM +0200, Daniel Mack wrote:
> If the supplied atags/dtb pointer is located at memory inside the bss
> section, it will be erased by __mmap_switched. The problem is that the
> code that sets up the pointer can't know about a safe value unless it
> examines the kernel's symbol tables, so we should care about that case
> and relocate the area if necessary.
> 
> This patch does that from inside __vet_atags. In order to determine the
> size of the section in dtb cases, it reads the next word after the dtb
> binary magic, and also has to convert that value from big to CPU
> endianess. For the atags case, a total size of up to 4k is assumed for
> now.

I'm not convinced that this is a good solution.  If this oerlaps the
BSS region, it could well end up being overlapped by something else
more serious, like the data segment - at which point doing the fixup
here means we've already lost.

We already give the decompressor the size of the kernel's BSS and take
action if we believe that the kernel's BSS will overlap the DTB/ATAGs
there.

  reply	other threads:[~2013-10-18 16:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 16:12 [PATCH v2] ARM: head-common.S: relocate atags area if necessary Daniel Mack
2013-10-18 16:29 ` Russell King - ARM Linux [this message]
2013-10-18 17:09   ` Daniel Mack
2013-10-18 17:54     ` Russell King - ARM Linux
2013-10-19 15:15       ` Nicolas Pitre
2013-10-19 16:10         ` Daniel Mack
2013-10-19 16:13           ` Russell King - ARM Linux
2013-10-19 16:19             ` Daniel Mack

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=20131018162956.GE25034@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).