[PATCH v5 07/12] KEYS: trusted: TEE: Disable sysfs bind attributes
Sumit Garg
sumit.garg at kernel.org
Sun Nov 8 23:27:49 PST 2026
On Mon, 09 Nov 2026 at 00:27:13 +0200, Jarkko Sakkinen wrote:
>Suppress sysfs bind and unbind attributes on trusted_key_driver so that
>userspace cannot unbind the driver and unregister key_type_trusted while
>the trusted module remains loaded.
>
>Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>
>---
> security/keys/trusted-keys/trusted_tee.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Sounds reasonable to me, FWIW:
Reviewed-by: Sumit Garg <sumit.garg at oss.qualcomm.com>
-Sumit
>diff --git a/security/keys/trusted-keys/trusted_tee.c b/security/keys/trusted-keys/trusted_tee.c
>index ad9c7baddcef..87ea549f7f0b 100644
>--- a/security/keys/trusted-keys/trusted_tee.c
>+++ b/security/keys/trusted-keys/trusted_tee.c
>@@ -307,7 +307,8 @@ static struct tee_client_driver trusted_key_driver = {
> .remove = trusted_key_remove,
> .id_table = trusted_key_id_table,
> .driver = {
>- .name = DRIVER_NAME,
>+ .name = DRIVER_NAME,
>+ .suppress_bind_attrs = true,
> },
> };
>
>--
>2.47.3
>
More information about the linux-afs
mailing list