linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jeremy.linton@arm.com (Jeremy Linton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Align .text section to PAGE_SIZE
Date: Fri, 23 Oct 2015 11:32:15 -0500	[thread overview]
Message-ID: <562A610F.4090101@arm.com> (raw)
In-Reply-To: <CAKv+Gu_5YPiQOejsAUdVs7YbNJD4tFwuATYq6VNxuXbeRsoYkw@mail.gmail.com>

On 10/23/2015 10:34 AM, Ard Biesheuvel wrote:
> It looks like fixup_executable() [with DEBUG_RODATA enabled] is the
> culprit here: it calls create mapping() with a size that gets rounded
> up to a multiple of PAGE_SIZE, which means the region that ends up
> getting its exec bits cleared is larger than it should. Perhaps it is
> better to fix that instead?

Ard,
	Thanks for taking a look at this!

	Your probably right.

	But AFAIK, with just that fix text/ro sections can be partially mapped 
without ro. It seems to me that putting a little padding in so that they 
are on separate pages is a good idea, especially since it seems the 
remaining sections of interest are page aligned, either explicitly in 
the linker script or via assembly directives in assorted places.

	Maybe a clearer fix is an additional ifdef in the DEBUG_ALIGN_RODATA 
stanza which sets ALIGN_DEBUG_RO to align to pagesize if DEBUG_RODATA is 
set, that way it only takes affect for RODATA.

Thanks,
	Jeremy

  reply	other threads:[~2015-10-23 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 14:22 [PATCH] arm64: Align .text section to PAGE_SIZE Jeremy Linton
2015-10-23 15:34 ` Ard Biesheuvel
2015-10-23 16:32   ` Jeremy Linton [this message]
2015-10-23 16:49     ` Ard Biesheuvel
2015-10-23 18:13       ` Jeremy Linton
2015-10-24  2:29         ` Ard Biesheuvel

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=562A610F.4090101@arm.com \
    --to=jeremy.linton@arm.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).