Re: [PATCH v3 2/3] treewide: Switch memcpy() users of 'task->comm' to a more safer implementation

From: Steven Rostedt
Date: Thu May 08 2025 - 10:03:03 EST


On Thu, 8 May 2025 13:52:01 +0530
Bhupesh Sharma <bhsharma@xxxxxxxxxx> wrote:

> > [1].
> > https://lore.kernel.org/linux-trace-kernel/20250507133458.51bafd95@xxxxxxxxxxxxxxxxxx/
> >
>
> Sorry, pressed the send button too quickly :D
>
> I instead meant - "I plan to  rebase my v4 on top of Steven's RFC, which
> might mean that this patch would no longer need to address the trace
> events, but would still need to handle other places where tsk->comm
> directly in memcpy() and replace it with 'get_task_comm()' instead".

Note I didn't switch all the events, just most of the sched events.

This may affect user space that parses the raw events and may expect a hard
coded string instead of a dynamic one (as the sched_switch and sched_waking
events do).

We will need to investigate before we make these changes, which is why I
posted it as a RFC.

-- Steve