microsoft / microsoft/ebpf-for-windows

Add bpf_get_current_comm support in ebpf_helper.

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

Description

Please help add this helper function to allow eBPF program knows the executable name, it could improve our eBPF logic to avoid the redirection for some particular executables.

long bpf_get_current_comm(void *buf, u32 size_of_buf)

Description
Copy the comm attribute of the current task into
buf of size_of_buf. The comm attribute contains the
name of the executable (excluding the path) for the
current task. The size_of_buf must be strictly
positive. On success, the helper makes sure that
the buf is NUL-terminated. On failure, it is filled
with zeroes.

Return 0 on success, or a negative error in case of
failure.

Contributor guide

Open the contributing guide

Research direction

Start by locating ebpf_helper and the existing eBPF helper implementations that define how helpers are exposed and tested. Use the stated bpf_get_current_comm signature and semantics as the acceptance criteria: copy the current executable name, NUL-terminate successful results, zero the buffer on failure, and return the documented status.

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.