-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Error when using bpf_strncmp #5137
Comments
See error
Here,
has my_com in stack (fp) and verifier does not like it. The kernel specification:
The third argument needs to be a ptr to const str. Try
to see whether it works or not. |
It does not work for me: Ubuntu 24.04
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm having problems when using bpf_strncmp, I have a simple ebpf program using BCC, that program uses bpf_strncmp to compare the task name to a string.
So I do the following:
If I use this I get a permission denied error that I can't seem to understand while, if I use
strncmp
it works as expectedThe error:
In the ebpf compiled code I have the following:
However, the
bpf_strncmp
takes char * as mentioned in the doc so I don't understand the problemThe text was updated successfully, but these errors were encountered: