-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support capturing via fentry / fexit trace points #51
Comments
I did a try to do implementation for this.
I changed to asm code for the data and data_end to be :
But I got error
@arthurfabre Any thoughts for this issue? Could you help for how to make these asm codes works for xdp_buff? Thanks Here are the asm instructions:
|
@ptzianos Could you also help to take a look. Thanks |
Thanks for giving it a go! Looking at the definition of I think the only difference between
|
@arthurfabre Trace type prog should have the r1 for the address to arg arrays, which is different with xdp prog. |
Add more details for the issue I met now:
Since there are already check code ( data + 21 > data_end) before load the data in data+ 12 , so I'd think the generated asm code is fine
When fetch for data and data_end, there is always a convert to long operation. Then I guess maybe this is the issue why I got the error. I tried to check for the xlated code the trace prograom, I got following codes:
Look like the long convert is actually no needed. So got a bit confused here. @arthurfabre Any insights for this? Appreciate that if you can some time and have a check. |
I also genearted the cbpf to c code
The block0 can't pass the ebpf verify
|
Linux now supports attaching BPF programs just before (fentry) and after (fexit) an XDP program.
This allows packets to be captured before and after an XDP program runs, from unmodified XDP programs (no "hook" map).
xdpdump
already supports this, but without filtering: https://github.com/xdp-project/xdp-tools/tree/master/xdp-dump/.The text was updated successfully, but these errors were encountered: