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]
Date:   Mon, 13 Dec 2021 00:26:04 +0800
From:   Yafang Shao <laoar.shao@...il.com>
To:     Michal Miroslaw <mirq-linux@...e.qmqm.pl>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Kees Cook <keescook@...omium.org>,
        Petr Mladek <pmladek@...e.com>,
        David Hildenbrand <david@...hat.com>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Linux MM <linux-mm@...ck.org>, bpf <bpf@...r.kernel.org>,
        "linux-perf-use." <linux-perf-users@...r.kernel.org>,
        Linux-Fsdevel <linux-fsdevel@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Matthew Wilcox <willy@...radead.org>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH -mm v2 2/3] cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16

On Sun, Dec 12, 2021 at 2:10 PM Michal Miroslaw <mirq-linux@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ