0xB10C / peer-observer

Tool to monitor for P2P anomalies and attacks using Bitcoin Core honeynodes
https://public.peer.observer
MIT License
12 stars 2 forks source link

extractor: use `bpf_probe_read_user_str()` instead of `bpf_probe_read_str()` #82

Open 0xB10C opened 1 week ago

0xB10C commented 1 week ago

https://github.com/0xB10C/peer-observer/blob/df2e85d8cbcc1229d62a2d6712f13f0abf26e992/extractor/src/bpf/tracing.bpf.c#L77-L79

In multiple places, we use bpf_probe_read_str. https://man7.org/linux/man-pages/man7/bpf-helpers.7.html recommends to use bpf_probe_read_user_str instead.

Generally, use bpf_probe_read_user_str() or bpf_probe_read_kernel_str() instead.