Skip to main content

Reduced Python frontend for eBPF

Project description

Python-BPF

This is an LLVM IR generator for eBPF programs in Python. We use llvmlite to generate LLVM IR code from pure Python code. This is then compiled to LLVM object files, which can be loaded into the kernel for execution.

Development

Step 0. Make a virtual environment and activate it using python3 -m venv .venv && source .venv/bin/activate.
Step 1. Run make install to install the required dependencies.
Step 2. Run make to see the compilation output of the example.
Step 3. Run check.sh to check if generated object file passes through the verifier inside the examples directory.
Step 4. Run make in the examples/c-form directory to modify the example C BPF program to check the actual LLVM IR generated by clang.

Development Notes

Run ./check.sh run execve2.o; in examples folder

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythonbpf-0.1.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonbpf-0.1.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file pythonbpf-0.1.0.tar.gz.

File metadata

  • Download URL: pythonbpf-0.1.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonbpf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 54de63290e0944a77f53d4d8c9b967d1c6321fae294cb89e17822d1c3ad82a13
MD5 ba68183dd4365b9ae4f7f63522299981
BLAKE2b-256 7230faef003305f5e98d7d1754947b24f463b10cd6d8109a0b07cb73c7a3caff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonbpf-0.1.0.tar.gz:

Publisher: python-publish.yml on varun-r-mallya/Python-BPF

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pythonbpf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pythonbpf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonbpf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e9934cb8a64801d0575800db5862a5706d0240e6e626bed72a941b35caba382
MD5 801357e7592d158f151407b479cb907e
BLAKE2b-256 4b45c00dc2fef8ead954ef9483f96659cc72b17d8cfad23706cd1fe94b234a73

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonbpf-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on varun-r-mallya/Python-BPF

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page