On Wed, Mar 5, 2025 at 11:47 AM David Hildenbrand <david@xxxxxxxxxx> wrote:
On 05.03.25 20:43, Andrii Nakryiko wrote:
On Wed, Mar 5, 2025 at 7:22 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
On 03/04, David Hildenbrand wrote:
Currently, uprobe_write_opcode() implements COW-breaking manually, which is
really far from ideal.
To say at least ;)
David, thanks for doing this. I'll try to read 3/3 tomorrow, but I don't
think I can really help. Let me repeat, this code was written many years
ago, I forgot everything, and today my understanding of mm/ is very poor.
But I'll try anyway.
Are there any uprobe tests / benchmarks that are worth running?
All I know about uprobe tests is that bpf people run a lot of tests which
use uprobes.
Andrii, Jiri, what you advise?
We do have a bunch of tests within BPF selftests:
cd tools/testing/selftest/bpf && make -j$(nproc) && sudo ./test_progs -t uprobe
I stumbled over them, but was so far not successful in building them in
my test VM (did not try too hard, though). Will try harder now that I
know that it actually tests uprobe properly :)
If you have decently recent Clang and pahole, then just make sure you
have kernel built before you build selftests. So above instructions
are more like:
1. cd <linux-repo>
2. cat tools/testing/selftests/bpf/{config, config.<your_arch>} >> .config
3. make -j$(nproc) # build kernel with that adjusted config
4. cd tools/testing/selftests/bpf
5. make -j$(nproc) # build BPF selftests
6. sudo ./test_progs -t uprobe # run selftests with "uprobe" in their name