aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-19 12:42:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-19 12:42:43 +0200
commit1fc54c5eeab84925c89b020ec9a457dadd35aeca (patch)
tree436c6a687d165f12a67896dc7f2b6fced368134a
parentb74eb423a8346b23ca4ed7fe231f215272749e16 (diff)
downloadstable-queue-1fc54c5eeab84925c89b020ec9a457dadd35aeca.tar.gz
5.4-stable patches
added patches: selftests-ftrace-limit-length-in-subsystem-enable-tests.patch sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch
-rw-r--r--queue-5.4/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch55
-rw-r--r--queue-5.4/series2
-rw-r--r--queue-5.4/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch54
3 files changed, 111 insertions, 0 deletions
diff --git a/queue-5.4/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch b/queue-5.4/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch
new file mode 100644
index 0000000000..63a3b46170
--- /dev/null
+++ b/queue-5.4/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch
@@ -0,0 +1,55 @@
+From 1a4ea83a6e67f1415a1f17c1af5e9c814c882bb5 Mon Sep 17 00:00:00 2001
+From: Yuanhe Shu <xiangzao@linux.alibaba.com>
+Date: Mon, 26 Feb 2024 11:18:16 +0800
+Subject: selftests/ftrace: Limit length in subsystem-enable tests
+
+From: Yuanhe Shu <xiangzao@linux.alibaba.com>
+
+commit 1a4ea83a6e67f1415a1f17c1af5e9c814c882bb5 upstream.
+
+While sched* events being traced and sched* events continuously happen,
+"[xx] event tracing - enable/disable with subsystem level files" would
+not stop as on some slower systems it seems to take forever.
+Select the first 100 lines of output would be enough to judge whether
+there are more than 3 types of sched events.
+
+Fixes: 815b18ea66d6 ("ftracetest: Add basic event tracing test cases")
+Cc: stable@vger.kernel.org
+Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
++++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+@@ -22,7 +22,7 @@ echo 'sched:*' > set_event
+
+ yield
+
+-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
++count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+ if [ $count -lt 3 ]; then
+ fail "at least fork, exec and exit events should be recorded"
+ fi
+@@ -33,7 +33,7 @@ echo 1 > events/sched/enable
+
+ yield
+
+-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
++count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+ if [ $count -lt 3 ]; then
+ fail "at least fork, exec and exit events should be recorded"
+ fi
+@@ -44,7 +44,7 @@ echo 0 > events/sched/enable
+
+ yield
+
+-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
++count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+ if [ $count -ne 0 ]; then
+ fail "any of scheduler events should not be recorded"
+ fi
diff --git a/queue-5.4/series b/queue-5.4/series
index 0619eed090..ee423bf8e0 100644
--- a/queue-5.4/series
+++ b/queue-5.4/series
@@ -18,3 +18,5 @@ selftests-timers-fix-abs-warning-in-posix_timers-test.patch
x86-apic-force-native_apic_mem_read-to-use-the-mov-instruction.patch
btrfs-record-delayed-inode-root-in-transaction.patch
ring-buffer-only-update-pages_touched-when-a-new-pag.patch
+sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch
+selftests-ftrace-limit-length-in-subsystem-enable-tests.patch
diff --git a/queue-5.4/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch b/queue-5.4/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch
new file mode 100644
index 0000000000..34621f65fe
--- /dev/null
+++ b/queue-5.4/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch
@@ -0,0 +1,54 @@
+From a4833e3abae132d613ce7da0e0c9a9465d1681fa Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
+Date: Wed, 10 Apr 2024 12:38:13 -0400
+Subject: SUNRPC: Fix rpcgss_context trace event acceptor field
+
+From: Steven Rostedt (Google) <rostedt@goodmis.org>
+
+commit a4833e3abae132d613ce7da0e0c9a9465d1681fa upstream.
+
+The rpcgss_context trace event acceptor field is a dynamically sized
+string that records the "data" parameter. But this parameter is also
+dependent on the "len" field to determine the size of the data.
+
+It needs to use __string_len() helper macro where the length can be passed
+in. It also incorrectly uses strncpy() to save it instead of
+__assign_str(). As these macros can change, it is not wise to open code
+them in trace events.
+
+As of commit c759e609030c ("tracing: Remove __assign_str_len()"),
+__assign_str() can be used for both __string() and __string_len() fields.
+Before that commit, __assign_str_len() is required to be used. This needs
+to be noted for backporting. (In actuality, commit c1fa617caeb0 ("tracing:
+Rework __assign_str() and __string() to not duplicate getting the string")
+is the commit that makes __string_str_len() obsolete).
+
+Cc: stable@vger.kernel.org
+Fixes: 0c77668ddb4e ("SUNRPC: Introduce trace points in rpc_auth_gss.ko")
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/trace/events/rpcgss.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/include/trace/events/rpcgss.h
++++ b/include/trace/events/rpcgss.h
+@@ -300,7 +300,7 @@ TRACE_EVENT(rpcgss_context,
+ __field(unsigned long, now)
+ __field(unsigned int, timeout)
+ __field(int, len)
+- __string(acceptor, data)
++ __string_len(acceptor, data, len)
+ ),
+
+ TP_fast_assign(
+@@ -308,7 +308,7 @@ TRACE_EVENT(rpcgss_context,
+ __entry->now = now;
+ __entry->timeout = timeout;
+ __entry->len = len;
+- strncpy(__get_str(acceptor), data, len);
++ __assign_str(acceptor, data);
+ ),
+
+ TP_printk("gc_expiry=%lu now=%lu timeout=%u acceptor=%.*s",