The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Kaiser <martin@kaiser.cx>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [GIT PULL] probes: Fixes for v7.2-rc6
Date: Thu, 6 Aug 2026 22:49:50 +0900	[thread overview]
Message-ID: <20260806224950.2d9e03120cf63783741fdcb0@kernel.org> (raw)

Hi Linus,

Probes fixes for v7.2-rc6:

- selftests/ftrace: Refactor eprobes test to fix argument checks
  Refactor the eprobes selftest to get more stable test result by using
  `sys_enter_chdir` instead of `openat` and filter for exact directory
  names. This resolves test instability after string pointer handling fix.


Please pull the latest probes-fixes-v7.2-rc6 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
probes-fixes-v7.2-rc6

Tag SHA1: f5e412335622b0af9975ea0a3ffffa228f0214ef
Head SHA1: 6e3abef2a27e7402a94111c9eff85d887e64a309


Martin Kaiser (1):
      selftests/ftrace: refactor eprobes test to fix argument checks

----
 .../ftrace/test.d/dynevent/add_remove_eprobe.tc          | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
---------------------------
commit 6e3abef2a27e7402a94111c9eff85d887e64a309
Author: Martin Kaiser <martin@kaiser.cx>
Date:   Tue Aug 4 21:46:35 2026 +0200

    selftests/ftrace: refactor eprobes test to fix argument checks
    
    The add/remove eprobe test installs an eprobe for the openat syscall and
    runs ls. It checks the filenames that were opened by ls against a
    whitelist and a blacklist.
    
    Commit 206b25c09080 ("tracing: eprobe: read the complete FILTER_PTR_STRING
    pointer") fixed access to some string fields in eprobes. This triggers
    test failures as the blacklist does not allow relative paths for the
    openat parameters.
    
    What makes this test unstable is the fact that the openat calls vary a
    lot between different systems.
    
    Refactor the test to make it more robust. "cd <directory>" will issue a
    chdir syscall with the target directory as parameter. Set an eprobe on
    the sys_enter_chdir event and filter for the exact directory name. Allow
    (fault) as fallback.
    
    Link: https://lore.kernel.org/all/20260804194705.760893-1-martin@kaiser.cx/
    
    Fixes: 206b25c09080 ("tracing: eprobe: read the complete FILTER_PTR_STRING pointer")
    Reported-by: kernel test robot <oliver.sang@intel.com>
    Closes: https://lore.kernel.org/oe-lkp/202607151010.b68428e1-lkp@intel.com
    Signed-off-by: Martin Kaiser <martin@kaiser.cx>
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc
index c300eb020262..e2322693d0c3 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc
@@ -1,16 +1,16 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 # description: Generic dynamic event - add/remove eprobe events
-# requires: dynamic_events events/syscalls/sys_enter_openat "<attached-group>.<attached-event> [<args>]":README
+# requires: dynamic_events events/syscalls/sys_enter_chdir "<attached-group>.<attached-event> [<args>]":README
 
 echo 0 > events/enable
 
 clear_dynamic_events
 
 SYSTEM="syscalls"
-EVENT="sys_enter_openat"
+EVENT="sys_enter_chdir"
 FIELD="filename"
-EPROBE="eprobe_open"
+EPROBE="eprobe_chdir"
 OPTIONS="file=+0(\$filename):ustring"
 echo "e:$EPROBE $SYSTEM/$EVENT $OPTIONS" >> dynamic_events
 
@@ -18,20 +18,14 @@ grep -q "$EPROBE" dynamic_events
 test -d events/eprobes/$EPROBE
 
 echo 1 > events/eprobes/$EPROBE/enable
-ls
+cd /sys/kernel/tracing
 echo 0 > events/eprobes/$EPROBE/enable
 
-content=`grep '^ *ls-' trace | grep 'file='`
-nocontent=`grep '^ *ls-' trace | grep 'file=' | grep -v -e '"/' -e '"."' -e '(fault)' ` || true
-
+content=`grep -e 'file="/sys/kernel/tracing"\|(fault)' trace`
 if [ -z "$content" ]; then
 	exit_fail
 fi
 
-if [ ! -z "$nocontent" ]; then
-	exit_fail
-fi
-
 echo "-:$EPROBE" >> dynamic_events
 
 ! grep -q "$EPROBE" dynamic_events

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

             reply	other threads:[~2026-08-06 13:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 13:49 Masami Hiramatsu [this message]
2026-08-06 16:01 ` [GIT PULL] probes: Fixes for v7.2-rc6 pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806224950.2d9e03120cf63783741fdcb0@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@kaiser.cx \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox