This series improves the computational and memory efficiency of filename transition rules in SELinux. The first patch is only cosmetic, see the second patch for more details about its effects. Changes in v2: - removed unnecessary assigment of 'last' - renamed 'exists' variable to 'already_there' which is more clear - added more likely/unlikely annotations (there will almost always be just one datum per key) Ondrej Mosnacek (2): selinux: factor out loop body from filename_trans_read() selinux: optimize storage of filename transitions security/selinux/ss/policydb.c | 225 +++++++++++++++++++-------------- security/selinux/ss/policydb.h | 8 +- security/selinux/ss/services.c | 16 ++- 3 files changed, 146 insertions(+), 103 deletions(-) -- 2.24.1