Home
last modified time | relevance | path

Searched hist:"3 e593f66754def77fa3433c595f941f1defe4af1" (Results 1 – 1 of 1) sorted by relevance

/linux/arch/arm64/kernel/probes/
H A Ddecode-insn.cdiff 3e593f66754def77fa3433c595f941f1defe4af1 Mon Sep 12 20:21:27 CEST 2016 David A. Long <dave.long@linaro.org> 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>