linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] arm64: Fix RANDOMIZE_TEXT_OFFSET for !4K kernels
Date: Tue, 31 May 2016 15:57:58 +0100	[thread overview]
Message-ID: <1464706680-15713-1-git-send-email-mark.rutland@arm.com> (raw)

Recently we inadvertently broke RANDOMIZE_TEXT_OFFSET for !4K page
kernels, as we changed the way we map the kernel image. Now, when
TEXT_OFFSET is not a multiple of the kernel page size, we may attempt to
create (block) entries for misaligned addresses, leading to failures at
pagetable creation time.

To avoid this issue, these patches ensure that the TEXT_OFFSET value is
always a multiple of the kernel page size. Doing this requires factoring
PAGE_SHIFT out into Kconfig such that it is available to the awk code
that generates TEXT_OFFSET.

Thanks,
Mark.

Mark Rutland (2):
  arm64: move {PAGE,CONT}_SHIFT into Kconfig
  arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled

 arch/arm64/Kconfig            | 12 ++++++++++++
 arch/arm64/Makefile           |  4 +++-
 arch/arm64/include/asm/page.h | 12 ++----------
 3 files changed, 17 insertions(+), 11 deletions(-)

-- 
1.9.1

             reply	other threads:[~2016-05-31 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 14:57 Mark Rutland [this message]
2016-05-31 14:57 ` [PATCH 1/2] arm64: move {PAGE,CONT}_SHIFT into Kconfig Mark Rutland
2016-05-31 14:58 ` [PATCH 2/2] arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled Mark Rutland

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=1464706680-15713-1-git-send-email-mark.rutland@arm.com \
    --to=mark.rutland@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).