// strncpy(obj->rodata->new_uprobe_path, env.new_uprobe_path, PATH_LENTH);
// TODO: currently using `/a` as the replacing executable path to uprobe
// perf event in the kernel, since long strings (such as bpftime_daemon it self)
// may break userspace memory.
// Find a better way to solve this in the future
strncpy(obj->rodata->new_uprobe_path, "/a", PATH_LENTH);
This will make the uprobe failed if /a is not exist as an elf.
To Reproduce
run daemon
Expected behavior
can we found a better way to solve this?
Maybe we can create the /a file in advance?
Screenshots
Desktop (please complete the following information):
Describe the bug
The current daemon exists a hack:
This will make the uprobe failed if /a is not exist as an elf.
To Reproduce
run daemon
Expected behavior
Screenshots
Desktop (please complete the following information):
Additional context