linux-stable/security
Sumit Garg afe5f596b5 KEYS: trusted: Remove redundant static calls usage
[ Upstream commit 01bbafc63b ]

Static calls invocations aren't well supported from module __init and
__exit functions. Especially the static call from cleanup_trusted() led
to a crash on x86 kernel with CONFIG_DEBUG_VIRTUAL=y.

However, the usage of static call invocations for trusted_key_init()
and trusted_key_exit() don't add any value from either a performance or
security perspective. Hence switch to use indirect function calls instead.

Note here that although it will fix the current crash report, ultimately
the static call infrastructure should be fixed to either support its
future usage from module __init and __exit functions or not.

Reported-and-tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Link: https://lore.kernel.org/lkml/ZRhKq6e5nF%2F4ZIV1@fedora/#t
Fixes: 5d0682be31 ("KEYS: trusted: Add generic trusted keys framework")
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-19 23:05:33 +02:00
..
apparmor apparmor: fix missing error check for rhashtable_insert_fast 2023-07-23 13:47:30 +02:00
bpf
integrity ima: rework CONFIG_IMA dependency block 2023-10-10 21:59:07 +02:00
keys KEYS: trusted: Remove redundant static calls usage 2023-10-19 23:05:33 +02:00
landlock landlock: Fix same-layer rule unions 2022-06-09 10:23:24 +02:00
loadpin LoadPin: Ignore the "contents" argument of the LSM hooks 2022-12-31 13:14:45 +01:00
lockdown
safesetid
selinux selinux: set next pointer before attaching to list 2023-08-30 16:18:17 +02:00
smack Smack:- Use overlay inode label in smack_inode_copy_up() 2023-10-06 13:18:20 +02:00
tomoyo tomoyo: fix broken dependency on *.conf.default 2023-02-01 08:27:05 +01:00
yama
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 18:15:39 +01:00
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-12 11:58:59 +01:00
inode.c
Kconfig x86/retbleed: Add fine grained Kconfig knobs 2022-07-23 12:54:10 +02:00
Kconfig.hardening security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6 2022-12-31 13:14:46 +01:00
lsm_audit.c
Makefile
min_addr.c
security.c ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-10 09:40:03 +01:00