RE: Re: Re: Clarification on bpftool dual licensing
From: Martin Kelly <hidden>
Date: 2021-11-18 16:38:16
On Wed, Nov 17, 2021 at 4:32 PM Martin Kelly [off-list ref] wrote:quoted
quoted
On Tue, Nov 16, 2021 at 2:16 AM Daniel Borkmann[off-list ref]quoted
quoted
wrote:quoted
On 11/15/21 7:20 PM, Martin Kelly wrote:quoted
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
quoted
That said, bpftool can also auto-generate BPF code that gets specifiedinlinequoted
quoted
quoted
quoted
in the skeleton header file, and it's possible that the BPF code generatedisquoted
quoted
quoted
quoted
GPL. What I'm wondering is what happens if bpftool generates GPL-licensedquoted
quoted
BPFquoted
quoted
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
/* 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 headerisquoted
quoted
quoted
quoted
meant to still be BSD 2-clause, and the s->data inline code's GPL licenseisquoted
quoted
quoted
quoted
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 patchclarifying this more explicitly?quoted
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? Is vmlinux DWARF data GPL'ed? I certainly hope not. So vmlinux.h shouldn't be licensed under GPL.
I have no idea; I had assumed that a struct definition coming from a GPL-licensed header would have to be GPL, but again, not a lawyer, and I could totally be wrong. If not GPL though, what would the license be? Is it just "output of a program" and therefore license-less, even though the output happens to be code?