-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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
|
arg3 of bpf_strncmp is expected to be a value of a read-only map value. bpf: Add a ARG_PTR_TO_CONST_STR argument type
@yonghong-song could bcc create a read-only map value for |
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: