lsm: Reduce overhead of LSMs with static calls
JIRA: https://issues.redhat.com/browse/RHEL-12439
JIRA: https://issues.redhat.com/browse/RHEL-16573
This MR backports the commits that convert indirect calls in the LSM infrastructure to static calls (+ various dependencies), which reduces the performance impact of some security_*() calls. It also avoids a performance regression caused by the mitigation of CVE-2024-2201 (see https://issues.redhat.com/browse/RHEL-61611).
Two of the dependent commits also fix RHEL-16573.
Omitted-fix: faf302f5a213 ("security: Fix ret values doc for security_inode_init_security()")
this doc string is not in place in RHEL-9 codebase
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Edited by Ondrej Mosnáček