From: "André Almeida" <andrealmeid@igalia.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Christian Brauner <brauner@kernel.org>,
Kees Cook <kees@kernel.org>, Shuah Khan <shuah@kernel.org>,
willy@infradead.org, Steven Rostedt <rostedt@goodmis.org>,
mathieu.desnoyers@efficios.com,
Linus Torvalds <torvalds@linux-foundation.org>,
akpm@linux-foundation.org, Yafang Shao <laoar.shao@gmail.com>,
andrii.nakryiko@gmail.com, arnaldo.melo@gmail.com,
Petr Mladek <pmladek@suse.com>,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
linux-mm@kvack.org, linux-api@vger.kernel.org,
Bhupesh <bhupesh@igalia.com>
Subject: Re: [PATCH v2 4/6] sched: Extend task command name to 64 bytes
Date: Fri, 29 May 2026 13:43:51 -0300 [thread overview]
Message-ID: <2a7566cd-3d64-40f9-b746-ac8ca0409846@igalia.com> (raw)
In-Reply-To: <20260527094221.2f5b49d9@pumpkin>
Em 27/05/2026 05:42, David Laight escreveu:
> On Tue, 26 May 2026 12:31:03 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
>> On Mon, 25 May 2026 11:42:41 +0100
>> David Laight <david.laight.linux@gmail.com> 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.
>
> The name of the patch doesn't help:
> sched: Extend task command name to 64 bytes
>
well, I will try to make it clear next time :)
> If you want to catch/check all the uses I suspect that all the
> occurrences of TASK_COMM_LEN need changing.
> For clarity this one should probably be TASK_COMM_LEN_OLD.
> (that might be problematic for the uapi headers)
>
That works for me as well, and I don't see TASK_COMM_LEN being used at
include/uapi/.
> -- David
>
>>
>> -- Steve
>
next prev parent reply other threads:[~2026-05-29 16:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 22:38 [PATCH v2 0/6] sched: Add support for long task name André Almeida
2026-05-24 22:38 ` [PATCH v2 1/6] sched: Update get_task_comm() comment André Almeida
2026-05-24 22:38 ` [PATCH v2 2/6] treewide: Get rid of get_task_comm() André Almeida
2026-05-25 10:34 ` David Laight
2026-05-24 22:38 ` [PATCH v2 3/6] treewide: Replace memcpy(..., current->comm) with strscpy() André Almeida
2026-05-26 23:06 ` Steven Rostedt
2026-05-27 9:18 ` David Laight
2026-05-29 16:46 ` André Almeida
2026-05-24 22:38 ` [PATCH v2 4/6] sched: Extend task command name to 64 bytes André Almeida
2026-05-25 10:41 ` David Laight
2026-05-25 10:42 ` David Laight
2026-05-26 16:31 ` Steven Rostedt
2026-05-27 8:42 ` David Laight
2026-05-29 16:43 ` André Almeida [this message]
2026-05-24 22:38 ` [PATCH v2 5/6] prctl: Add support for long user thread names André Almeida
2026-05-24 22:38 ` [PATCH v2 6/6] selftests: prctl: Add test for long " André Almeida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a7566cd-3d64-40f9-b746-ac8ca0409846@igalia.com \
--to=andrealmeid@igalia.com \
--cc=akpm@linux-foundation.org \
--cc=andrii.nakryiko@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=bhupesh@igalia.com \
--cc=brauner@kernel.org \
--cc=david.laight.linux@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=kees@kernel.org \
--cc=kernel-dev@igalia.com \
--cc=laoar.shao@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox