mbox series

[v2,0/5] selinux: Assorted simplifications and cleanups

Message ID 20200117085836.445797-1-omosnace@redhat.com (mailing list archive)
Headers show
Series selinux: Assorted simplifications and cleanups | expand

Message

Ondrej Mosnacek Jan. 17, 2020, 8:58 a.m. UTC
This series contains some boolean code simplifications that I discovered
while working on another patch. I believe they also save some run time
(although not in any perf-critical paths) and some memory overhead.

Changes in v2:
 - drop already merged 1st patch
 - drop the rewrite of security_preserve_bools(), keep only the
   evaluate_cond_node() return type change (requested by Paul)

Ondrej Mosnacek (5):
  selinux: simplify evaluate_cond_node()
  selinux: convert cond_list to array
  selinux: convert cond_av_list to array
  selinux: convert cond_expr to array
  selinux: generalize evaluate_cond_node()

 security/selinux/include/conditional.h |   6 +-
 security/selinux/selinuxfs.c           |   4 +-
 security/selinux/ss/conditional.c      | 252 ++++++++++---------------
 security/selinux/ss/conditional.h      |  27 +--
 security/selinux/ss/policydb.c         |   2 +-
 security/selinux/ss/policydb.h         |   3 +-
 security/selinux/ss/services.c         |  32 ++--
 7 files changed, 137 insertions(+), 189 deletions(-)