linux-stable/security/keys/trusted-keys
Sumit Garg 3746b878ef KEYS: trusted: Remove redundant static calls usage
commit 01bbafc63b upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:50 +02:00
..
Kconfig KEYS: trusted: Introduce support for NXP CAAM-based trusted keys 2022-05-23 18:47:50 +03:00
Makefile KEYS: trusted: Introduce support for NXP CAAM-based trusted keys 2022-05-23 18:47:50 +03:00
tpm2key.asn1 security: keys: trusted: use ASN.1 TPM2 key format for the blobs 2021-04-14 16:30:30 +03:00
trusted_caam.c KEYS: trusted: Introduce support for NXP CAAM-based trusted keys 2022-05-23 18:47:50 +03:00
trusted_core.c KEYS: trusted: Remove redundant static calls usage 2023-10-19 23:08:50 +02:00
trusted_tee.c KEYS: trusted: tee: use tee_shm_register_kernel_buf() 2022-02-16 07:49:41 +01:00
trusted_tpm1.c KEYS: trusted: Fix memory leak on object td 2021-05-12 22:36:36 +03:00
trusted_tpm2.c security: keys: Modify mismatched function name 2023-07-27 08:50:43 +02:00