All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cil: remove avrules that have no associated types
@ 2016-12-07 12:15 Gary Tierney
  2016-12-07 12:15 ` [PATCH] libsepol/cil: remove avrules with no affected types Gary Tierney
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Tierney @ 2016-12-07 12:15 UTC (permalink / raw)
  To: selinux

This is a minor improvement to the CIL -> policydb code which will remove
unused AV rules.  In the past you could create 2 type attributes like so:

(typeattribute x)
(typeattribute y)
(type z)
(typeattributeset y z)

And an avrule (which would be kept in the resulting policydb):

(allow x y (process (transition)))

Now the avrule would be removed, since the source of the rule has
no associated types.  Similarly, the rule would have been removed if the
target had no associated types when the source does.  The exception to this
rule is neverallows, since AOSP checks for them in their resulting policy.conf.

There's a small difference in fedora-selinux:

[root@localhost ~]# sesearch -ACS original.30  | head -1
Found 101204 semantic av rules:
[root@localhost ~]# sesearch -ACS modified.30  | head -1
Found 101030 semantic av rules:

And a more noticeable difference with Dominick Grift's dssp1:

[root@localhost ~]# sesearch -ACS dssp_original.30 | head -1
Found 11270 semantic av rules:
[root@localhost ~]# sesearch -ACS dssp_modified.30 | head -1
Found 2574 semantic av rules:

Gary Tierney (1):
  libsepol/cil: remove avrules with no affected types

 libsepol/cil/src/cil_binary.c | 47 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-13 16:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 12:15 [PATCH] cil: remove avrules that have no associated types Gary Tierney
2016-12-07 12:15 ` [PATCH] libsepol/cil: remove avrules with no affected types Gary Tierney
     [not found]   ` <06461db4-cd7a-c3b8-7a56-7e9e7ab8f2b4@tycho.nsa.gov>
2016-12-07 13:46     ` Gary Tierney
2016-12-13 16:03   ` James Carter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.