microsoft / microsoft/ebpf-for-windows
pin_root_path is ignored for native modules
@nmlud21 is already working on this.
Since Aug 24, 2026.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 311
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 21
Description
Custom pin root paths are not supported for native programs. For JIT/interpret, pinning is performed by ebpfapi in user mode, which correctly applies the caller's pin_root_path. For native, pinning is performed by ebpfcore in the kernel, and user mode never passes the custom pin path down. ebpfcore builds the pin path from the bare map name only, so LIBBPF_PIN_BY_NAME maps are always pinned at the default root. bpf_object__open_file() returns success either way, so the caller is silently given a different pin path than requested. This is masked in the default case because ebpf_canonicalize_path strips a leading \ebpf\global\ as an alias for the root, so the default root matches by coincidence; only a custom root exposes the gap.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.