Skip to content

Conversation

@danielocfb
Copy link
Collaborator

License the project under the terms of the GPLv2 license. Nobody knows what license the generated vmlinux.h files carry, so pessimistically assume they are a derivative of the kernel and license the project accordingly.

Closes: #9

License the project under the terms of the GPLv2 license. Nobody seems
to know what license the generated vmlinux.h files carry, so
pessimistically assume they are a derivative of the kernel and license
the project accordingly.

Closes: libbpf#9

Signed-off-by: Daniel Müller <[email protected]>
Copy link
Member

@anakryiko anakryiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bpftool, libbpf and generally all BPF ecosystem is dual licensed as

SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Let's do that here as well. There is no reason to deviate.

@4ast
Copy link

4ast commented Oct 13, 2025

This is wrong. vmlinux.h is auto generated file. You cannot add a license to it.

@danielocfb
Copy link
Collaborator Author

danielocfb commented Oct 13, 2025

bpftool, libbpf and generally all BPF ecosystem is dual licensed as

SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Let's do that here as well. There is no reason to deviate.

The kernel is license under GPLv2 + syscall exception. These header files contain internal kernel types that are, to the best of my knowledge, not covered by the exception. As such it is an entirely reasonable assumption that, because of GPLv2's nature, these files should be licensed the same way. We cannot just say willy nilly that this isn't the case without a good reason -- that's not how the GPL works. I haven't seen any such reason.

This is wrong. vmlinux.h is auto generated file. You cannot add a license to it.

Just because something is auto generated that doesn't make it unlicensable...

@4ast
Copy link

4ast commented Oct 13, 2025

entirely reasonable assumption

it's not reasonable at all.

BTF is equivalent to dwarf. vmlinux.h is no different than llvm-dwarfdump vmlinux. You cannot slap a license on top of a dump.

@anakryiko
Copy link
Member

@danielocfb tbh, I assumed you are adding license for the sake of licensing scripts under scripts/ + src/lib.rs. And for that I think GPL2+BSD-2 is the way to go.

As for vmlinux.h, I agree with @4ast, we can't just license text dump of some tool. DWARF/BTF and derivative dumps from them cannot be licensed. Just like objdump's output of vmlinux, and many other things like that.

@danielocfb
Copy link
Collaborator Author

You cannot slap a license on top of a dump.

Please provide a citation for this claim. By that argument, are you also saying that one can't license a binary produced by a compiler or where is the line? I think this is factually wrong. You can absolutely do that and it is being done with every closed source binary.

@4ast
Copy link

4ast commented Oct 14, 2025

First link on google:
"
The output is a representation of facts. The dwarfdump utility translates the facts found in the DWARF debug sections of an object file into a human-readable format. Facts are not copyrightable, so the output itself has no license.
"

@danielocfb
Copy link
Collaborator Author

First link on google: " The output is a representation of facts. The dwarfdump utility translates the facts found in the DWARF debug sections of an object file into a human-readable format. Facts are not copyrightable, so the output itself has no license. "

In general "citation" refers to something that can actually be followed to and verified. So...a link perhaps?
Not even searching for this exact string yields any results for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add LICENSE

4 participants