SELinux Archive on
 help / color / Atom feed
From: Stephen Smalley <>
To: Richard Haines <>,
Subject: Re: [PATCH 1/1] selinux-testsuite: Add perf_event tests
Date: Tue, 3 Dec 2019 10:15:17 -0500
Message-ID: <> (raw)
In-Reply-To: <>

On 12/1/19 9:52 AM, Richard Haines wrote:
> Test perf_event permissions.
> Signed-off-by: Richard Haines <>
> ---

> diff --git a/policy/test_perf_event.te b/policy/test_perf_event.te
> new file mode 100644
> index 0000000..8b612bc
> --- /dev/null
> +++ b/policy/test_perf_event.te
> +neverallow test_perf_no_admin_t self:capability { sys_admin };

I don't particularly object to this, but I wanted to note that these 
neverallows are not being checked by default (expand-check=0 in 
/etc/selinux/semanage.conf) and in fact, if one were to enable 
expand-check, it would not be possible to insert the test policy module 
without triggering some neverallow and/or typebounds failures because 
the test policy intentionally violates such invariants at points.

Even the base Fedora policy doesn't appear to pass neverallow checking 
at present; if you enable expand-check=1 in /etc/selinux/semanage.conf 
and semodule -B, it fails (at least for me).

So your neverallow rules in the test policy are at best documentation.

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01 14:52 [PATCH 0/1] " Richard Haines
2019-12-01 14:52 ` [PATCH 1/1] " Richard Haines
2019-12-03 15:15   ` Stephen Smalley [this message]
2019-12-03 16:00     ` Richard Haines

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

SELinux Archive on

Archives are clonable:
	git clone --mirror selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ \
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone