[缺陷描述]: kernel-selftests测试drivers/dma-buf/udmabuf 报错 [skip,no-udmabuf: Unable to access DMA buffer device file] [重现概率]: 必现 [重现步骤] 1. 下载kernel-6.6.25-2_rc1.an23.src.rpm 2. rpm -i kernel-6.6.25-2_rc1.an23.src.rpm 3. yum-builddep -y /root/rpmbuild/SPECS/kernel.spec rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec cd /root/rpmbuild/BUILD/kernel-6.6.25-2_rc1.an23/linux-6.6.25-2_rc1.an23.aarch64/tools/testing/selftests/drivers/dma-buf/ 4. make;./udmabuf [期望结果]: 用例执行PASS [实际结果]: [root@iZbp143ti4ccpaufkzata6Z dma-buf]# ./udmabuf drivers/dma-buf/udmabuf: [skip,no-udmabuf: Unable to access DMA buffer device file] [重现环境]: 环境信息:云上ecs [root@iZbp143ti4ccpaufkzata6Z breakpoints]# uname -a Linux iZbp143ti4ccpaufkzata6Z 6.6.25-2_rc1.an23.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Apr 11 15:02:38 CST 2024 aarch64 aarch64 aarch64 GNU/Linux [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 4.0M 0 4.0M 0% /dev tmpfs 16G 0 16G 0% /dev/shm tmpfs 6.1G 804K 6.1G 1% /run efivarfs 256K 18K 239K 7% /sys/firmware/efi/efivars /dev/nvme0n1p2 40G 13G 27G 33% / tmpfs 16G 3.1M 16G 1% /tmp /dev/nvme0n1p1 500M 6.5M 494M 2% /boot/efi tmpfs 3.1G 4.0K 3.1G 1% /run/user/0 [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# free -g total used free shared buff/cache available Mem: 30 0 28 0 1 29 Swap: 0 0 0 [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# cat /proc/cmdline BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.6.25-2_rc1.an23.aarch64 root=UUID=6424d533-3c41-4ad9-89fa-1d3bf8c49fd3 ro rhgb crashkernel=0M-2G:0M,2G-64G:256M,64G-:384M iommu.passthrough=1 iommu.strict=0 cryptomgr.notests cgroup.memory=nokmem rcupdate.rcu_cpu_stall_timeout=300 quiet selinux=1 console=tty0 biosdevname=0 net.ifnames=0 console=ttyAMA0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 [root@iZbp143ti4ccpaufkzata6Z breakpoints]# [root@iZbp143ti4ccpaufkzata6Z breakpoints]# lscpu Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: ARM BIOS Vendor ID: Alibaba Cloud Model name: Neoverse-N2 BIOS Model name: virt-rhel7.6.0 CPU @ 2.0GHz BIOS CPU family: 1 Model: 0 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 Stepping: r0p0 BogoMIPS: 100.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm 3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp sve2 sveaes svepmull svebitperm svesh a3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh Caches (sum of all): L1d: 512 KiB (8 instances) L1i: 512 KiB (8 instances) L2: 8 MiB (8 instances) L3: 64 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities: Gather data sampling: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Reg file data sampling: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; __user pointer sanitization Spectre v2: Mitigation; CSV2, BHB Srbds: Not affected Tsx async abort: Not affected
skip原因在为/dev/udmabuf文件不存在,该文件处理DMA buffer 该情况在ECS中正常,物理机上待确认
在物理机里面也没有/dev/udmabuf文件,需要开发确认是否提供这个功能以及是否需要适配该用例
我们的内核 CONFIG_UDMABUF is not set 开关没有打开,所以 udmabuf 设备节点不存在属于预期行为
在 5.10 上未打开,先默认关闭
CONFIG_UDMABUF先不打开,测试建立相关基线。