Description of problem: 1)安装 AnolisOS 23.1 RC1 以及对应的内核源码包; 2)编译 Kselftest 识别,报错信息见附件。 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Created attachment 944 [details] 编译 Kselftest 失败
Created attachment 945 [details] kernel-selftests make log
内部海光机型问题已复现 [问题描述] Hygon C86 5280机型编译kernel-selftests失败,信息见kernel-selftests-make.log文件 当前海光空闲机器只有这个型号,无法验证海光其他型号CPU编译问题 [环境信息]: 物理机 [内核信息]: [root@anolis selftests]# uname -r 5.10.134-16.2_rc1.an23.x86_64 [操作系统信息]: [root@anolis selftests]# 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@anolis selftests]# lscpu 架构: x86_64 CPU 运行模式: 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual 字节序: Little Endian CPU: 64 在线 CPU 列表: 0-63 厂商 ID: HygonGenuine BIOS 厂商 ID: Chengdu Hygon 型号名称: Hygon C86 5280 16-core Processor BIOS 型号名称: Hygon C86 5280 16-core Processor Unknown CPU @ 2.5GHz BIOS CPU family: 107 CPU 系列: 24 型号: 1 每个核的线程数: 2 每个座的核数: 16 座: 2 步进: 1 Frequency boost: enabled CPU(s) scaling MHz: 57% CPU 最大 MHz: 2500.0000 CPU 最小 MHz: 1600.0000 BogoMIPS: 4999.99 标记: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4 _2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx s map clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flu shbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca Virtualization features: 虚拟化: AMD-V Caches (sum of all): L1d: 1 MiB (32 instances) L1i: 2 MiB (32 instances) L2: 16 MiB (32 instances) L3: 64 MiB (8 instances) NUMA: NUMA 节点: 4 NUMA 节点0 CPU: 0-7,32-39 NUMA 节点1 CPU: 8-15,40-47 NUMA 节点2 CPU: 16-23,48-55 NUMA 节点3 CPU: 24-31,56-63 Vulnerabilities: Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Mitigation; untrained return thunk; SMT vulnerable Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected Srbds: Not affected Tsx async abort: Not affected [问题发生概率]: 验证机型(Hygon C86 5280)必现 [复现步骤]: 1、安装rpm-build包 2、创建用户组: sudo groupadd mock sudo useradd -g mock mockbuild 3、下载对应src源码包并安装src.rpm包 4、安装yum install yum-utils 5、yum-builddep -y /root/rpmbuild/SPECS/kernel.spec 6、rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec 7、cd /root/rpmbuild/BUILD/kernel-5.10.134-16.2_rc1.an23/linux-5.10.134-16.2_rc1.an23.x86_64/tools/testing/selftests 8、make
Created attachment 967 [details] Kselftest build error
Comment on attachment 967 [details] Kselftest build error 内核添加补丁 https://git.kernel.org/torvalds/c/5f4d1fd5b5d3506759b5d9cf20bb5fb5b8bdcab1 后 kselftest 编译通过,但是有些 ld error,不知道有没有影响。
Created attachment 968 [details] Kselftest test result 测试能执行完成,测试后系统使用正常。
这个测试日志OK。
测试通过
(In reply to pu_wen from comment #5) > Comment on attachment 967 [details] > Kselftest build error > > 内核添加补丁 > https://git.kernel.org/torvalds/c/5f4d1fd5b5d3506759b5d9cf20bb5fb5b8bdcab1 后 > kselftest 编译通过,但是有些 ld error,不知道有没有影响。 链接错误可以通过安装glibc-static来解决