linux/arch/arm64
Catalin Marinas a067d94d37 arm64: kaslr: Adjust the offset to avoid Image across alignment boundary
With 16KB pages and a kernel Image larger than 16MB, the current
kaslr_early_init() logic for avoiding mappings across swapper table
boundaries fails since increasing the offset by kimg_sz just moves the
problem to the next boundary.

This patch rounds the offset down to (1 << SWAPPER_TABLE_SHIFT) if the
Image crosses a PMD_SIZE boundary.

Fixes: afd0e5a876 ("arm64: kaslr: Fix up the kernel image alignment")
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-08-22 18:15:42 +01:00
..
boot Allwinner fixes for 4.13, round 2 2017-08-18 11:55:44 +02:00
configs arm64: defconfig: enable missing HWSPINLOCK 2017-07-27 23:09:54 -05:00
crypto crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
include Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-08-20 09:34:24 -07:00
kernel arm64: kaslr: Adjust the offset to avoid Image across alignment boundary 2017-08-22 18:15:42 +01:00
kvm KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
lib arm64/lib: copy_page: use consistent prefetch stride 2017-07-25 10:04:42 +01:00
mm arm64: mm: abort uaccess retries upon fatal signal 2017-08-22 18:15:42 +01:00
net arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
xen xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Kconfig include/linux/string.h: add the option of fortified string.h functions 2017-07-12 16:26:03 -07:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: SoC 64-bit changes 2017-07-04 14:53:26 -07:00
Makefile arm64: pass endianness info to sparse 2017-06-26 10:15:06 +01:00