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: <202109291113.6DE8D6F3D@keescook>
Date:   Wed, 29 Sep 2021 11:19:59 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Yafang Shao <laoar.shao@...il.com>
Cc:     akpm@...ux-foundation.org, pmladek@...e.com, peterz@...radead.org,
        valentin.schneider@....com, mathieu.desnoyers@...icios.com,
        qiang.zhang@...driver.com, robdclark@...omium.org,
        viro@...iv.linux.org.uk, christian@...uner.io,
        dietmar.eggemann@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] kernel: increase the size of kthread's comm

On Wed, Sep 29, 2021 at 11:50:35AM +0000, Yafang Shao wrote:
> This patch increases the size of ktread's comm from 16 to 24, which is
> the same with workqueue's, to improve this situation. After this cahnge,
> [...]
> Because there're only a few of kthreads, so it won't increase too much
> memory.

Even without the performance impact changes, the math here doesn't hold
either, since using kmalloc means there are slabs being allocated to hold
the task "comm"s now (which comes with overhead), and every task added
a pointer to those 16 bytes (i.e. 8 more bytes on 64-bit systems). So
this change, even if there was 0 overhead in using slabs, would be
identical to having just raised TASK_COMM_LEN to 24. 8 byte pointer,
16 byte allocation == 24 bytes.

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ