lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVkmaSUxbg/JtBHb@zeniv-ca.linux.org.uk>
Date:   Sun, 3 Oct 2021 03:41:29 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     akpm@...ux-foundation.org, pmladek@...e.com, peterz@...radead.org,
        valentin.schneider@....com, keescook@...omium.org,
        mathieu.desnoyers@...icios.com, qiang.zhang@...driver.com,
        robdclark@...omium.org, christian@...uner.io,
        dietmar.eggemann@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] kthread: increase the size of kthread's comm

On Wed, Sep 29, 2021 at 11:50:31AM +0000, Yafang Shao wrote:

> That motivates me to do this improvement.
> 
> This patch increases the size of ktread's comm from 16 to 24, which is
> the same with workqueue's. After this change, the name of kthread can be
> fully displayed in /proc/[pid]/comm, for example,
>     
>     rcu_tasks_kthread
>     rcu_tasks_rude_kthread
>     rcu_tasks_trace_kthread
>     ecryptfs-kthread
>     vfio-irqfd-cleanup
>     ext4-rsv-conversion
>     jbd2/nvme0n1p2-8
>     ...
>     
> Because there're only a few of kthreads, so it won't increase too much
> memory consumption.

That's a bloody massive overkill.  If you care about /proc/*/comm, you
might want to take a look at the function that generates its contents:

void proc_task_name(struct seq_file *m, struct task_struct *p, bool escape)
{
        char tcomm[64];

        if (p->flags & PF_WQ_WORKER)
                wq_worker_comm(tcomm, sizeof(tcomm), p);
        else   
                __get_task_comm(tcomm, sizeof(tcomm), p);

        if (escape)
                seq_escape_str(m, tcomm, ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\");
        else   
                seq_printf(m, "%.64s", tcomm);
}

Hint: it's not always p->comm verbatim...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ