1
0
Fork 0

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>
hifive-unleashed-5.1
Ard Biesheuvel 2016-03-30 16:45:59 +02:00 committed by Will Deacon
parent 22b6f3b054
commit e44308e62e
1 changed files with 1 additions and 1 deletions

View File

@ -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;