linux/arch/arm64
Mark Rutland d3a80fbec2 arm64: page-align sections for DEBUG_RODATA
commit cb083816ab upstream.

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")
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-12-09 14:03:22 -05:00
..
boot - dts: mt8173: fix compatible string 2015-06-01 17:06:51 +02:00
configs ARM: SoC 64-bit changes for v4.1 2015-04-22 09:23:58 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-05-11 11:05:13 -07:00
include arm64: Fix compat register mappings 2015-12-09 14:03:22 -05:00
kernel arm64: page-align sections for DEBUG_RODATA 2015-12-09 14:03:22 -05:00
kvm arm64: KVM: Disable virtual timer even if the guest is not using it 2015-09-29 19:26:01 +02:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: readahead: fault retry breaks mmap file read random detection 2015-10-22 14:43:25 -07:00
net arm64: bpf: fix endianness conversion bugs 2015-08-03 09:29:18 -07:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: errata: add module build workaround for erratum #843419 2015-09-29 19:26:00 +02:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Makefile arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419 2015-10-27 09:51:54 +09:00