Skip to content

RFC x86: Catch stray non-kprobe breakpoints

Abhishek Sagar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86: Move in_kprobes_functions to linux/kprobes.hinclude/linux/kprobes.h kernel/kprobes.c+9 -80 replies
2/3x86: Macrofy resuable codearch/x86/kernel/kprobes.c+9 -32 replies
3/3x86: WARN_ON breakpoints from .kprobes.text sectionarch/x86/kernel/kprobes.c+9 -15 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3][RFC] x86: Catch stray non-kprobe breakpoints

Greetings,

Non kprobe breakpoints in the kernel might lie inside the .kprobes.text section. Such breakpoints can easily be identified by in_kprobes_functions and can be caught early. These are problematic and a warning should be emitted to discourage them (in any rare case, if they actually occur).

For this, a check can route the trap handling of such breakpoints away from kprobe_handler (which ends up calling even more functions marked as __kprobes) from inside kprobe_exceptions_notify.

All comments/suggestions are welcome.

--
Thanks & Regards,
Abhishek Sagar