Description of problem: during CKI "swraid/trim" test [1] we hit the following issue: SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max kernel policy version: 33 selinux-policy-34.11-1.fc34.noarch ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.401:916): avc: denied { search } for pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:917): avc: denied { getattr } for pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:918): avc: denied { read } for pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:919): avc: denied { open } for pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 Version-Release number of selected component (if applicable): selinux-policy-34.11-1.fc34.noarch How reproducible: It seems to be 100% reproducible Steps to Reproduce: 1.1.Run the test [1] and check for avc denials [1] https://gitlab.com/cki-project/kernel-tests/-/tree/main/storage/swraid/trim
SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max kernel policy version: 33 selinux-policy-34.11-1.fc34.noarch ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.401:916): avc: denied { search } for pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:917): avc: denied { getattr } for pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:918): avc: denied { read } for pid=863685 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:12:23 2021 type=AVC msg=audit(1623445943.411:919): avc: denied { open } for pid=863685 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:13:41 2021 type=AVC msg=audit(1623446021.201:923): avc: denied { search } for pid=864140 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:13:41 2021 type=AVC msg=audit(1623446021.201:924): avc: denied { getattr } for pid=864140 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:13:41 2021 type=AVC msg=audit(1623446021.201:925): avc: denied { read } for pid=864140 comm="mdadm" name="dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1 ---- time->Fri Jun 11 17:13:41 2021 type=AVC msg=audit(1623446021.201:926): avc: denied { open } for pid=864140 comm="mdadm" path="/dev/dma_heap" dev="devtmpfs" ino=124 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dma_device_dir_t:s0 tclass=dir permissive=1
*** This bug has been marked as a duplicate of bug 1970744 ***