Re: [PATCH v2 4/6] sched: Extend task command name to 64 bytes
Steven Rostedt <[email protected]>
| Newsgroups | org.kernel.vger.linux-api,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 25 May 2026 11:42:41 +0100 David Laight <[email protected]> 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