eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions with LLVM JIT
https://eunomia.dev/bpftime/
MIT License
699 stars 70 forks source link

[FEATURE] Need a `bpftime detach PID` command to undo the effects of `bpftime attach` #166

Closed agentzh closed 3 months ago

agentzh commented 6 months ago

Currently, there's no way to undo the effects of bpftime attach. Hopefully, there's a bedtime detach PID command to clean up everything injected into the target process space.

We must be very careful about cleaning up registered "uprobes" though. For example, if the uprobes were set on a dynamically-allocated memory page from the target process's JIT or AOT compilers, then the original breakpoints might already be rewritten or their memory pages might even be freed up.

Officeyutong commented 3 months ago

Done by #261