Thread (4 messages) 4 messages, 3 authors, 2024-11-01

Re: [PATCH v2] tracing: Replace strncpy() with strscpy() when copying comm

From: Jinjie Ruan <hidden>
Date: 2024-11-01 01:45:15
Also in: lkml


On 2024/10/31 23:48, Steven Rostedt wrote:
On Thu, 31 Oct 2024 11:12:06 -0400
Mathieu Desnoyers [off-list ref] wrote:
quoted
quoted
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1934,7 +1934,7 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
  	max_data->critical_start = data->critical_start;
  	max_data->critical_end = data->critical_end;
  
-	strncpy(max_data->comm, tsk->comm, TASK_COMM_LEN);
+	strscpy(max_data->comm, tsk->comm);  
make allyesconfig + make please ?
Or at a minimum, make sure all the code you change is compiled.
Sure, x86 and arm64 allmodconfig is ok

Thank you!
-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help