On Mon, Apr 6, 2020 at 3:42 PM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > On Mon, Apr 6, 2020 at 6:35 PM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > > Currently, they are stored in a linked list, which adds significant > > overhead to security_transition_sid(). On Fedora, with 428 role > > transitions in policy, converting this list to a hash table cuts down > > its run time by about 50%. This was measured by running 'stress-ng -t 30 > > --metrics-brief --msg 0' under perf with and without this patch. > > > > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> > > --- > > security/selinux/ss/policydb.c | 138 ++++++++++++++++++++++----------- > > security/selinux/ss/policydb.h | 8 +- > > security/selinux/ss/services.c | 21 +++-- > > 3 files changed, 107 insertions(+), 60 deletions(-) ... > I just spotted a copy-paste bug here - the type should come from > tcontext, not scontext... Will send a fixed version tomorrow. No rush, while we can obviously review it at any point in time, the earliest it could be merged would be next week (assuming the merge window closes this Sunday). -- paul moore www.paul-moore.com