Commit 80b1e77
libbpf-tools: fix fentry_try_attach bug
the bpf verifier would complain on program exit without initing R0 but
the buggy implementation makes up one BPF_EXIT instruction only, which
would be rejected by the verifier, and what's worse is that it does not
log any err about the try-to-load failure, which makes all tools use this
api would silently fall back to kprobe unexpectedly.
this patch fixs it and also prints verbose message about the result of the try.
Signed-off-by: Ze Gao <[email protected]>1 parent 5657c7d commit 80b1e77
1 file changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
997 | | - | |
998 | 996 | | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
1005 | 1013 | | |
| 1014 | + | |
1006 | 1015 | | |
1007 | 1016 | | |
1008 | 1017 | | |
| |||
0 commit comments