]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mmu: apply strict permissions to .init.text and .init.data
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 9 Mar 2017 20:52:03 +0000 (21:52 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 23 Mar 2017 13:54:50 +0000 (13:54 +0000)
commit87eb626754d9372e35c9e42e44590ed7cc1a84fc
tree35b2361b9bd6cbd9668cd0562b77bcc076c7a893
parente3af2f75c93511646a7810405ef38d7b2f726afc
arm64: mmu: apply strict permissions to .init.text and .init.data

To avoid having mappings that are writable and executable at the same
time, split the init region into a .init.text region that is mapped
read-only, and a .init.data region that is mapped non-executable.

This is possible now that the alternative patching occurs via the linear
mapping, and the linear alias of the init region is always mapped writable
(but never executable).

Since the alternatives descriptions themselves are read-only data, move
those into the .init.text region.

Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/sections.h
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/mmu.c