mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -tip 0/4] kprobes: Support __kprobes and NOKPROBE_SYMBOL in modules
@ 2020-03-26 14:49 Masami Hiramatsu
  2020-03-26 14:49 ` [PATCH -tip 1/4] kprobes: Lock kprobe_mutex while showing kprobe_blacklist Masami Hiramatsu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Masami Hiramatsu @ 2020-03-26 14:49 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: LKML, x86, Paul McKenney, Josh Poimboeuf, Joel Fernandes,
	Steven Rostedt, Alexei Starovoitov, Frederic Weisbecker,
	Mathieu Desnoyers, Brian Gerst, Juergen Gross, Alexandre Chartre,
	Peter Zijlstra, Tom Lendacky, Paolo Bonzini

Hi,

Here is a series for adding support of __kprobes attribute
and NOKPROBE_SYMBOL() macro in modules. With this series,
kprobes user can add its handlers and sub-functions to kprobe
blacklist so that other kprobes don't probe it.

Note that user should not use both __kprobes and NOKPROBE_SYMBOL()
to same function. In that case, the function will appear twice
on the blacklist, and that is a waste of memory.

Thomas, it is easy to add ".noinstr.text" support to this series.
as same as __kprobes (.kprobes.text) support in [2/4], we can
add mod->noinstr_text_start and mod->noinstr_text_size and
register it in add_module_kprobe_blacklist().


Thank you,

---

Masami Hiramatsu (4):
      kprobes: Lock kprobe_mutex while showing kprobe_blacklist
      kprobes: Support __kprobes blacklist in modules
      kprobes: Support NOKPROBE_SYMBOL() in modules
      samples/kprobes: Add __kprobes and NOKPROBE_SYMBOL() for handlers.


 include/linux/module.h              |    6 +++
 kernel/kprobes.c                    |   67 ++++++++++++++++++++++++++++++++++-
 kernel/module.c                     |    7 ++++
 samples/kprobes/kprobe_example.c    |    6 ++-
 samples/kprobes/kretprobe_example.c |    2 +
 5 files changed, 85 insertions(+), 3 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-26 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 14:49 [PATCH -tip 0/4] kprobes: Support __kprobes and NOKPROBE_SYMBOL in modules Masami Hiramatsu
2020-03-26 14:49 ` [PATCH -tip 1/4] kprobes: Lock kprobe_mutex while showing kprobe_blacklist Masami Hiramatsu
2020-03-26 14:49 ` [PATCH -tip 2/4] kprobes: Support __kprobes blacklist in modules Masami Hiramatsu
2020-03-26 14:50 ` [PATCH -tip 3/4] kprobes: Support NOKPROBE_SYMBOL() " Masami Hiramatsu
2020-03-26 14:50 ` [PATCH -tip 4/4] samples/kprobes: Add __kprobes and NOKPROBE_SYMBOL() for handlers Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome