Clarification on bpftool dual licensing
Subsystems (3)
Quoted 35 lines
Quoted 6 lines · Daniel Borkmann
Quoted 4 lines · Martin Kelly
Hi,
I have a question regarding the dual licensing provision of bpftool. I understand that bpftool can be distributed as either GPL 2.0 or BSD 2-
clause.
Quoted 3 lines
Quoted 3 lines
That said, bpftool can also auto-generate BPF code that gets specified inline in the skeleton header file, and it's possible that the BPF code generated is GPL. What I'm wondering is what happens if bpftool generates GPL-licensed
BPF
Quoted 21 lines
Quoted 4 lines
code inside the skeleton header, so that you get a header like this:
something.skel.h:
/* this file is BSD 2-clause, by nature of dual licensing */Fwiw, the generated header contains an SPDX identifier:
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ /* THIS FILE IS AUTOGENERATED! */
Quoted 11 lines
/* THIS FILE IS AUTOGENERATED! */
/* standard skeleton definitions */
...
s->data_sz= XXX;s->data= (void *)"\
<eBPF bytecode, produced by GPL 2.0 sources, specified in binary> ";
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
My guess is that, based on the choice to dual-license bpftool, the header is meant to still be BSD 2-clause, and the
s->datainline code's GPL license is not meant to change the licensing of the header itself, but I wanted toYes, definitely that is the intent (but not a lawyer either).
Thanks everyone, that's what I assumed as well. Any objection to a patch clarifying this more explicitly?
One other, related question: vmlinux.h (generated by "bpftool btf dump file /sys/kernel/btf/vmlinux format c"), does not currently contain a license declaration. I assume this would have to be a GPL header, since vmlinux.h references many GPL'd Linux kernel structs and similar, though again I'm not a lawyer and therefore am not certain. Would you all agree with this? If so, any objection to a patch adding an SPDX line to the generated vmlinux.h?
Quoted 40 lines · Martin Kelly
Quoted 40 lines
Quoted 6 lines · Daniel Borkmann
Quoted 4 lines · Martin Kelly
Hi,
I have a question regarding the dual licensing provision of bpftool. I understand that bpftool can be distributed as either GPL 2.0 or BSD 2-
clause.
Quoted 3 lines
Quoted 3 lines
That said, bpftool can also auto-generate BPF code that gets specified inline in the skeleton header file, and it's possible that the BPF code generated is GPL. What I'm wondering is what happens if bpftool generates GPL-licensed
BPF
Quoted 24 lines
Quoted 4 lines
code inside the skeleton header, so that you get a header like this:
something.skel.h:
/* this file is BSD 2-clause, by nature of dual licensing */Fwiw, the generated header contains an SPDX identifier:
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ /* THIS FILE IS AUTOGENERATED! */
Quoted 14 lines
/* THIS FILE IS AUTOGENERATED! */
/* standard skeleton definitions */
...
s->data_sz= XXX;s->data= (void *)"\
<eBPF bytecode, produced by GPL 2.0 sources, specified in binary> ";My guess is that, based on the choice to dual-license bpftool, the header is meant to still be BSD 2-clause, and the
s->datainline code's GPL license is not meant to change the licensing of the header itself, but I wanted to
Quoted 5 lines
Quoted 1 line
Yes, definitely that is the intent (but not a lawyer either).
Thanks everyone, that's what I assumed as well. Any objection to a patch clarifying this more explicitly?
One other, related question:
vmlinux.h(generated by "bpftool btf dump file/sys/kernel/btf/vmlinuxformat c"), does not currently contain a license declaration. I assume this would have to be a GPL header, sincevmlinux.hreferences many GPL'd Linux kernel structs and similar, though again I'm not a lawyer and therefore am not certain. Would you all agree with this? If so, any objection to a patch adding an SPDX line to the generatedvmlinux.h?
Is vmlinux DWARF data GPL'ed? I certainly hope not. So vmlinux.h shouldn't be licensed under GPL.