bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -mm v2 0/3] Phase 2 of task comm cleanups
@ 2021-12-11  6:39 Yafang Shao
  2021-12-11  6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Yafang Shao @ 2021-12-11  6:39 UTC (permalink / raw)
  To: akpm, rostedt, keescook, pmladek, david, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov
  Cc: linux-mm, bpf, linux-perf-users, linux-fsdevel, linux-kernel,
	Yafang Shao, Mathieu Desnoyers, Michal Miroslaw, Peter Zijlstra,
	Matthew Wilcox, Al Viro

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@gmail.com/

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@efficios.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16
  2021-12-11  6:39 [PATCH -mm v2 0/3] Phase 2 of task comm cleanups Yafang Shao
@ 2021-12-11  6:39 ` Yafang Shao
  2021-12-13 14:41   ` David Hildenbrand
  2021-12-11  6:39 ` [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded " Yafang Shao
  2021-12-11  6:39 ` [PATCH -mm v2 3/3] tools/perf: replace " Yafang Shao
  2 siblings, 1 reply; 7+ messages in thread
From: Yafang Shao @ 2021-12-11  6:39 UTC (permalink / raw)
  To: akpm, rostedt, keescook, pmladek, david, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov
  Cc: linux-mm, bpf, linux-perf-users, linux-fsdevel, linux-kernel,
	Yafang Shao, Mathieu Desnoyers, Michal Miroslaw, Peter Zijlstra,
	Matthew Wilcox, Al Viro

A new macro TASK_COMM_LEN_16 is introduced for the old hard-coded 16 to
make it more grepable. As explained above this marco, the difference
between TASK_COMM_LEN and TASK_COMM_LEN_16 is that TASK_COMM_LEN_16 must
be a fixed size 16 and can't be changed.

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
---
 include/linux/elfcore-compat.h | 8 ++------
 include/linux/elfcore.h        | 9 ++-------
 include/linux/sched.h          | 5 +++++
 3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/include/linux/elfcore-compat.h b/include/linux/elfcore-compat.h
index 54feb64e9b5d..69fa1a728964 100644
--- a/include/linux/elfcore-compat.h
+++ b/include/linux/elfcore-compat.h
@@ -5,6 +5,7 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/compat.h>
+#include <linux/sched.h>
 
 /*
  * Make sure these layouts match the linux/elfcore.h native definitions.
@@ -43,12 +44,7 @@ struct compat_elf_prpsinfo
 	__compat_uid_t			pr_uid;
 	__compat_gid_t			pr_gid;
 	compat_pid_t			pr_pid, pr_ppid, pr_pgrp, pr_sid;
-	/*
-	 * The hard-coded 16 is derived from TASK_COMM_LEN, but it can't be
-	 * changed as it is exposed to userspace. We'd better make it hard-coded
-	 * here.
-	 */
-	char				pr_fname[16];
+	char				pr_fname[TASK_COMM_LEN_16];
 	char				pr_psargs[ELF_PRARGSZ];
 };
 
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 746e081879a5..d3bb4bd3c985 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -65,13 +65,8 @@ struct elf_prpsinfo
 	__kernel_gid_t	pr_gid;
 	pid_t	pr_pid, pr_ppid, pr_pgrp, pr_sid;
 	/* Lots missing */
-	/*
-	 * The hard-coded 16 is derived from TASK_COMM_LEN, but it can't be
-	 * changed as it is exposed to userspace. We'd better make it hard-coded
-	 * here.
-	 */
-	char	pr_fname[16];	/* filename of executable */
-	char	pr_psargs[ELF_PRARGSZ];	/* initial part of arg list */
+	char	pr_fname[TASK_COMM_LEN_16];	/* filename of executable */
+	char	pr_psargs[ELF_PRARGSZ];		/* initial part of arg list */
 };
 
 static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c79bd7ee6029..8d963a50a2a8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -279,6 +279,11 @@ struct task_group;
  * BPF programs.
  */
 enum {
+	/*
+	 * For the old hard-coded 16, which is exposed to userspace and can't
+	 * be changed.
+	 */
+	TASK_COMM_LEN_16 = 16,
 	TASK_COMM_LEN = 16,
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
  2021-12-11  6:39 [PATCH -mm v2 0/3] Phase 2 of task comm cleanups Yafang Shao
  2021-12-11  6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
@ 2021-12-11  6:39 ` Yafang Shao
  2021-12-12  6:10   ` Michal Miroslaw
  2021-12-11  6:39 ` [PATCH -mm v2 3/3] tools/perf: replace " Yafang Shao
  2 siblings, 1 reply; 7+ messages in thread
From: Yafang Shao @ 2021-12-11  6:39 UTC (permalink / raw)
  To: akpm, rostedt, keescook, pmladek, david, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov
  Cc: linux-mm, bpf, linux-perf-users, linux-fsdevel, linux-kernel,
	Yafang Shao, Mathieu Desnoyers, Michal Miroslaw, Peter Zijlstra,
	Matthew Wilcox, Al Viro

This TASK_COMM_LEN_16 has the same meaning with the macro defined in
linux/sched.h, but we can't include linux/sched.h in a UAPI header, so
we should specifically define it in the cn_proc.h.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
---
 include/uapi/linux/cn_proc.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h
index db210625cee8..6dcccaed383f 100644
--- a/include/uapi/linux/cn_proc.h
+++ b/include/uapi/linux/cn_proc.h
@@ -21,6 +21,8 @@
 
 #include <linux/types.h>
 
+#define TASK_COMM_LEN_16 16
+
 /*
  * Userspace sends this enum to register with the kernel that it is listening
  * for events on the connector.
@@ -110,7 +112,7 @@ struct proc_event {
 		struct comm_proc_event {
 			__kernel_pid_t process_pid;
 			__kernel_pid_t process_tgid;
-			char           comm[16];
+			char           comm[TASK_COMM_LEN_16];
 		} comm;
 
 		struct coredump_proc_event {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH -mm v2 3/3] tools/perf: replace old hard-coded 16 with TASK_COMM_LEN_16
  2021-12-11  6:39 [PATCH -mm v2 0/3] Phase 2 of task comm cleanups Yafang Shao
  2021-12-11  6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
  2021-12-11  6:39 ` [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded " Yafang Shao
@ 2021-12-11  6:39 ` Yafang Shao
  2 siblings, 0 replies; 7+ messages in thread
From: Yafang Shao @ 2021-12-11  6:39 UTC (permalink / raw)
  To: akpm, rostedt, keescook, pmladek, david, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov
  Cc: linux-mm, bpf, linux-perf-users, linux-fsdevel, linux-kernel,
	Yafang Shao, Mathieu Desnoyers, Michal Miroslaw, Peter Zijlstra,
	Matthew Wilcox, Al Viro

evsel-tp-sched will verify the task comm len in sched:sched_switch
and sched:sched_wakeup tracepoints. In order to make it grepable, we'd
better replace the hard-coded 16 with TASK_COMM_LEN_16.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
---
 tools/perf/tests/evsel-tp-sched.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/evsel-tp-sched.c b/tools/perf/tests/evsel-tp-sched.c
index cf4da3d748c2..8be44b8e2b9c 100644
--- a/tools/perf/tests/evsel-tp-sched.c
+++ b/tools/perf/tests/evsel-tp-sched.c
@@ -5,6 +5,8 @@
 #include "tests.h"
 #include "debug.h"
 
+#define TASK_COMM_LEN_16 16
+
 static int evsel__test_field(struct evsel *evsel, const char *name, int size, bool should_be_signed)
 {
 	struct tep_format_field *field = evsel__field(evsel, name);
@@ -43,7 +45,7 @@ static int test__perf_evsel__tp_sched_test(struct test_suite *test __maybe_unuse
 		return -1;
 	}
 
-	if (evsel__test_field(evsel, "prev_comm", 16, false))
+	if (evsel__test_field(evsel, "prev_comm", TASK_COMM_LEN_16, false))
 		ret = -1;
 
 	if (evsel__test_field(evsel, "prev_pid", 4, true))
@@ -55,7 +57,7 @@ static int test__perf_evsel__tp_sched_test(struct test_suite *test __maybe_unuse
 	if (evsel__test_field(evsel, "prev_state", sizeof(long), true))
 		ret = -1;
 
-	if (evsel__test_field(evsel, "next_comm", 16, false))
+	if (evsel__test_field(evsel, "next_comm", TASK_COMM_LEN_16, false))
 		ret = -1;
 
 	if (evsel__test_field(evsel, "next_pid", 4, true))
@@ -73,7 +75,7 @@ static int test__perf_evsel__tp_sched_test(struct test_suite *test __maybe_unuse
 		return -1;
 	}
 
-	if (evsel__test_field(evsel, "comm", 16, false))
+	if (evsel__test_field(evsel, "comm", TASK_COMM_LEN_16, false))
 		ret = -1;
 
 	if (evsel__test_field(evsel, "pid", 4, true))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
  2021-12-11  6:39 ` [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded " Yafang Shao
@ 2021-12-12  6:10   ` Michal Miroslaw
  2021-12-12 16:26     ` Yafang Shao
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Miroslaw @ 2021-12-12  6:10 UTC (permalink / raw)
  To: Yafang Shao
  Cc: akpm, rostedt, keescook, pmladek, david, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov, linux-mm, bpf,
	linux-perf-users, linux-fsdevel, linux-kernel, Mathieu Desnoyers,
	Peter Zijlstra, Matthew Wilcox, Al Viro

On Sat, Dec 11, 2021 at 06:39:48AM +0000, Yafang Shao wrote:
> This TASK_COMM_LEN_16 has the same meaning with the macro defined in
> linux/sched.h, but we can't include linux/sched.h in a UAPI header, so
> we should specifically define it in the cn_proc.h.
[...]
> index db210625cee8..6dcccaed383f 100644
> --- a/include/uapi/linux/cn_proc.h
> +++ b/include/uapi/linux/cn_proc.h
> @@ -21,6 +21,8 @@
>  
>  #include <linux/types.h>
>  
> +#define TASK_COMM_LEN_16 16

Hi,

Since this is added to UAPI header, maybe you could make it a single
instance also used elsewhere? Even though this is constant and not
going to change I don't really like multiplying the sources of truth.

Best Regards
Michał Mirosław

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
  2021-12-12  6:10   ` Michal Miroslaw
@ 2021-12-12 16:26     ` Yafang Shao
  0 siblings, 0 replies; 7+ messages in thread
From: Yafang Shao @ 2021-12-12 16:26 UTC (permalink / raw)
  To: Michal Miroslaw
  Cc: Andrew Morton, Steven Rostedt, Kees Cook, Petr Mladek,
	David Hildenbrand, Arnaldo Carvalho de Melo, Andrii Nakryiko,
	Alexei Starovoitov, Linux MM, bpf, linux-perf-use.,
	Linux-Fsdevel, LKML, Mathieu Desnoyers, Peter Zijlstra,
	Matthew Wilcox, Al Viro

On Sun, Dec 12, 2021 at 2:10 PM Michal Miroslaw <mirq-linux@rere.qmqm.pl> wrote:
>
> On Sat, Dec 11, 2021 at 06:39:48AM +0000, Yafang Shao wrote:
> > This TASK_COMM_LEN_16 has the same meaning with the macro defined in
> > linux/sched.h, but we can't include linux/sched.h in a UAPI header, so
> > we should specifically define it in the cn_proc.h.
> [...]
> > index db210625cee8..6dcccaed383f 100644
> > --- a/include/uapi/linux/cn_proc.h
> > +++ b/include/uapi/linux/cn_proc.h
> > @@ -21,6 +21,8 @@
> >
> >  #include <linux/types.h>
> >
> > +#define TASK_COMM_LEN_16 16
>
> Hi,
>
> Since this is added to UAPI header, maybe you could make it a single
> instance also used elsewhere? Even though this is constant and not
> going to change I don't really like multiplying the sources of truth.
>

Hmm, what about defining it in include/uapi/linux/sched.h ?
Then include "sched.h" in cn_proc.h
And we also define it in tools/include/uapi/linux/sched.h for the
usage in tools.

-- 
Thanks
Yafang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16
  2021-12-11  6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
@ 2021-12-13 14:41   ` David Hildenbrand
  0 siblings, 0 replies; 7+ messages in thread
From: David Hildenbrand @ 2021-12-13 14:41 UTC (permalink / raw)
  To: Yafang Shao, akpm, rostedt, keescook, pmladek, arnaldo.melo,
	andrii.nakryiko, alexei.starovoitov
  Cc: linux-mm, bpf, linux-perf-users, linux-fsdevel, linux-kernel,
	Mathieu Desnoyers, Michal Miroslaw, Peter Zijlstra,
	Matthew Wilcox, Al Viro

On 11.12.21 07:39, Yafang Shao wrote:
> A new macro TASK_COMM_LEN_16 is introduced for the old hard-coded 16 to
> make it more grepable. As explained above this marco, the difference
> between TASK_COMM_LEN and TASK_COMM_LEN_16 is that TASK_COMM_LEN_16 must
> be a fixed size 16 and can't be changed.
> 
> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Petr Mladek <pmladek@suse.com>
> ---
>  include/linux/elfcore-compat.h | 8 ++------
>  include/linux/elfcore.h        | 9 ++-------
>  include/linux/sched.h          | 5 +++++
>  3 files changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/include/linux/elfcore-compat.h b/include/linux/elfcore-compat.h
> index 54feb64e9b5d..69fa1a728964 100644
> --- a/include/linux/elfcore-compat.h
> +++ b/include/linux/elfcore-compat.h
> @@ -5,6 +5,7 @@
>  #include <linux/elf.h>
>  #include <linux/elfcore.h>
>  #include <linux/compat.h>
> +#include <linux/sched.h>
>  
>  /*
>   * Make sure these layouts match the linux/elfcore.h native definitions.
> @@ -43,12 +44,7 @@ struct compat_elf_prpsinfo
>  	__compat_uid_t			pr_uid;
>  	__compat_gid_t			pr_gid;
>  	compat_pid_t			pr_pid, pr_ppid, pr_pgrp, pr_sid;
> -	/*
> -	 * The hard-coded 16 is derived from TASK_COMM_LEN, but it can't be
> -	 * changed as it is exposed to userspace. We'd better make it hard-coded
> -	 * here.
> -	 */
> -	char				pr_fname[16];
> +	char				pr_fname[TASK_COMM_LEN_16];
>  	char				pr_psargs[ELF_PRARGSZ];
>  };
>  
> diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
> index 746e081879a5..d3bb4bd3c985 100644
> --- a/include/linux/elfcore.h
> +++ b/include/linux/elfcore.h
> @@ -65,13 +65,8 @@ struct elf_prpsinfo
>  	__kernel_gid_t	pr_gid;
>  	pid_t	pr_pid, pr_ppid, pr_pgrp, pr_sid;
>  	/* Lots missing */
> -	/*
> -	 * The hard-coded 16 is derived from TASK_COMM_LEN, but it can't be
> -	 * changed as it is exposed to userspace. We'd better make it hard-coded
> -	 * here.
> -	 */
> -	char	pr_fname[16];	/* filename of executable */
> -	char	pr_psargs[ELF_PRARGSZ];	/* initial part of arg list */
> +	char	pr_fname[TASK_COMM_LEN_16];	/* filename of executable */
> +	char	pr_psargs[ELF_PRARGSZ];		/* initial part of arg list */
>  };
>  
>  static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index c79bd7ee6029..8d963a50a2a8 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -279,6 +279,11 @@ struct task_group;
>   * BPF programs.
>   */
>  enum {
> +	/*
> +	 * For the old hard-coded 16, which is exposed to userspace and can't
> +	 * be changed.
> +	 */
> +	TASK_COMM_LEN_16 = 16,
>  	TASK_COMM_LEN = 16,
>  };
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-13 14:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11  6:39 [PATCH -mm v2 0/3] Phase 2 of task comm cleanups Yafang Shao
2021-12-11  6:39 ` [PATCH -mm v2 1/3] elfcore: replace old hard-code 16 with TASK_COMM_LEN_16 Yafang Shao
2021-12-13 14:41   ` David Hildenbrand
2021-12-11  6:39 ` [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded " Yafang Shao
2021-12-12  6:10   ` Michal Miroslaw
2021-12-12 16:26     ` Yafang Shao
2021-12-11  6:39 ` [PATCH -mm v2 3/3] tools/perf: replace " Yafang Shao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).