Re: [PATCH v5 3/3] treewide: Switch from tsk->comm to tsk->comm_str which is 64 bytes long
From: Bhupesh Sharma
Date: Thu Jul 24 2025 - 08:38:56 EST
On 7/24/25 2:46 PM, Askar Safin wrote:
where TASK_COMM_EXT_LEN is 64-bytes.
Why 64? As well as I understand, comm is initialized from executable file name by default. And it is usually limited by 256 (or 255?) bytes. So, please, make limit 256 bytes.
Check existing users like proc_task_name(), which use 64-byte comm names:
void proc_task_name(struct seq_file *m, struct task_struct *p, bool escape)
{
char tcomm[64];
....
Hence, it was decided not to change this and other similar existing
users and cap tsk->comm to 64-bytes.
Thanks,
Bhupesh