[PATCH -tip 0/2] x86/kprobes: Fix and cleanup can_boost()

From: Masami Hiramatsu
Date: Thu Mar 25 2021 - 06:09:12 EST


Hi,

Here are 2 bugfixes for the x86/kprobes, [1/2] fixes an old bug which tries to find
instruction prefixes in insn->opcode (which should be never found) and misusing
insn->attr. [2/2] fixes a new bug found by Coverity in the recent commit 6256e668b7
("x86/kprobes: Use int3 instead of debug trap for single-step").
To fix the 2nd one, [2/2] also cleanup the switch-case with range cases, because
that is much more clear what is not boostable.

Thank you,

---

Masami Hiramatsu (2):
x86/kprobes: Fix to check non boostable prefixes correctly
x86/kprobes: Fix to identify indirect jmp and others using range case


arch/x86/kernel/kprobes/core.c | 57 +++++++++++++++++++++-------------------
1 file changed, 30 insertions(+), 27 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@xxxxxxxxxx>