linux/security/selinux
Stephen Smalley 9c1cc4a7f7 selinux: check level category sets once at load time
As reported by Jiri Vozar, commit 7edea6e8c8 ("selinux: beef up
isvalid checks") introduces a new loop in mls_level_isvalid() that
causes ~89-94% throughput regression in System V IPC message queue
operations (msgsnd/msgrcv).

Move the expensive part of the ebitmap checking to policy load time
instead as the reporter suggested.

Link: https://lore.kernel.org/selinux/CAMgFczCi2Z011dNf84Amc0Q-qnTt0+VUjWY+Y7zPyXdaH35Jvw@mail.gmail.com/
Fixes: 7edea6e8c8 ("selinux: beef up isvalid checks")
Reported-by: Jiri Vozar <jvozar@redhat.com>
Suggested-by: Jiri Vozar <jvozar@redhat.com>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2026-08-04 10:57:46 -04:00
..
include selinux/stable-7.2 PR 20260615 2026-06-17 12:41:00 +01:00
ss selinux: check level category sets once at load time 2026-08-04 10:57:46 -04:00
.gitignore selinux: move genheaders to security/selinux/ 2024-10-03 16:07:51 -04:00
avc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
genheaders.c selinux: move genheaders to security/selinux/ 2024-10-03 16:07:51 -04:00
hooks.c selinux: bpf: check SBLABEL_MNT before isec init 2026-07-31 11:33:53 -04:00
ibpkey.c selinux: comment spelling fix in ibpkey.c 2026-05-27 20:10:48 -04:00
ima.c selinux: adjust typos in comments 2023-05-08 16:44:01 -04:00
initcalls.c selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
Kconfig selinux: Introduce a new config to make avc cache slot size adjustable 2025-10-23 18:24:30 -04:00
Makefile selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
netif.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
netlabel.c lsm/stable-6.12 PR 20240911 2024-09-16 18:19:47 +02:00
netlink.c selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
netnode.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
netport.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
nlmsgtab.c xfrm: add XFRM_MSG_MIGRATE_STATE for single SA migration 2026-06-04 12:22:47 +02:00
selinuxfs.c selinux/stable-7.2 PR 20260615 2026-06-17 12:41:00 +01:00
status.c selinux: avoid implicit conversions regarding enforcing status 2023-07-18 18:29:50 -04:00
xfrm.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00