diff mbox series

[1/9] SELinux: Introduce "Advanced Hashing" Kconfig option

Message ID 20200408182416.30995-2-siarhei.liakh@concurrent-rt.com (mailing list archive)
State Changes Requested
Headers show
Series [1/9] SELinux: Introduce "Advanced Hashing" Kconfig option | expand

Commit Message

Siarhei Liakh April 8, 2020, 6:24 p.m. UTC
From: Siarhei Liakh <siarhei.liakh@concurrent-rt.com>

This patch introduces "Advanced Hashing" Kconfig option for SELinux,
which is used by subsequent patches to switch between faster, simpler
local hash functions and a bit slower, but much better ones from standard
Linux library. The patch only adds an option; hash function changes are
provided as separate patches, one per function changed.

Signed-off-by: Siarhei Liakh <siarhei.liakh@concurrent-rt.com>
---
Please CC me directly in all replies.

 security/selinux/Kconfig | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig
index 9e921fc72538..4b5c9fa510a1 100644
--- a/security/selinux/Kconfig
+++ b/security/selinux/Kconfig
@@ -61,6 +61,15 @@  config SECURITY_SELINUX_DEVELOP
 	  permissive mode (if permitted by the policy) via
 	  /sys/fs/selinux/enforce.
 
+config SECURITY_SELINUX_ADVANCED_HASHING
+	bool "Advanced hashing for primary hash tables"
+	depends on SECURITY_SELINUX
+	default n
+	help
+	  This enables better, but a little slower hashing functions in hash
+	  tables. New hashing function greatly reduces hash collisions, thus
+	  improving performance of large/complex SELinux configurations.
+
 config SECURITY_SELINUX_AVC_STATS
 	bool "NSA SELinux AVC Statistics"
 	depends on SECURITY_SELINUX