Re: [PATCH v2 4/4] kernel/kthread: show a warning if kthread's comm is truncated

From: Kees Cook
Date: Thu Oct 07 2021 - 11:01:53 EST


On Thu, Oct 07, 2021 at 12:07:52PM +0000, Yafang Shao wrote:
> Show a warning if task comm is truncated. Below is the result
> of my test case:
>
> truncated kthread comm:I-am-a-kthread-with-lon, pid:14 by 6 characters
>
> Suggtested-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>

I like that we get a warning now. :)

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook