All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Improve libsepol and CIL neverallow and bounds checking
@ 2015-06-11 18:26 James Carter
  2015-06-11 18:26 ` [PATCH 01/10] libsepol: Add new ebitmap function named ebitmap_match_any() James Carter
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: James Carter @ 2015-06-11 18:26 UTC (permalink / raw)
  To: selinux

This patch set refactors libsepol's neverallow and bounds checking, refactors CIL's
neverallow checking, and adds bounds checking to CIL.

It also results in improved memory usage and speed. With a test policy.conf derived
from Refpolicy with typebounds statements added (but no violations of neverallow
rules or type bounds) the following improvements are seen:
Before: 9,605M of memory and 22.5 sec.
Now   :   125M of memory and  2.1 sec.

In addition to adding bounds checking to CIL. This patch set also improves the error
reporting for neverallow rule violations and CIL will now report all violations
instead of stopping at the first one.

James Carter (10):
  libsepol: Add new ebitmap function named ebitmap_match_any()
  libsepol: Treat types like an attribute in the attr_type_map.
  libsepol: Refactored neverallow checking.
  libsepol: Refactored bounds (hierarchy) checking code
  libsepol/cil: Add function to search the CIL AST for an AV rule.
  libsepol/cil: Refactored CIL neverallow checking and reporting.
  libsepol/cil: Track number of classes and number of types and
    attributes.
  libsepol/cil: Add CIL bounds checking and reporting.
  secilc: Add a CIL policy file to test neverallow checking.
  secilc: Add a CIL policy file to test bounds checking.

 libsepol/cil/src/cil.c                      |    3 +-
 libsepol/cil/src/cil_binary.c               |  684 +++++++++++++-----
 libsepol/cil/src/cil_binary.h               |    8 +-
 libsepol/cil/src/cil_find.c                 |  281 ++++++++
 libsepol/cil/src/cil_find.h                 |   39 ++
 libsepol/cil/src/cil_internal.h             |    2 +
 libsepol/cil/src/cil_post.c                 |   26 +-
 libsepol/include/sepol/policydb/ebitmap.h   |    1 +
 libsepol/include/sepol/policydb/hierarchy.h |   11 +
 libsepol/include/sepol/policydb/policydb.h  |    2 +-
 libsepol/src/assertion.c                    |  225 +++---
 libsepol/src/ebitmap.c                      |   22 +
 libsepol/src/expand.c                       |   26 +-
 libsepol/src/hierarchy.c                    | 1000 +++++++++++++++++----------
 libsepol/src/policydb.c                     |    4 +
 secilc/test/bounds.cil                      |  241 +++++++
 secilc/test/neverallow.cil                  |   79 +++
 17 files changed, 1994 insertions(+), 660 deletions(-)
 create mode 100644 libsepol/cil/src/cil_find.c
 create mode 100644 libsepol/cil/src/cil_find.h
 create mode 100644 secilc/test/bounds.cil
 create mode 100644 secilc/test/neverallow.cil

-- 
1.9.3

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

end of thread, other threads:[~2015-06-15 13:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 18:26 [PATCH 00/10] Improve libsepol and CIL neverallow and bounds checking James Carter
2015-06-11 18:26 ` [PATCH 01/10] libsepol: Add new ebitmap function named ebitmap_match_any() James Carter
2015-06-11 18:26 ` [PATCH 02/10] libsepol: Treat types like an attribute in the attr_type_map James Carter
2015-06-11 20:03   ` Stephen Smalley
2015-06-12 12:14     ` James Carter
2015-06-12 12:22       ` Stephen Smalley
2015-06-12 13:02         ` James Carter
2015-06-11 18:26 ` [PATCH 03/10] libsepol: Refactored neverallow checking James Carter
2015-06-11 20:07   ` Stephen Smalley
2015-06-12 12:55     ` Christopher J. PeBenito
2015-06-12 12:59     ` James Carter
2015-06-12 13:05       ` James Carter
2015-06-11 18:26 ` [PATCH 04/10] libsepol: Refactored bounds (hierarchy) checking code James Carter
2015-06-11 18:26 ` [PATCH 05/10] libsepol/cil: Add function to search the CIL AST for an AV rule James Carter
2015-06-12 18:27   ` Steve Lawrence
2015-06-15 13:59     ` James Carter
2015-06-11 18:26 ` [PATCH 06/10] libsepol/cil: Refactored CIL neverallow checking and reporting James Carter
2015-06-11 18:26 ` [PATCH 07/10] libsepol/cil: Track number of classes and number of types and attributes James Carter
2015-06-11 18:26 ` [PATCH 08/10] libsepol/cil: Add CIL bounds checking and reporting James Carter
2015-06-11 18:26 ` [PATCH 09/10] secilc: Add a CIL policy file to test neverallow checking James Carter
2015-06-11 18:26 ` [PATCH 10/10] secilc: Add a CIL policy file to test bounds checking 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.