Skip to content

kprobes: Remove BUG_ON from kprobes

Masami Hiramatsu lkml 2 versions – New

Get series with b4
b4 am 153666112297.21306.4621579144717171778.stgit@devbox

Versions newest first · linked by author and title

  1. v2 Latest5 patches 0 repliesNew
  2. v15 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5kprobes: Remove meaningless BUG_ON from disarming processkernel/kprobes.c+0 -10 replies
2/5kprobes: Remove meaningless BUG_ON from add_new_kprobekernel/kprobes.c+0 -20 replies
3/5kprobes: Remove meaningless BUG_ON from reuse_unused_kprobekernel/kprobes.c+0 -10 replies
4/5kprobes: Return error if fail to reuse kprobe instead of BUG_ONkernel/kprobes.c+20 -70 replies
5/5kprobes: Don't call BUG_ON if there is a kprobe in use on free listkernel/kprobes.c+7 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH -tip v2 0/5] kprobes: Remove BUG_ON from kprobes

Hi,

Here are v2 patches to remove BUG_ON from kprobes.

Since BUG_ON() kills the machine, it must not be used for debugging or assertion. These patches remove meaningless BUG_ON or replace it with return errors.

In this version, I updated 5/5 to use WARN_ON_ONCE() for unusual case, according to Ingo's comment.

Thank you,

---

Masami Hiramatsu (5):
kprobes: Remove meaningless BUG_ON from disarming process
kprobes: Remove meaningless BUG_ON from add_new_kprobe
kprobes: Remove meaningless BUG_ON from reuse_unused_kprobe
kprobes: Return error if fail to reuse kprobe instead of BUG_ON
kprobes: Don't call BUG_ON if there is a kprobe in use on free list

 kernel/kprobes.c |   39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

--
Masami Hiramatsu (Linaro) <[email protected]>