You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interestingly, the second example works even without the definition of struct ib_gid_table_entry (it's pulled from BTF of the ib_core module), omitting the struct def from the first example yields a different error:
$ bpftrace -e 'kfunc:find_gid { print(args.table->data_vec[0]->attr.gid.raw); }'
stdin:1:18-53: ERROR: Struct/union of type 'struct ib_gid_table_entry' does not contain a field named 'attr'
kfunc:find_gid { print(args.table->data_vec[0]->attr.gid.raw); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The issues are very likely connected (I suspect incorrect handling of [0] for pointer types in both field analyser and codegen).
The text was updated successfully, but these errors were encountered:
When trying to dereference a kernel pointer with
[0]
, the BPF verifier refuses to load the program.This program:
triggers a verifier error:
However, this works fine:
Interestingly, the second example works even without the definition of
struct ib_gid_table_entry
(it's pulled from BTF of theib_core
module), omitting the struct def from the first example yields a different error:The issues are very likely connected (I suspect incorrect handling of
[0]
for pointer types in both field analyser and codegen).The text was updated successfully, but these errors were encountered: