projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17e8e5d
)
bpf: Resolve modifiers when walking structs
author
Stanislav Fomichev
<sdf@google.com>
Mon, 26 Jun 2023 21:25:21 +0000
(14:25 -0700)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Fri, 30 Jun 2023 08:35:59 +0000
(10:35 +0200)
It is impossible to use skb_frag_t in the tracing program. Resolve typedefs
when walking structs.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link:
https://lore.kernel.org/bpf/20230626212522.2414485-1-sdf@google.com
kernel/bpf/btf.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/btf.c
b/kernel/bpf/btf.c
index 29fe2109929853dc5d8ecd02e2153c3e2d9b823b..3dd47451f097a04c71057e8943960d571abc466d 100644
(file)
--- a/
kernel/bpf/btf.c
+++ b/
kernel/bpf/btf.c
@@
-6135,6
+6135,8
@@
static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf,
*flag = 0;
again:
+ if (btf_type_is_modifier(t))
+ t = btf_type_skip_modifiers(btf, t->type, NULL);
tname = __btf_name_by_offset(btf, t->name_off);
if (!btf_type_is_struct(t)) {
bpf_log(log, "Type '%s' is not a struct\n", tname);