Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16dc301b authored by Will Deacon's avatar Will Deacon Committed by Gerrit - the friendly Code Review server
Browse files

FROMLIST: arm64: mm: Map entry trampoline into trampoline and kernel page tables



The exception entry trampoline needs to be mapped at the same virtual
address in both the trampoline page table (which maps nothing else)
and also the kernel page table, so that we can swizzle TTBR1_EL1 on
exceptions from and return to EL0.

This patch maps the trampoline at a fixed virtual address in the fixmap
area of the kernel virtual address space, which allows the kernel proper
to be randomized with respect to the trampoline when KASLR is enabled.

Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Tested-by: default avatarLaura Abbott <labbott@redhat.com>
Tested-by: default avatarShanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git


 commit 51a0048beb449682d632d0af52a515adb9f9882e)
[ghackmann@google.com:
 - adjust context
 - tweak __create_pgd_mapping() call to match 3.18 APIs
 - expand definition of PGD_SIZE, which is private to pgd.c in 3.18]
 - open-code pgd_pgtable_alloc(), based on version in 4.9]
Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
Change-Id: I85f681757feeb43c6cb55fce10a619e24d31c9bd
Git-Commit: 771dd6d6
Git-repo: git://android.googlesource.com/kernel/common.git


[vinmenon@codeaurora.org: fixes for force pages feature]
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent c874c378
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment