2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 18:23:53 +08:00
linux-next/arch/arm64/kernel/probes
David A. Long 3e593f6675 arm64: Improve kprobes test for atomic sequence
Kprobes searches backwards a finite number of instructions to determine if
there is an attempt to probe a load/store exclusive sequence. It stops when
it hits the maximum number of instructions or a load or store exclusive.
However this means it can run up past the beginning of the function and
start looking at literal constants. This has been shown to cause a false
positive and blocks insertion of the probe. To fix this, further limit the
backwards search to stop if it hits a symbol address from kallsyms. The
presumption is that this is the entry point to this code (particularly for
the common case of placing probes at the beginning of functions).

This also improves efficiency by not searching code that is not part of the
function. There may be some possibility that the label might not denote the
entry path to the probed instruction but the likelihood seems low and this
is just another example of how the kprobes user really needs to be
careful about what they are doing.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: David A. Long <dave.long@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-09-15 08:33:46 +01:00
..
decode-insn.c arm64: Improve kprobes test for atomic sequence 2016-09-15 08:33:46 +01:00
decode-insn.h arm64: kprobes instruction simulation support 2016-07-19 15:03:21 +01:00
kprobes_trampoline.S arm64: Add trampoline code for kretprobes 2016-07-19 15:03:22 +01:00
kprobes.c arm64: Create sections.h 2016-08-25 18:00:29 +01:00
Makefile arm64: Add trampoline code for kretprobes 2016-07-19 15:03:22 +01:00
simulate-insn.c arm64: kprobes instruction simulation support 2016-07-19 15:03:21 +01:00
simulate-insn.h arm64: kprobes instruction simulation support 2016-07-19 15:03:21 +01:00