[PATCH bpf-next 1/2] bpftool: Add support for KIND_RESTRICT to gen min_core_btf command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[0]: https://lore.kernel.org/bpf/20220623212205.2805002-1-deso@xxxxxxxxxx/T/#m4c75205145701762a4b398e0cdb911d5b5305ffc

Suggested-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
Signed-off-by: Daniel Müller <deso@xxxxxxxxxx>
---
 tools/bpf/bpftool/gen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 3d35fbc..1cf53b 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);
-- 
2.30.2




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux