Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(bpf): Fix Kepler Licensing #1384

Merged

Conversation

dave-tucker
Copy link
Collaborator

@dave-tucker dave-tucker commented Apr 26, 2024

The eBPF code needs to have a GPL-compatible license. This is due to its use of Linux Kernel structs (like task_struct) and its use of GPL-only eBPF helpers (e.g bpf_probe_read) 1.

eBPF loaders default to GPL when loading code without a license section, which is why this might not have prevented the probes from working correctly. You can verify this by inspecting the loaded probes with bpftool.

This commit adjusts the license of the eBPF files to be:

  • GPL-2.0-only OR BSD-2-Clause for Kepler code
  • GPL-2.0-only for the generated vmlinux.h files given they come from the Linux Kernel.

It adjusts the README to display these changes.

The following contributors will need to agree to the relicensing of this work according to the git history.

This licensing arrangement is established in mature eBPF projects like Cilium.
Userspace components are unaffected.
There is a license exception in the CNCF to allow it.

@rootfs
Copy link
Contributor

rootfs commented Apr 26, 2024

Thank you @dave-tucker for the investigation and the PR!

@marceloamaral @sunya-ch @jiangphcn @jiangphcn please take a look and let us know if you are good with the transition. Thanks!

Copy link
Collaborator

@sunya-ch sunya-ch left a comment

Choose a reason for hiding this comment

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

@dave-tucker Thank you for the PR. This transition looks good to me.

@sunya-ch sunya-ch self-requested a review April 27, 2024 00:36
@jichenjc
Copy link
Collaborator

thanks, this is good update~

@rootfs
Copy link
Contributor

rootfs commented Apr 29, 2024

@marceloamaral @jiangphcn can you take a look?

LICENSE-GPL2 Outdated Show resolved Hide resolved
@jiangphcn
Copy link
Contributor

LGTM.

The eBPF code needs to have a GPL-compatible license.
This is due to its use of Linux Kernel structs (like task_struct)
and its use of GPL-only eBPF helpers (e.g bpf_probe_read) [1].

eBPF loaders default to GPL when loading code without a license
section. You can verify this by inspecting the loaded probes
with bpftool.

This commit adjusts the license of the eBPF files to be:

- GPL-2.0-only OR BSD-2-Clause for Kepler code
- GPL-2.0-only for the generated vmlinux.h files given they come from
  the Linux Kernel.

It adjusts the README to display these changes.

[1]: https://github.com/torvalds/linux/blob/c942a0cd3603e34dd2d7237e064d9318cb7f9654/kernel/trace/bpf_trace.c#L243-L250

Signed-off-by: Dave Tucker <[email protected]>
Copy link
Collaborator

@marceloamaral marceloamaral left a comment

Choose a reason for hiding this comment

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

/lgtm

@marceloamaral marceloamaral merged commit d0bde77 into sustainable-computing-io:main May 1, 2024
22 checks passed
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.

6 participants