microsoft / microsoft/ebpf-for-windows

eBPF for Windows should support binding to helper functions by name

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

Description

ELF format supports relocation of both data address as well as function pointers:

As an example:
```
E:\ebpf-for-windows\tests\sample>llvm-objdump -r droppacket.o

droppacket.o: file format ELF64-BPF

RELOCATION RECORDS FOR [xdp]:
0000000000000028 R_BPF_64_64 interface_index_map
0000000000000038 R_BPF_64_32 bpf_map_lookup_elem
0000000000000128 R_BPF_64_64 dropped_packet_map
0000000000000138 R_BPF_64_32 bpf_map_lookup_elem
```

Doing this would resolve problems around the assignment of helper function ids in extensions as resolution would be by a unique name rather than a potentially conflicting id.

Internally, eBPF for Windows ELF loader could do the relocations for both maps and functions, resolving function ids before handing byte code off.

Contributor guide

Open the contributing guide

Research direction

Start by examining the eBPF for Windows ELF loader and the relocation records produced by llvm-objdump for droppacket.o. Trace how map relocations and helper function IDs are currently handled; done means function-pointer relocations can resolve helpers by name before bytecode is handed off, including extension helpers without conflicting IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.