Re: [PATCH 0/2] proc.5: note broken v4.18 userspace promise

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 23, 2022 at 10:12:22AM -0800, Linus Torvalds wrote:
> On Fri, Dec 23, 2022 at 10:00 AM Ævar Arnfjörð Bjarmason
> <avarab@xxxxxxxxx> wrote:
> >
> > Whereas the fix here is a fix for a promise we're currently making
> > which hasn't been true since v4.18.
> 
> Hah. Ack. Did anybody ever actually notice?
> 
> I wonder if the newer limit of 64 characters for kworkers shouldn't
> even be mentioned at all, and if the 16-byte truncation for user space
> should also be just removed.
> 
> Those limits should never have been some documented API, they were
> always just implementation details, after all.

In 2018, 6b59808bfe48 ("workqueue: Show the latest workqueue name in
/proc/PID/{comm,stat,status}") extended the length of the wq workers. 64
used for the formatting buffer size is definitely an implementation detail.

Last year, Yafang (cc'd) added d6986ce24fc0 ("kthread: dynamically allocate
memory to store kthread's full name") removed restrictions on kthread names
completely. It now gets dynamically allocated if long than TASK_COMM_LEN.
BTW, on allocation failure, the name gets silently truncated. I think it'd
be better to fail kthread creation instead (not that we're likely to fail
these allocations but still).

I think the right thing to do here is saying that all kernel thread names
can be longer than 16.

Thanks.

-- 
tejun



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux