[PATCH -mm v2 0/3] Phase 2 of task comm cleanups

From: Yafang Shao
Date: Sat Dec 11 2021 - 01:40:11 EST


This is the followup work of task comm cleanups[1].

In this phase, the hard-coded 16 is replaced by TASK_COMM_LEN_16 to make
it grepable. The difference between this two marcos is:
- TASK_COMM_LEN
The size should be same with the TASK_COMM_LEN defined in linux/sched.h.
- TASK_COMM_LEN_16
The size must be a fixed-size 16 no matter what TASK_COMM_LEN is. It may
be exposed to userspace so we can't change it.

1. https://lore.kernel.org/lkml/20211120112738.45980-1-laoar.shao@xxxxxxxxx/

Changes since v1:
- use TASK_COMM_LEN_16 instead of TASK_COMM_LEN in patch #3 (Steven)
- avoid changing samples/bpf and bpf/progs (Alexei)

Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@xxxxxxxxx>
Cc: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>
Cc: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
Cc: Michal Miroslaw <mirq-linux@xxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Petr Mladek <pmladek@xxxxxxxx>

Yafang Shao (3):
elfcore: replace old hard-code 16 with TASK_COMM_LEN_16
cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
tools/perf: replace old hard-coded 16 with TASK_COMM_LEN_16

include/linux/elfcore-compat.h | 8 ++------
include/linux/elfcore.h | 9 ++-------
include/linux/sched.h | 5 +++++
include/uapi/linux/cn_proc.h | 4 +++-
tools/perf/tests/evsel-tp-sched.c | 8 +++++---
5 files changed, 17 insertions(+), 17 deletions(-)

--
2.17.1