linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: Fix RANDOMIZE_TEXT_OFFSET for !4K kernels
@ 2016-05-31 14:57 Mark Rutland
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Rutland @ 2016-05-31 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-31 14:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 14:57 [PATCH 0/2] arm64: Fix RANDOMIZE_TEXT_OFFSET for !4K kernels Mark Rutland
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

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).