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
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.fopen
, when opening hooked files, creates a temporary file under/tmp
and fills it with correct content, return itsFILE*
ad the result.open
,read
,openat
, implement pure in-memory file mocking, as a replacement offopen
hooking