402 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

关闭CONFIG_NET同时使能CONFIG_EXT4_FS时链接出错

已完成
缺陷
创建于  
2023-08-15 09:44

【标题描述】关闭CONFIG_NET同时使能CONFIG_EXT4_FS时链接出错
【环境信息】
软件信息:
1) openEuler 22.03 SP2
2) kernel 5.10
【问题复现步骤】
具体操作步骤
关闭CONFIG_NET同时使能CONFIG_EXT4_FS
然后编译内核,报错如下:

  AR      drivers/acpi/built-in.a
  AR      drivers/built-in.a
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o
  MODPOST vmlinux.symvers
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      .tmp_vmlinux.btf
ld: Unexpected GOT/PLT entries detected!
ld: Unexpected run-time procedure linkages detected!
ld: fs/ext4/super.o: in function `alloc_skb':
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/linux/skbuff.h:1113: undefined reference to `__alloc_skb'
ld: fs/ext4/super.o: in function `nlmsg_put':
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/net/netlink.h:925: undefined reference to `__nlmsg_put'
ld: fs/ext4/super.o: in function `ext4_netlink_send_info':
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/fs/ext4/super.c:646: undefined reference to `netlink_broadcast'
ld: /home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/fs/ext4/super.c:651: undefined reference to `kfree_skb'
ld: fs/ext4/super.o: in function `netlink_kernel_create':
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/linux/netlink.h:60: undefined reference to `init_net'
ld: fs/ext4/super.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `init_net' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/linux/netlink.h:60:(.init.text+0x1a4): dangerous relocation: unsupported relocation
ld: /home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/linux/netlink.h:60: undefined reference to `init_net'
ld: /home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/./include/linux/netlink.h:60: undefined reference to `__netlink_kernel_create'
ld: fs/ext4/super.o: in function `ext4_exit_fs':
/home/linux-5.10.0-153.22.0.98.oe2203sp2.aarch64/fs/ext4/super.c:6956: undefined reference to `netlink_kernel_release'
  BTF     .btf.vmlinux.bin.o
tag__check_id_drift: subroutine_type id drift, core_id: 2243, btf_type_id: 2241, type_id_off: 0
libbpf: Unsupported BTF_KIND:0
btf_elf__encode: btf__new failed!
free(): double free detected in tcache 2
scripts/link-vmlinux.sh: line 147: 2252400 Aborted                 (core dumped) LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1}
  LD      .tmp_vmlinux.kallsyms1
.btf.vmlinux.bin.o: file not recognized: file format not recognized
make: *** [Makefile:1206: vmlinux] Error 1

解决方案:
若使能CONFIG_ETHTOOL_NETLINK=y,则内核可以正常编译及链接。

出现概率(是否必现,概率性错误)
必现

问题:
看了下,是32174988624144de9e93357306e5a7bcdb44d7b0这个patch在openEuler中添加了ext4系统error的netlink上报

评论 (3)

lpyhly 创建了缺陷

Hi lpyhly, 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.

openeuler-ci-bot 添加了
 
sig/Kernel
标签
lpyhly 修改了描述
Xie XiuQi 修改了描述
zhangjialin 关联分支设置为OLK-5.10

内部版本有添加宏控 CONFIG_EXT4_ERROR_REPORT 来控制 netlink 故障上报这个问题, 通过 config 依赖可以避免上面这个问题。

但是现在 netlink 故障上报在 openEuler 没有宏控相当于是默认打开的,添加 config 控制之后是默认关闭的,不清楚有没有下游在使用该功能,因此避免变更未合入

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助