Skip to content

Add process tree source for Linux #18

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 3 commits into from

Conversation

zombiezen
Copy link
Contributor

Due to eBPF restrictions, the size of arguments collected is relatively small. Further iterations of this code should hopefully provide better fidelity, but I wanted to demonstrate the approach first.

This PR is based on #17 because it depends on the eBPF tooling introduced in that PR. Once that's merged, I'll pop this out of draft.

- 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.
Due to eBPF restrictions,
the size of arguments collected is relatively small.
Further iterations of this code should hopefully provide better fidelity,
but I wanted to demonstrate the approach first.
@zombiezen zombiezen requested a review from abraithwaite May 7, 2025 23:53
@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