From: Alexei Starovoitov Date: Wed, 9 Oct 2024 23:32:47 +0000 (-0700) Subject: Merge branch 'check-the-remaining-info_cnt-before-repeating-btf-fields' X-Git-Tag: v6.12-rc4~18^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=830b8e49424b15ca469e2a5b162c9ee818a113c6;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'check-the-remaining-info_cnt-before-repeating-btf-fields' Hou Tao says: ==================== Check the remaining info_cnt before repeating btf fields From: Hou Tao Hi, The patch set adds the missed check again info_cnt when flattening the array of nested struct. The problem was spotted when developing dynptr key support for hash map. Patch #1 adds the missed check and patch #2 adds three success test cases and one failure test case for the problem. Comments are always welcome. Change Log: v2: * patch #1: check info_cnt in btf_repeat_fields() * patch #2: use a hard-coded number instead of BTF_FIELDS_MAX, because BTF_FIELDS_MAX is not always available in vmlinux.h (e.g., for llvm 17/18) v1: https://lore.kernel.org/bpf/20240911110557.2759801-1-houtao@huaweicloud.com/T/#t ==================== Link: https://lore.kernel.org/r/20241008071114.3718177-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov --- 830b8e49424b15ca469e2a5b162c9ee818a113c6