Bug 8845 - [Anolis23.1 GA][Beta][ANCK-6.6.25-2][x86_64/aarch64] kernel-selftests测试clone3.clone3_cap_checkpoint_restore用例失败
Summary: [Anolis23.1 GA][Beta][ANCK-6.6.25-2][x86_64/aarch64] kernel-selftests测试clone3...
Status: CLOSED WONTFIX
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: generic (show other bugs) generic
Version: 6.6.25-2
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: zhangxinyi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-23 14:57 UTC by anolislw
Modified: 2024-11-06 10:17 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anolislw alibaba_cloud_group 2024-04-23 14:57:29 UTC
[缺陷描述]:
 kernel-selftests测试clone3.clone3_cap_checkpoint_restore依赖失败
cap_set_proc: Operation not permitted
# clone3_cap_checkpoint_restore.c:164:clone3_cap_checkpoint_restore:Expected set_capability() (-1) == 0 (0)
# clone3_cap_checkpoint_restore.c:165:clone3_cap_checkpoint_restore:Could not set CAP_CHECKPOINT_RESTORE


[重现概率]:
必现


[重现步骤]
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/clone3
4. make;./clone3_cap_checkpoint_restore


[期望结果]:
用例执行PASS


[实际结果]:
[root@iZbp143ti4ccpaufkzata6Z clone3]# ./clone3_cap_checkpoint_restore
TAP version 13
1..1
# Starting 1 tests from 1 test cases.
#  RUN           global.clone3_cap_checkpoint_restore ...
# clone3() syscall supported
# clone3_cap_checkpoint_restore.c:155:clone3_cap_checkpoint_restore:Child has PID 857618
cap_set_proc: Operation not permitted
# clone3_cap_checkpoint_restore.c:164:clone3_cap_checkpoint_restore:Expected set_capability() (-1) == 0 (0)
# clone3_cap_checkpoint_restore.c:165:clone3_cap_checkpoint_restore:Could not set CAP_CHECKPOINT_RESTORE
# clone3_cap_checkpoint_restore: Test terminated by assertion
#          FAIL  global.clone3_cap_checkpoint_restore
not ok 1 global.clone3_cap_checkpoint_restore
# FAILED: 0 / 1 tests passed.
# Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0



[重现环境]:
环境信息:云上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
Comment 1 zhangxinyi 2024-04-24 17:37:58 UTC
是一个之前就有的问题,在5.1内核中可以同样出现
社区反映该问题长期存在
https://lkml.iu.edu/hypermail/linux/kernel/2211.1/00443.html
Comment 2 yunmeng365524 2024-05-21 16:54:18 UTC
社区就长期存在的问题,测试建立基线。
Comment 3 anolislw alibaba_cloud_group 2024-11-06 10:17:48 UTC
记录下 在anolis23 6.6.25-2.2_rc1.an23.x86_64内核环境下也存在同样问题
=========================
[root@5f9Lab15 clone3]# ./clone3_cap_checkpoint_restore
TAP version 13
1..1
# Starting 1 tests from 1 test cases.
#  RUN           global.clone3_cap_checkpoint_restore ...
# clone3() syscall supported
# clone3_cap_checkpoint_restore.c:155:clone3_cap_checkpoint_restore:Child has PID 996234
cap_set_proc: Operation not permitted
# clone3_cap_checkpoint_restore.c:164:clone3_cap_checkpoint_restore:Expected set_capability() (-1) == 0 (0)
# clone3_cap_checkpoint_restore.c:165:clone3_cap_checkpoint_restore:Could not set CAP_CHECKPOINT_RESTORE
# clone3_cap_checkpoint_restore: Test terminated by assertion
#          FAIL  global.clone3_cap_checkpoint_restore
not ok 1 global.clone3_cap_checkpoint_restore
# FAILED: 0 / 1 tests passed.
# Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0
[root@5f9Lab15 clone3]#
[root@5f9Lab15 clone3]# uname -r
6.6.25-2.2_rc1.an23.x86_64
[root@5f9Lab15 clone3]#
[root@5f9Lab15 clone3]# pwd
/root/rpmbuild/BUILD/kernel-6.6.25-2.2_rc1.an23/linux-6.6.25-2.2_rc1.an23.x86_64/tools/testing/selftests/clone3
[root@5f9Lab15 clone3]#