public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: test if pcm-sensor-server can run on machines with many CPUs
Date: Fri, 11 Sep 2026 13:22:29 GMT	[thread overview]
Message-ID: <178913294985.1.11923553382132575057.tests-selinux-3702d34999e6@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 3702d34999e632423ccd12b632fa4c25f76e95ef
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-03-26T14:30:15+00:00
            Stats  : +12/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/3702d34999e632423ccd12b632fa4c25f76e95ef?branch=pr775-checkpolicy-revdeps

            Log:
            test if pcm-sensor-server can run on machines with many CPUs

Recent selinux-policy + pcm testing on machines with multiple CPUs
revealed that SELinux prevents the pcm-sensor-server process from
doing various operation. The TC reproduces that situation on the
right HW.

In order to support the expected functions of pcm-sensor-server,
I believe that SELinux policy should allow these actions. The TC
looks for appropriate policy rules and file context patterns.

The TC covers RHEL-80452.

---
diff --git a/selinux-policy/pcm-sensor-server-and-similar/Makefile b/selinux-policy/pcm-sensor-server-and-similar/Makefile
index 09892d4..b37360f 100644
--- a/selinux-policy/pcm-sensor-server-and-similar/Makefile
+++ b/selinux-policy/pcm-sensor-server-and-similar/Makefile
@@ -64,6 +64,7 @@ $(METADATA): Makefile
 	@echo "Destructive:     no" >> $(METADATA)
 	@echo "Releases:        -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8 -RHEL9" >> $(METADATA)
 	@echo "Bug:             RHEL-52838" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHEL-80452" >> $(METADATA) # RHEL-10
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/pcm-sensor-server-and-similar/main.fmf b/selinux-policy/pcm-sensor-server-and-similar/main.fmf
index 3476274..146de4e 100644
--- a/selinux-policy/pcm-sensor-server-and-similar/main.fmf
+++ b/selinux-policy/pcm-sensor-server-and-similar/main.fmf
@@ -34,6 +34,7 @@ tag:
   - NoRHIVOS
 link:
   - verifies: https://issues.redhat.com/browse/RHEL-52838
+  - verifies: https://issues.redhat.com/browse/RHEL-80452
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8, rhel-9

diff --git a/selinux-policy/pcm-sensor-server-and-similar/runtest.sh b/selinux-policy/pcm-sensor-server-and-similar/runtest.sh
index eab7a09..e54cd3b 100755
--- a/selinux-policy/pcm-sensor-server-and-similar/runtest.sh
+++ b/selinux-policy/pcm-sensor-server-and-similar/runtest.sh
@@ -63,6 +63,16 @@ rlJournalStart
         sleep 2
     rlPhaseEnd
 
+    if rlSEDefined "pcmsensor_t" ; then
+    rlPhaseStartTest "RHEL-80452"
+        rlSEMatchPathCon ${FILE_PATH} ${FILE_CONTEXT}
+        rlSESearchRule "allow pcmsensor_t pcmsensor_t : capability2 { perfmon } [ ]"
+        rlSESearchRule "allow pcmsensor_t pcmsensor_t : perf_event { cpu kernel open read } [ ]"
+        rlSESearchRule "allow pcmsensor_t pcmsensor_t : tcp_socket { accept bind create listen } [ ]"
+        rlSESearchRule "allow pcmsensor_t node_t : tcp_socket { node_bind } [ ]"
+    rlPhaseEnd
+    fi
+
     rm -f output.txt
     virt-what >& output.txt
     if [ -s output.txt ] ; then

                 reply	other threads:[~2026-09-11 13:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913294985.1.11923553382132575057.tests-selinux-3702d34999e6@fedoraproject.org \
    --to=mmalik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox