【环境信息】
软件信息:
1) OS版本及分支:openEuler-22.09
2) 内核信息:5.10.0-106.7.0.60.oe2209.x86_64
3) 发现问题的组件版本信息:kernel-5.10.0-106.7.0.60.oe2209.x86_64
【问题复现步骤】
1.使用pahole >= v1.21 版本
2.内核config 打开
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
3、编译安装内核
出现概率(必现)
【预期结果】
新编内核正常启动,系统正常
【实际结果】
系统启动失败
【附件信息】
Hi wang-yufen316, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @刘勇强 , @wangxiongfeng , @朱科潜 , @WangShaoBo , @lujialin , @wuxu_buque , @Xu Kuohai , @冷嘲啊 , @Lingmingqiang , @yuzenghui , @岳海兵 , @juntian , @OSSIM , @陈结松 , @whoisxxx , @koulihong , @刘恺 , @hanjun-guo , @woqidaideshi , @Chiqijun , @Kefeng , @ThunderTown , @AlexGuo , @kylin-mayukun , @Zheng Zucheng , @柳歆 , @Jackie Liu , @zhujianwei001 , @郑振鹏 , @SuperSix173 , @colyli , @Zhang Yi , @htforge , @Qiuuuuu , @Xie XiuQi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
问题原因是合入CORE特性时合入了前置补丁 db16c1fe92d7ba7d39061(bpf: Generate BTF_KIND_FLOAT when linking vmlinux), pahole 版本 >= v1.21时,使能--btf_gen_floats,但是 BTF_KIND_FLOAT相关特性没有全部合入导致btf解析问题,需回合如下补丁:
7c782ab8b72f bpf: Document BTF_KIND_FLOAT in btf.rst
fe86e5d1c508 selftests/bpf: Add BTF_KIND_FLOAT to the existing deduplication tests
dc4e290bd211 selftest/bpf: Add BTF_KIND_FLOAT tests
dc30a6c2b97e bpf: Add BTF_KIND_FLOAT support
8346b8684060 selftests/bpf: Use the 25th bit in the "invalid BTF_INFO" test
37204927c59f tools/bpftool: Add BTF_KIND_FLOAT support
使用 pahole v1.21 和 v1.23分别验证,btf 和 core的selftest用例,都ok
[root@localhost bpf]# ./test_progs -t btf
#9/1 struct test #1:OK
#9/2 struct test #2:OK
#9/3 struct test #3 Invalid member offset:OK
#9/4 global data test #1:OK
#9/5 global data test #2:OK
#9/6 global data test #3:OK
...
#51/2 null_check:OK
#51/3 weak_ksyms:OK
#51/4 weak_ksyms_lskel:OK
#51/5 write_check:OK
#51 ksyms_btf:OK
#82 resolve_btfids:OK
#95 snprintf_btf:OK
Summary: 11/210 PASSED, 0 SKIPPED, 0 FAILED
[root@localhost bpf]# ./test_progs -t core
#25 core_autosize:OK
#26/1 default search path:OK
#26/2 custom values:OK
#26/3 tristate (y):OK
#26/4 tristate (n):OK
#26/5 tristate (m):OK
#26/6 tristate (int):OK
#26/7 tristate (bad):OK
#26/8 bool (y):OK
#26/9 bool (n):OK
#26/10 bool (tristate):OK
#26/11 bool (int):OK
#26/12 char (tristate):OK
#26/13 char (bad):OK
#26/14 char (empty):OK
#26/15 char (str):OK
#26/16 str (empty):OK
#26/17 str (padded):OK
...
#29/58 size:OK
#29/59 size___diff_sz:OK
#29/60 size___err_ambiguous:OK
#29/61 type_based:OK
#29/62 type_based___all_missing:OK
#29/63 type_based___diff_sz:OK
#29/64 type_based___incompat:OK
#29/65 type_based___fn_wrong_args:OK
#29/66 type_id:OK
#29/67 type_id___missing_targets:OK
#29/68 enumval:OK
#29/69 enumval___diff:OK
#29/70 enumval___val3_missing:OK
#29/71 enumval___err_missing:OK
#29 core_reloc:OK
#30 core_retro:OK
Summary: 6/107 PASSED, 0 SKIPPED, 0 FAILED
登录 后才可以发表评论