microsoft / microsoft/ebpf-for-windows

pin_root_path is ignored for native modules

Open
#5,525 0 comments 0 reactions 1 assignee View on GitHub

@nmlud21 is already working on this.

Since Aug 24, 2026.

bug triaged
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.