lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <149551960362.30231.4769846042627827395.stgit@devbox>
Date:   Tue, 23 May 2017 15:06:53 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     linux-kselftest@...r.kernel.org, shuah@...nel.org,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     mhiramat@...nel.org, Ingo Molnar <mingo@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 4/7] selftests/ftrace: Reset ftrace filter on older kernel

Since older kernel didn't support separated instance of
set_ftrace_filter, if the test case set the filter in
an instance, it will propagate to top-level instance.
This means that the filter setting remains even if we
remove the instance, and will cause other tests failure.
To avoid this issue, reset the ftrace filter if we
detect the propagation.

Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
---
 .../ftrace/test.d/instances/instance-event.tc      |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
index c73db78..8a35331 100644
--- a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
+++ b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
@@ -82,7 +82,10 @@ rmdir foo
 if [ -d foo ]; then
         fail "foo still exists"
 fi
-
+if grep -q "schedule:enable_event:sched:sched_switch" ../set_ftrace_filter; then
+	echo "Older kernel detected. Cleanup filter"
+	echo '!schedule:enable_event:sched:sched_switch' > ../set_ftrace_filter
+fi
 
 instance_slam() {
     while :; do

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ