Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Replaces 248] Support read /sys/bus/event_source/devices/uprobe/type on old kernel versions #333

Merged
merged 28 commits into from
Aug 29, 2024

Conversation

Officeyutong
Copy link
Contributor

@Officeyutong Officeyutong commented Aug 16, 2024

Replaces #248

Solves #239

Adds file read mocking for /sys/bus/event_source/devices/uprobe/type and /sys/bus/event_source/devices/uprobe/format/retprobe, so libbpf will be able to attach uprobes in container or unprivileged environment.

  • Hooks fopen, when opening hooked files, creates a temporary file under /tmp and fills it with correct content, return its FILE* ad the result.
  • Hooks open, read, openat, implement pure in-memory file mocking, as a replacement of fopen hooking
  • CI for testing uprobes in unprivileged environment

@Officeyutong Officeyutong marked this pull request as ready for review August 29, 2024 09:47
@Officeyutong Officeyutong requested review from hp77-creator and yunwei37 and removed request for hp77-creator August 29, 2024 09:47
@yunwei37 yunwei37 merged commit 0d8402e into eunomia-bpf:master Aug 29, 2024
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants