Re: Fw: [PATCHSET] workqueue: Show the latest workqueue name in /proc/PID/{comm,stat,status}

From: Linus Torvalds
Date: Thu May 17 2018 - 12:04:56 EST


On Thu, May 17, 2018 at 12:51 AM Alexey Dobriyan <adobriyan@xxxxxxxxx>
wrote:


> I'd say anything that extends ->comm past 16 charactes is no-no.
> The reason is that userspace may do something stupid like:

> char comm[16];

Not may - does. We're already talking to the procps-ng people exactly
because of this.

That said, nobody actually mis-parses anything or overflows any buffers
(you'd actually have to work at it to do so), it's just that they don't
save the full length of the result.

So we can extend the kernel size (there are others who want it
independently of the workqueue issue), but some of the tools simply won't
show the full name until updated.

So instead of showing "[kworker/4:2-events]", current procps-ng shows
"[kworker/4:2-eve]" for example. Annoying, but not really any more cryptic
than the current situation without the patch.

Linus