diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-19 12:43:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-19 12:43:02 +0200 |
commit | b047a5d260670d1c70e7afcce4ad5f48707d1db3 (patch) | |
tree | 7adcd6fc76128c27aa43f7da5d6edb2f07410906 | |
parent | bcc9fcfe83014376b270b237385c248dc2d44aa0 (diff) | |
download | stable-queue-b047a5d260670d1c70e7afcce4ad5f48707d1db3.tar.gz |
5.15-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.15/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch | 55 | ||||
-rw-r--r-- | queue-5.15/series | 2 | ||||
-rw-r--r-- | queue-5.15/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch | 54 |
3 files changed, 111 insertions, 0 deletions
diff --git a/queue-5.15/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch b/queue-5.15/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch new file mode 100644 index 0000000000..550d5e47bb --- /dev/null +++ b/queue-5.15/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 +@@ -18,7 +18,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 +@@ -29,7 +29,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 +@@ -40,7 +40,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.15/series b/queue-5.15/series index 8fae40b568..49327176cc 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -2,3 +2,5 @@ ksmbd-don-t-send-oplock-break-if-rename-fails.patch ksmbd-validate-payload-size-in-ipc-response.patch ksmbd-do-not-set-smb2_global_cap_encryption-for-smb-.patch btrfs-record-delayed-inode-root-in-transaction.patch +sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch +selftests-ftrace-limit-length-in-subsystem-enable-tests.patch diff --git a/queue-5.15/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch b/queue-5.15/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch new file mode 100644 index 0000000000..a0fa8de2f0 --- /dev/null +++ b/queue-5.15/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 +@@ -587,7 +587,7 @@ TRACE_EVENT(rpcgss_context, + __field(unsigned int, timeout) + __field(u32, window_size) + __field(int, len) +- __string(acceptor, data) ++ __string_len(acceptor, data, len) + ), + + TP_fast_assign( +@@ -596,7 +596,7 @@ TRACE_EVENT(rpcgss_context, + __entry->timeout = timeout; + __entry->window_size = window_size; + __entry->len = len; +- strncpy(__get_str(acceptor), data, len); ++ __assign_str(acceptor, data); + ), + + TP_printk("win_size=%u expiry=%lu now=%lu timeout=%u acceptor=%.*s", |