linux/arch/arm64
Mark Rutland cb083816ab arm64: page-align sections for DEBUG_RODATA
A kernel built with DEBUG_RO_DATA && !CONFIG_DEBUG_ALIGN_RODATA doesn't
have .text aligned to a page boundary, though fixup_executable works at
page-granularity thanks to its use of create_mapping. If .text is not
page-aligned, the first page it exists in may be marked non-executable,
leading to failures when an attempt is made to execute code in said
page.

This patch upgrades ALIGN_DEBUG_RO and ALIGN_DEBUG_RO_MIN to force page
alignment for DEBUG_RO_DATA && !CONFIG_DEBUG_ALIGN_RODATA kernels,
ensuring that all sections with specific RWX permission requirements are
mapped with the correct permissions.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Laura Abbott <laura@labbott.name>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Fixes: da141706ae ("arm64: add better page protections to arm64")
Cc: <stable@vger.kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-10-29 17:23:39 +00:00
..
boot arm64: dts: juno: describe PMUs separately 2015-10-07 14:25:41 +01:00
configs arm64: defconfig: Enable samsung serial and mmc 2015-10-07 11:34:24 +01:00
crypto crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
include arm64: Fix compat register mappings 2015-10-29 16:55:15 +00:00
kernel arm64: page-align sections for DEBUG_RODATA 2015-10-29 17:23:39 +00:00
kvm arm64/kvm: Make use of the system wide safe values 2015-10-21 15:35:59 +01:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: Fix build with CONFIG_ZONE_DMA=n 2015-10-29 16:58:00 +00:00
net arm64: bpf: fix endianness conversion bugs 2015-06-26 14:15:39 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: make Timer Interrupt Frequency selectable 2015-10-28 18:48:18 +00:00
Kconfig.debug arm64: Clean config usages for page size 2015-10-19 17:53:57 +01:00
Kconfig.platforms arm64: Enable Marvell Berlin SoC family in Kconfig 2015-08-06 10:15:01 +02:00
Makefile arm64: add KASAN support 2015-10-12 17:46:36 +01:00