]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: Move the trampoline to be before PAN
authorSteve Capper <steve.capper@arm.com>
Thu, 11 Jan 2018 10:11:58 +0000 (10:11 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Sun, 14 Jan 2018 18:49:51 +0000 (18:49 +0000)
commiteee5b332f86abcbec12c3f9adfe906cfa67899c4
tree50895034b7250a4528e95bfcb9f3f79e17312585
parent3ab41865c604a2d6d0f78c3436b335b024ccd041
arm64: entry: Move the trampoline to be before PAN

The trampoline page tables are positioned after the early page tables in
the kernel linker script.

As we are about to change the early page table logic to resolve the
swapper size at link time as opposed to compile time, the
SWAPPER_DIR_SIZE variable (currently used to locate the trampline)
will be rendered unsuitable for low level assembler.

This patch solves this issue by moving the trampoline before the PAN
page tables. The offset to the trampoline from ttbr1 can then be
expressed by: PAGE_SIZE + RESERVED_TTBR0_SIZE, which is available to the
entry assembler.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/entry.S
arch/arm64/kernel/vmlinux.lds.S