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: <20211021034516.4400-4-laoar.shao@gmail.com>
Date:   Thu, 21 Oct 2021 03:45:10 +0000
From:   Yafang Shao <laoar.shao@...il.com>
To:     keescook@...omium.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, arnaldo.melo@...il.com,
        pmladek@...e.com, peterz@...radead.org, viro@...iv.linux.org.uk,
        akpm@...ux-foundation.org, valentin.schneider@....com,
        qiang.zhang@...driver.com, robdclark@...omium.org,
        christian@...uner.io, dietmar.eggemann@....com, mingo@...hat.com,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        davem@...emloft.net, kuba@...nel.org, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org, kafai@...com,
        songliubraving@...com, yhs@...com, john.fastabend@...il.com,
        kpsingh@...nel.org
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-perf-users@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, oliver.sang@...el.com, lkp@...el.com,
        Yafang Shao <laoar.shao@...il.com>
Subject: [PATCH v5 03/15] sched.h: introduce TASK_COMM_LEN_16

There're many hard-coded 16 used to store task comm in the kernel, that
makes it error prone if we want to change the value of TASK_COMM_LEN. A
new marco TASK_COMM_LEN_16 is introduced to replace these old ones, then
we can easily grep them.

Signed-off-by: Yafang Shao <laoar.shao@...il.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Kees Cook <keescook@...omium.org>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Petr Mladek <pmladek@...e.com>
---
 include/linux/sched.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index c1a927ddec64..62d5b30d310c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -274,6 +274,8 @@ struct task_group;
 
 #define get_current_state()	READ_ONCE(current->__state)
 
+/* To replace the old hard-coded 16 */
+#define TASK_COMM_LEN_16		16
 /* Task command name length: */
 #define TASK_COMM_LEN			16
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ