All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] tracing: Do not warn when connecting eprobe to non existing event
@ 2021-10-28  2:16 Steven Rostedt
  2021-10-28 17:25 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2021-10-28  2:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Andrew Morton, Ingo Molnar, Tzvetomir Stoyanov

Linus,

Do not WARN when attaching event probe to non-existent event

If the user tries to attach an event probe (eprobe) to an event that does
not exist, it will trigger a warning. There's an error check that only
expects memory issues otherwise it is considered a bug. But changes in the
code to move around the locking made it that it can error out if the user
attempts to attach to an event that does not exist, returning an -ENODEV.
As this path can be caused by user space putting in a bad value, do not
trigger a WARN.


Please pull the latest trace-v5.15-rc6-2 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-v5.15-rc6-2

Tag SHA1: 9fae737f622d42e0b9469ff6f481eed539363d90
Head SHA1: 7fa598f9706d40bd16f2ab286bdf5808e1393d35


Steven Rostedt (VMware) (1):
      tracing: Do not warn when connecting eprobe to non existing event

----
 kernel/trace/trace_eprobe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---------------------------
commit 7fa598f9706d40bd16f2ab286bdf5808e1393d35
Author: Steven Rostedt (VMware) <rostedt@goodmis.org>
Date:   Wed Oct 27 12:08:54 2021 -0400

    tracing: Do not warn when connecting eprobe to non existing event
    
    When the syscall trace points are not configured in, the kselftests for
    ftrace will try to attach an event probe (eprobe) to one of the system
    call trace points. This triggered a WARNING, because the failure only
    expects to see memory issues. But this is not the only failure. The user
    may attempt to attach to a non existent event, and the kernel must not
    warn about it.
    
    Link: https://lkml.kernel.org/r/20211027120854.0680aa0f@gandalf.local.home
    
    Fixes: 7491e2c442781 ("tracing: Add a probe that attaches to trace events")
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c
index c4a15aef36af..5c5f208c15d3 100644
--- a/kernel/trace/trace_eprobe.c
+++ b/kernel/trace/trace_eprobe.c
@@ -904,8 +904,8 @@ static int __trace_eprobe_create(int argc, const char *argv[])
 
 	if (IS_ERR(ep)) {
 		ret = PTR_ERR(ep);
-		/* This must return -ENOMEM, else there is a bug */
-		WARN_ON_ONCE(ret != -ENOMEM);
+		/* This must return -ENOMEM or misssing event, else there is a bug */
+		WARN_ON_ONCE(ret != -ENOMEM && ret != -ENODEV);
 		ep = NULL;
 		goto error;
 	}

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

* Re: [GIT PULL] tracing: Do not warn when connecting eprobe to non existing event
  2021-10-28  2:16 [GIT PULL] tracing: Do not warn when connecting eprobe to non existing event Steven Rostedt
@ 2021-10-28 17:25 ` pr-tracker-bot
  0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2021-10-28 17:25 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Linus Torvalds, LKML, Andrew Morton, Ingo Molnar, Tzvetomir Stoyanov

The pull request you sent on Wed, 27 Oct 2021 22:16:11 -0400:

> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git trace-v5.15-rc6-2

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

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:[~2021-10-28 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  2:16 [GIT PULL] tracing: Do not warn when connecting eprobe to non existing event Steven Rostedt
2021-10-28 17:25 ` 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.