(In reply to stt02296199 from comment #0) > [问题描述] kernel-selftests.netfilter.nft_audit.sh 测试用例执行./audit_logread 报错 Can't open netlink socket: Protocol not supported > > 执行日志部分如下: > # selftests: netfilter: nft_audit.sh > # logging into /tmp/tmp.ZVmmspY0LF > # testing for cmd: nft add table t1 ... Can't open netlink socket: Protocol > not supported > # FAIL > # -table=t1 family=2 entries=1 op=nft_register_table > # + entries=0 > # testing for cmd: nft add chain t1 c1 ... FAIL > # -table=t1 family=2 entries=1 op=nft_register_chain > # + entries=0 > # testing for cmd: nft add chain t1 c2; add chain t1 c3 ... FAIL > # -table=t1 family=2 entries=2 op=nft_register_chain > # + entries=0 > # testing for cmd: nft add rule t1 c1 counter ... FAIL > # -table=t1 family=2 entries=1 op=nft_register_rule > # + entries=0 > # testing for cmd: nft add rule t1 c1 counter; add rule t1 c1 counter ... > FAIL > # -table=t1 family=2 entries=2 op=nft_register_rule > # + entries=0 > # testing for cmd: nft add rule t1 c2 counter; add rule t1 c2 counter; add > rule t1 c2 counter; add rule t1 c3 counter; add rule t1 c3 counter; add rule > t1 c3 counter ... FAIL > # -table=t1 family=2 entries=6 op=nft_register_rule > # + entries=0 > # testing for cmd: nft add table t2 ... FAIL > # -table=t2 family=2 entries=1 op=nft_register_table > # + entries=0 > # testing for cmd: nft add chain t2 c1 ... FAIL > # -table=t2 family=2 entries=1 op=nft_register_chain > > [重现环境]: > > [root@localhost netfilter]# nft -v > nftables v1.0.8 (Old Doc Yak #2) > [root@localhost netfilter]# rpm -qa |grep nft > libnftnl-1.2.6-1.an23.riscv64 > nftables-1.0.8-1.an23.riscv64 > [root@localhost netfilter]# lsmod | grep -E "nf_tables|nfnetlink" > nf_tables 2686976 1 nft_quota > nfnetlink 94208 2 nf_tables > [root@localhost netfilter]# uname -r > 6.6.102-5.2.1_rc1.an23.riscv64 > [root@localhost netfilter]# cat /boot/config-6.6.102-5.2.1_rc1.an23.riscv64 > |grep -i dma|grep -i heap > # CONFIG_DMABUF_HEAPS is not set > [root@localhost netfilter]# lscpu > Architecture: riscv64 > Byte Order: Little Endian > CPU(s): 64 > On-line CPU(s) list: 0-63 > NUMA: > NUMA node(s): 4 > NUMA node0 CPU(s): 0-7,16-23 > NUMA node1 CPU(s): 8-15,24-31 > NUMA node2 CPU(s): 32-39,48-55 > NUMA node3 CPU(s): 40-47,56-63 > [root@localhost netfilter]# lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS > nvme0n1 259:0 0 953.9G 0 disk > ├─nvme0n1p1 259:1 0 121.9M 0 part /boot/efi > ├─nvme0n1p2 259:2 0 488M 0 part /boot > ├─nvme0n1p3 259:3 0 143.1G 0 part / > ├─nvme0n1p4 259:4 0 1K 0 part > ├─nvme0n1p5 259:5 0 286.1G 0 part /fs/nvme0n1p5 > └─nvme0n1p6 259:6 0 286.1G 0 part > [root@localhost netfilter]# free -g > total used free shared buff/cache > available > Mem: 61 2 0 0 59 > 59 > Swap: 0 0 0 > [root@localhost netfilter]# cat /proc/cmdline > root=UUID=e297bfa3-2c55-44f8-90cb-ae8eb642d188 ro console=ttyS0,115200 > root=LABEL=ROOT rootfstype=ext4 rootwait rw earlycon selinux=0 > LANG=en_US.UTF-8 nvme.use_threaded_interrupts=1 nvme_core.io_timeout=3000 > audit=0 per_numa_node_futex=disable > gcc版本 > gcc (GCC) 12.3.0 20230508 (Anolis OS 12.3.0-13) > > [重现步骤] > 1.获取内核对应src.rpm包 > (KERNEL_SRC_RPM=http://8.131.87.1/kojifiles/repos/dist-an23.3-riscv64-gcc14- > build/latest/riscv64/toplink/work/tasks/5939/1035939/kernel-6.6.102-5.2. > 1_rc1.an23.src.rpm) > rpm -ivh xxx.src.rpm 默认安装到/root下 > yum install yum-utils > yum-builddep -y /root/rpmbuild/SPECS/kernel.spec 自动安装前置依赖包 需要yum-utils > rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec # 这个步骤会打相关的patch, > 解压缩tar包,生成BUILD目录 > cd > /root/rpmbuild/BUILD/kernel-6.6.102-5.2.1_rc1.an23/linux-6.6.102-5.2.1_rc1. > an23.riscv64/tools/testing/selftests/netfilter/ > ./nft_audit.sh > [实际结果] > 测试fail > [期望结果] > 测试pass > [原因分析]
6.6.102-5_rc1.1内核同样有该问题,不影响稳定性暂不关注