diff options
author | Daniel Müller <deso@posteo.net> | 2022-07-06 21:28:54 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-07-08 14:26:39 +0200 |
commit | aad53f17f0ad7485872d66fbcb53cc0c60e811f2 (patch) | |
tree | c4493d5f63ba56e7d87ea912c80af4b6e96f5042 /tools/bpf | |
parent | d6f34f7f77fba25b07b0a4f1e55054637e4027b3 (diff) |
bpftool: Add support for KIND_RESTRICT to gen min_core_btf command
This change adjusts bpftool's type marking logic, as used in conjunction
with TYPE_EXISTS relocations, to correctly recognize and handle the
RESTRICT BTF kind.
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220623212205.2805002-1-deso@posteo.net/T/#m4c75205145701762a4b398e0cdb911d5b5305ffc
Link: https://lore.kernel.org/bpf/20220706212855.1700615-2-deso@posteo.net
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/gen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c index 3d35fbc5fe16..1cf53bb01936 100644 --- a/tools/bpf/bpftool/gen.c +++ b/tools/bpf/bpftool/gen.c @@ -1762,6 +1762,7 @@ btfgen_mark_type(struct btfgen_info *info, unsigned int type_id, bool follow_poi } break; case BTF_KIND_CONST: + case BTF_KIND_RESTRICT: case BTF_KIND_VOLATILE: case BTF_KIND_TYPEDEF: err = btfgen_mark_type(info, btf_type->type, follow_pointers); |