Re: [PATCH v2 4/6] sched: Extend task command name to 64 bytes

From: Steven Rostedt

Date: Tue May 26 2026 - 12:41:41 EST


On Mon, 25 May 2026 11:42:41 +0100
David Laight <david.laight.linux@xxxxxxxxx> wrote:

> > > error = security_task_prctl(option, arg2, arg3, arg4, arg5);
> > > @@ -2601,16 +2601,16 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
> > > error = -EINVAL;
> > > break;
> > > case PR_SET_NAME:
> > > - comm[sizeof(me->comm) - 1] = 0;
> > > + comm[TASK_COMM_LEN - 1] = 0;
> > > if (strncpy_from_user(comm, (char __user *)arg2,
> > > - sizeof(me->comm) - 1) < 0)
> > > + TASK_COMM_LEN - 1) < 0)
> >
> > Nak - you can't do that.
> > You are reading data that the application doesn't expect you to read.
>
> Or have I got confused over the names...

You may have gotten confused by names, as sizeof(me->comm) is the same as
TASK_COMM_LEN. Basically, the above doesn't change anything.

-- Steve