OSDN Git Service

arm64/module: ftrace: deal with place relative nature of PLTs
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 13 Apr 2019 06:59:25 +0000 (23:59 -0700)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 23 Apr 2019 12:35:00 +0000 (13:35 +0100)
commit4e69ecf4da1ee0b2ac735e1f1bb13935acd5a38d
treeae2a3114a580f1a47890883ead541ba5b8d0ec14
parentd4d18e3ec6091843f607e8929a56723e28f393a6
arm64/module: ftrace: deal with place relative nature of PLTs

Another bodge for the ftrace PLT code: plt_entries_equal() now takes
the place relative nature of the ADRP/ADD based PLT entries into
account, which means that a struct trampoline instance on the stack
is no longer equal to the same set of opcodes in the module struct,
given that they don't point to the same place in memory anymore.

Work around this by using memcmp() in the ftrace PLT handling code.

Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/ftrace.c