microsoft / microsoft/ebpf-for-windows

Add windows specific version section to ELF file for reading and passing to bpf_load_program()

Open
#728 1 comment 0 reactions 0 assignees View on GitHub
help wanted triaged
Dominant language
C
Stars
3.6k
Forks
311
Avg merge
6d 10h
Merged PRs (30d)
21

Description

`bpf_load_program()` takes a license and version as input. Looking at samples like https://elixir.bootlin.com/linux/v4.14.2/source/samples/bpf/bpf_load.c , either the kernel version is passed as 0 or is read from the ELF file.

Currently the Windows implementation of `bpf_load_program()` accepts and ignores the version passed to it. In future, we should ideally have Windows specific versions passed to this API to specify which Windows version this load is targeted to.

Since the Linux kernel versions (a number) and Windows versions will be different, this issue is to track adding a new Windows specific section in ELF file where the target Windows version can be specified.

Contributor guide

Open the contributing guide

Research direction

Start by reading the Windows implementation of bpf_load_program() and the referenced Linux samples/bpf/bpf_load.c. Determine how the ELF file is currently read and how the version argument is handled. Done means defining a Windows-specific ELF section for the target Windows version and using that value when loading the program.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.