diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-03-30 16:45:59 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-04-14 16:31:49 +0100 |
commit | e44308e62e19b42810207780a2a32148af0cb5d9 (patch) | |
tree | 0d484f889d6c1f7ba8cc4ec1984ee5d7350869b5 /arch/arm64/kernel | |
parent | 22b6f3b0549be61a2d5fe8210ff7628e6d2d8185 (diff) |
arm64: insn: avoid virt_to_page() translations on core kernel symbols
Before restricting virt_to_page() to the linear mapping, ensure that
the text patching code does not use it to resolve references into the
core kernel text, which is mapped in the vmalloc area.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/insn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c index 7371455160e5..368c08290dd8 100644 --- a/arch/arm64/kernel/insn.c +++ b/arch/arm64/kernel/insn.c @@ -96,7 +96,7 @@ static void __kprobes *patch_map(void *addr, int fixmap) if (module && IS_ENABLED(CONFIG_DEBUG_SET_MODULE_RONX)) page = vmalloc_to_page(addr); else if (!module && IS_ENABLED(CONFIG_DEBUG_RODATA)) - page = virt_to_page(addr); + page = pfn_to_page(PHYS_PFN(__pa(addr))); else return addr; |