Bug 6184 - [Anck 4.19][x86_64][nightly]kernel_selftests下test_verifier用例fail,报错Unexpected error message!
Summary: [Anck 4.19][x86_64][nightly]kernel_selftests下test_verifier用例fail,报错Unexpected...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuming
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-18 15:08 UTC by zhixin01
Modified: 2023-08-18 15:09 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhixin01 alibaba_cloud_group 2023-08-18 15:08:38 UTC
[缺陷描述]:
kernel_selftests下test_verifier用例fail,报错Unexpected error message!,用例总共有4个检查点fail

该用例首次失败是在8月17日晚上触发的nightly,之前一直都是成功的
失败用例nightly链接:https://tone.aliyun-inc.com/ws/6yddz4ne/test_result/217199

测试日志:
# ./test_verifier
#0/u add+sub+mul OK
#0/p add+sub+mul OK
#1/u DIV32 by 0, zero check 1 OK
#1/p DIV32 by 0, zero check 1 OK
#2/u DIV32 by 0, zero check 2 OK
#2/p DIV32 by 0, zero check 2 OK
#3/u DIV64 by 0, zero check OK
#3/p DIV64 by 0, zero check OK
============省略部分========================
#301/u valid cgroup storage access OK
#301/p valid cgroup storage access OK
#302/u invalid cgroup storage access 1 OK
#302/p invalid cgroup storage access 1 OK
#303/u invalid cgroup storage access 2 OK
#303/p invalid cgroup storage access 2 OK
#304/u invalid cgroup storage access 3 OK
#304/p invalid cgroup storage access 3 OK
#305/u invalid cgroup storage access 4 OK
#305/p invalid cgroup storage access 4 OK
#306/u invalid cgroup storage access 5 FAIL
Unexpected error message!
        EXP: R2 leaks addr into helper function
        RES: 0: (b7) r2 = 7
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
get_local_storage() doesn't support non-zero flags

0: (b7) r2 = 7
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
get_local_storage() doesn't support non-zero flags
#306/p invalid cgroup storage access 5 OK
#307/u invalid cgroup storage access 6 FAIL
Unexpected error message!
        EXP: get_local_storage() doesn't support non-zero flags
        RES: 0: (bf) r2 = r1
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
R2 leaks addr into helper function

0: (bf) r2 = r1
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
R2 leaks addr into helper function
#307/p invalid cgroup storage access 6 OK
#308/u valid per-cpu cgroup storage access OK
#308/p valid per-cpu cgroup storage access OK
#309/u invalid per-cpu cgroup storage access 1 OK
#309/p invalid per-cpu cgroup storage access 1 OK
#310/u invalid per-cpu cgroup storage access 2 OK
#310/p invalid per-cpu cgroup storage access 2 OK
#311/u invalid per-cpu cgroup storage access 3 OK
#311/p invalid per-cpu cgroup storage access 3 OK
#312/u invalid per-cpu cgroup storage access 4 OK
#312/p invalid per-cpu cgroup storage access 4 OK
#313/u invalid per-cpu cgroup storage access 5 FAIL
Unexpected error message!
        EXP: R2 leaks addr into helper function
        RES: 0: (b7) r2 = 7
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
get_local_storage() doesn't support non-zero flags

0: (b7) r2 = 7
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
get_local_storage() doesn't support non-zero flags
#313/p invalid per-cpu cgroup storage access 5 OK
#314/u invalid per-cpu cgroup storage access 6 FAIL
Unexpected error message!
        EXP: get_local_storage() doesn't support non-zero flags
        RES: 0: (bf) r2 = r1
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
R2 leaks addr into helper function

0: (bf) r2 = r1
1: (18) r1 = 0x0
3: (85) call bpf_get_local_storage#81
R2 leaks addr into helper function
#314/p invalid per-cpu cgroup storage access 6 OK
================省略部分==========================
#717/p reference tracking: access after release OK
#718/p reference tracking: direct access for lookup OK
Summary: 994 PASSED, 0 SKIPPED, 4 FAILED


复现环境:
anck 4.19 x86物理机

复现概率:
必现

内核信息:
# uname -r
4.19.91-819.git.23205a664c.an8.x86_64

操作系统信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

cpu信息:
# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Intel(R) Corporation
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
BIOS Model name:     Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Stepping:            4
CPU MHz:             1686.667
CPU max MHz:         3100.0000
CPU min MHz:         1000.0000
BogoMIPS:            5000.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-95
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d arch_capabilities

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:          755Gi       3.7Gi       745Gi        18Mi       5.4Gi       747Gi
Swap:         2.0Gi          0B       2.0Gi

[复现步骤]:
测试用例代码路径:
tools/testing/selftests/bpf/test_verifier.c

手动执行步骤:
下载当前内核对应的kernel源码包
rpm -ivh xxx.src.rpm  默认安装到/root下
yum-builddep -y rpmbuild/SPECS/kernel.spec   自动安装前置依赖包,需要yum-utils
rpmbuild -bp ./rpmbuild/SPECS/kernel.spec   # 这个步骤会打相关的patch, 解压缩tar包,生成BUILD目录
cd rpmbuild/BUILD/kernel-xxx/linux-xxx/  

接下来就可以编译测试了
cd ./tools/testing/selftests/bpf/
make

执行测试用例
./test_verifier

[期望结果]:
用例pass

[实际结果]:
用例有4个检测点fail

[分析]
test_verifier用例失败貌似和8月17日上午合入的下面PR有关,请开发同学确认下
https://gitee.com/anolis/cloud-kernel/pulls/2052/files