2022-07-13 14:55:24

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.

On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
<[email protected]> wrote:
>
> This commit adds the following lines to file generated by dump:
> /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> Hence, the dumped file headers follows that of skeletons.
>
> Signed-off-by: Francis Laniel <[email protected]>
> ---
> tools/bpf/bpftool/btf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> index 7e6accb9d9f7..066a0acd0ecd 100644
> --- a/tools/bpf/bpftool/btf.c
> +++ b/tools/bpf/bpftool/btf.c
> @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> if (err)
> return err;
>
> + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n");

This was discussed earlier. It's incorrect and we cannot add just header
to vmlinux.h

> + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> printf("#ifndef __VMLINUX_H__\n");
> printf("#define __VMLINUX_H__\n");
> printf("\n");
> --
> 2.25.1
>


2022-07-13 14:58:24

by Francis Laniel

[permalink] [raw]
Subject: Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.

Le mercredi 13 juillet 2022, 16:47:17 CEST Alexei Starovoitov a ?crit :
> On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
>
> <[email protected]> wrote:
> > This commit adds the following lines to file generated by dump:
> > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> > Hence, the dumped file headers follows that of skeletons.
> >
> > Signed-off-by: Francis Laniel <[email protected]>
> > ---
> >
> > tools/bpf/bpftool/btf.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > index 7e6accb9d9f7..066a0acd0ecd 100644
> > --- a/tools/bpf/bpftool/btf.c
> > +++ b/tools/bpf/bpftool/btf.c
> > @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> >
> > if (err)
> >
> > return err;
> >
> > + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
> > */\n");
> This was discussed earlier. It's incorrect and we cannot add just header
> to vmlinux.h

Oops sorry, I will send a v4 dropping it.
Nonetheless can you please send me a link for a discussion about this?

>
> > + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> >
> > printf("#ifndef __VMLINUX_H__\n");
> > printf("#define __VMLINUX_H__\n");
> > printf("\n");
> >
> > --
> > 2.25.1




2022-07-13 16:43:53

by Stanislav Fomichev

[permalink] [raw]
Subject: Re: [PATCH v3 1/1] bpftool: Align dumped file generated header with skeletons.

On 07/13, Francis Laniel wrote:
> Le mercredi 13 juillet 2022, 16:47:17 CEST Alexei Starovoitov a �crit :
> > On Wed, Jul 13, 2022 at 7:45 AM Francis Laniel
> >
> > <[email protected]> wrote:
> > > This commit adds the following lines to file generated by dump:
> > > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > > /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> > > Hence, the dumped file headers follows that of skeletons.
> > >
> > > Signed-off-by: Francis Laniel <[email protected]>
> > > ---
> > >
> > > tools/bpf/bpftool/btf.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > > index 7e6accb9d9f7..066a0acd0ecd 100644
> > > --- a/tools/bpf/bpftool/btf.c
> > > +++ b/tools/bpf/bpftool/btf.c
> > > @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> > >
> > > if (err)
> > >
> > > return err;
> > >
> > > + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
> > > */\n");
> > This was discussed earlier. It's incorrect and we cannot add just header
> > to vmlinux.h

> Oops sorry, I will send a v4 dropping it.
> Nonetheless can you please send me a link for a discussion about this?

+1, Google only gives me the following:

https://lore.kernel.org/bpf/[email protected]/T/

(which is somewhat inconclusive?)