aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <[email protected]>2020-09-14 14:06:56 +0530
committerWill Deacon <[email protected]>2020-09-14 12:07:03 +0100
commit03c9c8fad6cb5e8fdfb40287fa1cdf8ee2db0b67 (patch)
tree28016ad28f6ae4f16e8a63da88513080811f4950
parent6560edca515e53bb2e7c637ab324313680a133f4 (diff)
arm64: kprobe: clarify the comment of steppable hint instructions
The existing comment about steppable hint instruction is not complete and only describes NOP instructions as steppable. As the function aarch64_insn_is_steppable_hint allows all white-listed instruction to be probed so the comment is updated to reflect this. Signed-off-by: Amit Daniel Kachhap <[email protected]> Reviewed-by: Dave Martin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--arch/arm64/kernel/probes/decode-insn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kernel/probes/decode-insn.c b/arch/arm64/kernel/probes/decode-insn.c
index c541fb48886e..104101f633b1 100644
--- a/arch/arm64/kernel/probes/decode-insn.c
+++ b/arch/arm64/kernel/probes/decode-insn.c
@@ -43,8 +43,10 @@ static bool __kprobes aarch64_insn_is_steppable(u32 insn)
!= AARCH64_INSN_SPCLREG_DAIF;
/*
- * The HINT instruction is is problematic when single-stepping,
- * except for the NOP case.
+ * The HINT instruction is steppable only if it is in whitelist
+ * and the rest of other such instructions are blocked for
+ * single stepping as they may cause exception or other
+ * unintended behaviour.
*/
if (aarch64_insn_is_hint(insn))
return aarch64_insn_is_steppable_hint(insn);