Description of problem: Latest PCP git master on an up-to-date Fedora 29: # ./check -g pmda.bcc <snip> # grep denied /var/log/audit/audit.log | grep pcp type=AVC msg=audit(1553693798.867:610): avc: denied { map_create } for pid=27346 comm="python3" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=bpf permissive=1 type=AVC msg=audit(1553693798.867:611): avc: denied { map_read map_write } for pid=27346 comm="python3" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=bpf permissive=1 type=AVC msg=audit(1553693799.123:612): avc: denied { prog_load } for pid=27346 comm="python3" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=bpf permissive=1 type=AVC msg=audit(1553693799.124:613): avc: denied { prog_run } for pid=27346 comm="python3" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=bpf permissive=1 # Ideally the process of checking for newly appeared AVCs during testing could be automated, perhaps just by merely grep'ing for new PCP AVCs after each QA run (on platforms where applicable). Thanks.
(In reply to Marko Myllynen from comment #0) > Ideally the process of checking for newly appeared AVCs during testing could > be automated, perhaps just by merely grep'ing for new PCP AVCs after each QA > run (on platforms where applicable). Thanks. That'd be interesting. I wonder if we could either A) Introduce some selinux infrastructure to the check script itself to report avc denials (I don't think this will be well taken upstream) or B) Create a new testcase that's artificially high so we can count on it being run last (ie, something like qa/99999) that runs `ausearch -se 'pcp_{pmcd,pmlogger,pmproxy,pmie,etc}_t' --raw` and fails if there's any output. Just as an aside, due to the nature of PCP as a monitoring framework (always trying to get our hands on new data and areas on the system to monitor) we're always going to be hitting avc denials, especially as selinux gains new context types, classes, etc. Some of those are dependant on the current state of the system, so individual PCP maintainers won't always hit them first. It'd be great to know how pcp's src/selinux/README is lacking so that the effort could gain wider adoption.
(In reply to Lukas Berk from comment #1) > (In reply to Marko Myllynen from comment #0) > > Ideally the process of checking for newly appeared AVCs during testing could > > be automated, perhaps just by merely grep'ing for new PCP AVCs after each QA > > run (on platforms where applicable). Thanks. > > That'd be interesting. I wonder if we could either > > A) Introduce some selinux infrastructure to the check script itself to > report avc denials (I don't think this will be well taken upstream) Actually, I think it would. :) There is precedent here - have a look at the way check runs "./994 --fix" after every test (qa/check around line 444), and also the ./check.callback injection point just after that. These approaches have the advantage of showing which test is triggering the failure - the callback model can also induce the whole QA run to stop. cheers.
The AVCs are now resolved in commit 51a509ec4 and the automated test checking is done in e3479c138be... commit e3479c138be7015791dbd563810eebf5ee1a3942 Author: Nathan Scott <nathans> Date: Tue Apr 16 14:33:58 2019 +1000 qa: extend check.callback.sample to look for selinux AVCs after each test Add check.callback.sample to the default QA installed set of files, so it ends up in pcp-testsuite. Minor tidyups in check shell code. commit 51a509ec4a99e2b83e4b59724404f2c8344eae20 Author: Nathan Scott <nathans> Date: Tue Apr 16 13:57:45 2019 +1000 selinux: re-instate BPF type rules to get pmdabpf working again Resolve Fedora bugzilla #1693332
pcp-4.3.2-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-89ed2e2383
pcp-4.3.2-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-30c683f0ae
pcp-4.3.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2f04e77d53
pcp-4.3.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-89ed2e2383
pcp-4.3.2-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2f04e77d53
pcp-4.3.2-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-30c683f0ae
pcp-4.3.2-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
pcp-4.3.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
pcp-4.3.2-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.