Messages in this thread Patch in this message | | | Date | Wed, 8 Dec 2021 13:40:45 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH -mm 2/5] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16 |
| |
On Sat, 4 Dec 2021 09:52:53 +0000 Yafang Shao <laoar.shao@gmail.com> 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. >
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> 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/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 {
| |