Skip to content

Add "net" source with basic eBPF implementation #17

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

Closed
wants to merge 1 commit into from

Conversation

zombiezen
Copy link
Contributor

  • Add a generic "net" source and event type. Attempting to use the source on any platform other than Linux results in a runtime error for now. The idea would be for other OS implementations to exist over time.
  • Provide proof-of-concept Linux eBPF program using CO-RE safe APIs. This only handles outbound IPv4 connections for now, but can be extended to collect more information. The program itself should be usable back to Linux 4.17 kernels, but I'm using the new-style BPF link syscalls, which came along in Linux 5.7 (from 2020).
  • Introduce Nix flake with necessary C/LLVM tooling. The LLVM/C toolchain is only needed when modifying the C program: .o files are automatically generated for both big-endian and little-endian architectures and are checked into version control, so casual contributors will not need this for making changes to reveald as a whole. For folks working on the C program, the Nix flake provides a consistent, reproducible environment for generating the .o files regardless of OS being used for development.

- Add a generic "net" source and event type.
  Attempting to use the source on any platform other than Linux
  results in a runtime error for now.
  The idea would be for other OS implementations to exist over time.
- Provide proof-of-concept Linux eBPF program using CO-RE safe APIs.
  This only handles outbound IPv4 connections for now,
  but can be extended to collect more information.
  The program itself should be usable back to Linux 4.17 kernels,
  but I'm using the new-style BPF link syscalls,
  which came along in Linux 5.7 (from 2020).
- Introduce Nix flake with necessary C/LLVM tooling.
  The LLVM/C toolchain is only needed when modifying the C program:
  .o files are automatically generated for both big-endian and little-endian architectures
  and are checked into version control,
  so casual contributors will not need this for making changes to reveald as a whole.
  For folks working on the C program,
  the Nix flake provides a consistent, reproducible environment for generating the .o files
  regardless of OS being used for development.
@zombiezen zombiezen requested a review from abraithwaite April 21, 2025 19:02
@zombiezen
Copy link
Contributor Author

I have manually tested this locally by starting reveald and then curl-ing example.com. FYI using this source does require running reveald with elevated privileges, as one might imagine.

@zombiezen
Copy link
Contributor Author

Closing in favor of #19.

@zombiezen zombiezen closed this May 21, 2025
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.

1 participant