public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if various processes can use mmap syscall on io_uring
@ 2026-09-11 13:20 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 79eea844d1ffee28e90815c81ec1786e9062e781
Author : Milos Malik <mmalik@redhat.com>
Date : 2023-05-19T15:55:58+00:00
Stats : +16/-1 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/79eea844d1ffee28e90815c81ec1786e9062e781?branch=pr775-checkpolicy-revdeps
Log:
test if various processes can use mmap syscall on io_uring
As many reported BZs confirm, various QEMU related programs use
the io_uring interface, but SELinux prevents them from using the
mmap syscall on it. The TC reproduces a similar situation.
In order to support the io_uring interface fully, I believe that
SELinux policy should allow the map permission on the anon_inode
class. The TC looks for appropriate policy rules.
The TC covers BZ#2025714, BZ#2187745 and their duplicates.
---
diff --git a/selinux-policy/anon_inode-and-similar/Makefile b/selinux-policy/anon_inode-and-similar/Makefile
index f7866fa..0a053b2 100644
--- a/selinux-policy/anon_inode-and-similar/Makefile
+++ b/selinux-policy/anon_inode-and-similar/Makefile
@@ -54,7 +54,7 @@ $(METADATA): Makefile
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: selinux-policy" >> $(METADATA)
- @echo "Requires: libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit" >> $(METADATA)
+ @echo "Requires: libselinux policycoreutils selinux-policy selinux-policy-targeted gcc glibc-headers setools-console audit fio" >> $(METADATA)
@echo "RhtsRequires: library(selinux-policy/common)" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@@ -63,6 +63,9 @@ $(METADATA): Makefile
@echo "Environment: AVC_ERROR=+no_avc_check" >> $(METADATA)
@echo "Releases: -RHEL4" >> $(METADATA)
@echo "Bug: 1974559" >> $(METADATA)
+ @echo "Bug: 2027660" >> $(METADATA) # RHEL-9
+ @echo "Bug: 2025714" >> $(METADATA) # Fedora 35
+ @echo "Bug: 2187745" >> $(METADATA) # RHEL-9
rhts-lint $(METADATA)
diff --git a/selinux-policy/anon_inode-and-similar/main.fmf b/selinux-policy/anon_inode-and-similar/main.fmf
index e490f04..e9ed5d7 100644
--- a/selinux-policy/anon_inode-and-similar/main.fmf
+++ b/selinux-policy/anon_inode-and-similar/main.fmf
@@ -15,6 +15,7 @@ recommend:
- glibc-headers
- setools-console
- audit
+ - fio
environment:
AVC_ERROR: +no_avc_check
duration: 30m
@@ -28,6 +29,8 @@ tag:
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1974559
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2027660
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2025714
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2187745
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8
diff --git a/selinux-policy/anon_inode-and-similar/runtest.sh b/selinux-policy/anon_inode-and-similar/runtest.sh
index 35b18d6..d7ddd4f 100755
--- a/selinux-policy/anon_inode-and-similar/runtest.sh
+++ b/selinux-policy/anon_inode-and-similar/runtest.sh
@@ -60,9 +60,18 @@ rlJournalStart
rlRun "rm -f reproducer"
rlPhaseEnd
+ rlPhaseStartTest "mmap on io_uring - bz#2025714 + bz#2187745"
+ rlSESearchRule "allow unconfined_t unconfined_t : anon_inode { map } [ ]"
+ rlSESearchRule "allow svirt_t svirt_t : anon_inode { map } [ ]"
+ rlSESearchRule "allow virtd_t virtd_t : anon_inode { map } [ ]"
+
+ rlRun "fio --filename=/root/pokus --iodepth=16 --rw=write --ioengine=io_uring --bs=16k --size=2G --numjobs=30 --runtime=100s --group_reporting=1 --name=mytest"
+ rlPhaseEnd
+
rlPhaseStartCleanup
sleep 2
rlSECheckAVC
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:20 [tests/selinux] pr775-checkpolicy-revdeps: test if various processes can use mmap syscall on io_uring Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox