microsoft / microsoft/ebpf-for-windows

Add support for extensible program context

Open
#5,373 1 comment 0 reactions 1 assignee Claimed by @saxena-anurag View on GitHub
enhancement P3 triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

Today bpf2c computes hash on full `ebpf_ctx_descriptor_t`, that prohibits any change to the context descriptor, even if the changes are non-breaking, and new fields are being added at the end (same as done in Linux)

**Proposal**
1. Only include `data`, `end`, and `meta` in the hash, and also store the context size in native module.
2. ebpf runtime will compute and compare the hash using only the above 3 fields.
3. ebpf runtime will also ensure the context size in native module <= context size at runtime
4. It is extension's responsibility to ensure it does not break the offsets of existing fields when extending the context (same as Linux)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.