All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] probes update for v6.8
@ 2024-01-09 15:23 Masami Hiramatsu
  2024-01-18 23:01 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2024-01-09 15:23 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Naveen N Rao, Steven Rostedt, Masami Hiramatsu, linux-kernel

Hi Linus,

Probes update for v6.8:

- Kprobes trace event to show the actual function name in notrace-symbol
  warning. Instead of using user specified symbol name, use "%ps" printk
  format to show the actual symbol at the probe address. Since kprobe
  event accepts the offset from symbol which is bigger than the symbol
  size, user specified symbol may not be the actual probed symbol.


Please pull the latest probes-v6.8 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-v6.8

Tag SHA1: 64ba9c09b7537e611861d19c66032dcb4e98b7fc
Head SHA1: 9c556b7c3f520d42c435c0d78b25c719c060f8a1


Naveen N Rao (1):
      trace/kprobe: Display the actual notrace function when rejecting a probe

----
 kernel/trace/trace_kprobe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---------------------------
commit 9c556b7c3f520d42c435c0d78b25c719c060f8a1
Author: Naveen N Rao <naveen@kernel.org>
Date:   Thu Dec 14 10:47:02 2023 +0530

    trace/kprobe: Display the actual notrace function when rejecting a probe
    
    Trying to probe update_sd_lb_stats() using perf results in the below
    message in the kernel log:
            trace_kprobe: Could not probe notrace function _text
    
    This is because 'perf probe' specifies the kprobe location as an offset
    from '_text':
            $ sudo perf probe -D update_sd_lb_stats
            p:probe/update_sd_lb_stats _text+1830728
    
    However, the error message is misleading and doesn't help convey the
    actual notrace function that is being probed. Fix this by looking up the
    actual function name that is being probed. With this fix, we now get the
    below message in the kernel log:
            trace_kprobe: Could not probe notrace function update_sd_lb_stats.constprop.0
    
    Link: https://lore.kernel.org/all/20231214051702.1687300-1-naveen@kernel.org/
    
    Signed-off-by: Naveen N Rao <naveen@kernel.org>
    Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 52f8b537dd0a..c4c6e0e0068b 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -487,8 +487,8 @@ static int __register_trace_kprobe(struct trace_kprobe *tk)
 		return -EINVAL;
 
 	if (within_notrace_func(tk)) {
-		pr_warn("Could not probe notrace function %s\n",
-			trace_kprobe_symbol(tk));
+		pr_warn("Could not probe notrace function %ps\n",
+			(void *)trace_kprobe_address(tk));
 		return -EINVAL;
 	}
 

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

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

* Re: [GIT PULL] probes update for v6.8
  2024-01-09 15:23 [GIT PULL] probes update for v6.8 Masami Hiramatsu
@ 2024-01-18 23:01 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2024-01-18 23:01 UTC (permalink / raw)
  To: Masami Hiramatsu (Google)
  Cc: Linus Torvalds, Naveen N Rao, Steven Rostedt, Masami Hiramatsu,
	linux-kernel

The pull request you sent on Wed, 10 Jan 2024 00:23:28 +0900:

> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-v6.8

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5b890ad456b16a5b45e7f86d9708d7248e73d0f8

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

end of thread, other threads:[~2024-01-18 23:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 15:23 [GIT PULL] probes update for v6.8 Masami Hiramatsu
2024-01-18 23:01 ` pr-tracker-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.