linux/security/selinux/include
Ian Bridges c0b6a5b89d selinux: compute the IMA configuration settings string length once at boot
selinux_ima_collect_state() builds a string of the current SELinux
configuration settings. The string lists each setting as a name and
one digit. The length of the string therefore never changes, but is
still recomputed on every call.

Add selinux_ima_config_len_init() to compute the length once during
selinux_init(). Update selinux_ima_collect_state() to use the stored
length.

Suggested-by: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/df755e0282dab3b932d19aceab71b7d7@paul-moore.com
Signed-off-by: Ian Bridges <icb@fastmail.org>
Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2026-07-15 21:42:01 -04:00
..
audit.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
avc_ss.h selinux: fix style issues in security/selinux/include/avc_ss.h 2023-12-22 18:09:26 -05:00
avc.h selinux: introduce neveraudit types 2025-06-19 17:23:04 -04:00
classmap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
conditional.h selinux: constify and reconcile function parameter names 2025-01-07 23:14:38 -05:00
hash.h selinux: improve bucket distribution uniformity of avc_hash() 2025-10-23 18:24:30 -04:00
ibpkey.h selinux: make header files self-including 2023-05-18 14:12:43 -04:00
ima.h selinux: compute the IMA configuration settings string length once at boot 2026-07-15 21:42:01 -04:00
initcalls.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
initial_sid_to_string.h selinux: do not include <linux/*.h> headers from host programs 2024-10-03 15:34:24 -04:00
netif.h selinux: fix style issues in security/selinux/include/netif.h 2023-12-22 18:09:28 -05:00
netlabel.h selinux: fix style issues with security/selinux/include/netlabel.h 2023-12-22 18:09:28 -05:00
netnode.h selinux: constify network address pointer 2025-04-11 16:29:50 -04:00
netport.h selinux: include necessary headers in headers 2022-05-03 14:11:13 -04:00
objsec.h selinux: fix avdcache auditing 2026-04-28 18:13:58 -04:00
policycap_names.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
policycap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
security.h selinux/stable-7.2 PR 20260615 2026-06-17 12:41:00 +01:00
xfrm.h selinux: fix style issues in security/selinux/include/xfrm.h 2023-12-22 18:09:30 -05:00