diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-04-07 21:06:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:39:52 +0200 |
commit | 6b3b09cd4daa81bab35375f54c4548dea930c238 (patch) | |
tree | ba0a26b5dbf1e66f649ea5435db57b553990fa5a /scripts/gdb/linux/utils.py | |
parent | 36078cae3790ac638013a43a93542a729082272c (diff) |
arm64/ftrace: fix inadvertent BUG() in trampoline check
commit 5a3ae7b314a2259b1188b22b392f5eba01e443ee upstream.
The ftrace trampoline code (which deals with modules loaded out of
BL range of the core kernel) uses plt_entries_equal() to check whether
the per-module trampoline equals a zero buffer, to decide whether the
trampoline has already been initialized.
This triggers a BUG() in the opcode manipulation code, since we end
up checking the ADRP offset of a 0x0 opcode, which is not an ADRP
instruction.
So instead, add a helper to check whether a PLT is initialized, and
call that from the frace code.
Cc: <stable@vger.kernel.org> # v5.0
Fixes: bdb85cd1d206 ("arm64/module: switch to ADRP/ADD sequences for PLT entries")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions