Security Enhanced Linux is seeing some nice optimizations with the in-development Linux 5.8 kernel.One of the optimizations in Linux 5.8 for SELinux is changing around some of their internal data structures for improving performance.
One notable area is using a hash table for SELinux role transitions.
For storing role transitions within a hash table, on Fedora where there are around 428 role transitions, the run-time was cut by about 50% when testing with Stress-NG benchmarks.There is also a new SELinux policy version for more efficient storing of filename transitions in the binary policy.
With that work, the change dropped the policy size on a test system from a reported ~7.6MB to ~3.3MB.
The kernel policy load time was also reduced.More details on these nice optimizations and other changes for SELinux in the 5.8 kernel via this pull Our last SELinux benchmarks were in January so perhaps it's time to run some fresh numbers soon.