[RFC PATCH v2 08/11] KEYS: trusted: TEE: Synchronize session lifetime
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Nov 4 03:03:07 UTC 2026
> Even with sysfs bind attributes suppressed on trusted_key_driver, the
> parent TEE device can still remove trusted_key_device while live trusted
> keys keep trusted.ko loaded, and init_trusted() updated static calls
> only after backend init() had already registered key_type_trusted.
>
> Update the static calls before invoking backend init() and reset them on
> failure. In the TEE backend, guard session context state with a mutex,
> publish pvt_data.dev before registering key_type_trusted, sanitize
> pvt_data on probe failure and remove, and reject seal/unseal/get_random
> with -ENODEV when no active TEE session is bound.
>
> Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103030226.2685251-1-jarkko@kernel.org?part=8
More information about the Linux-security-module-archive
mailing list