ARM: kprobes: check register usage for probed instruction.
This patch utilizes the previously introduced checker to check register usage for probed ARM instruction and saves it in a mask. A further patch will use such information to avoid simulation or emulation. Signed-off-by: Wang Nan <wangnan0@huawei.com> Reviewed-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org>
This commit is contained in:
@@ -435,6 +435,13 @@ probes_decode_insn(probes_opcode_t insn, struct arch_probes_insn *asi,
|
||||
*/
|
||||
asi->stack_space = 0;
|
||||
|
||||
/*
|
||||
* Similarly to stack_space, register_usage_flags is filled by
|
||||
* checkers. Its default value is set to ~0, which is 'all
|
||||
* registers are used', to prevent any potential optimization.
|
||||
*/
|
||||
asi->register_usage_flags = ~0UL;
|
||||
|
||||
if (emulate)
|
||||
insn = prepare_emulated_insn(insn, asi, thumb);
|
||||
|
||||
|
Reference in New Issue
Block a user