STRUCT TEE_DRIVER_OPS(9)
π NAME π
struct tee_driver_ops β driver operations vtable. bestie, this is the vtable of driver ops, and she is lowkey the main character of the TEE driver interface π
β¨ SYNOPSIS β¨
okay so hereβs the struct in all her glory β every function pointer exactly as declared, no cap:
struct tee_driver_ops {
void (*get_version)(struct tee_device *teedev, struct
tee_ioctl_version_data *vers);
int (*get_tee_revision)(struct tee_device *teedev, char *buf, size_t
len);
int (*open)(struct tee_context *ctx);
void (*close_context)(struct tee_context *ctx);
void (*release)(struct tee_context *ctx);
int (*open_session)(struct tee_context *ctx, struct
tee_ioctl_open_session_arg *arg, struct tee_param *param);
int (*close_session)(struct tee_context *ctx, u32 session);
int (*system_session)(struct tee_context *ctx, u32 session);
int (*invoke_func)(struct tee_context *ctx, struct
tee_ioctl_invoke_arg *arg, struct tee_param *param);
int (*object_invoke_func)(struct tee_context *ctx, struct
tee_ioctl_object_invoke_arg *arg, struct tee_param *param);
int (*cancel_req)(struct tee_context *ctx, u32 cancel_id, u32
session);
int (*supp_recv)(struct tee_context *ctx, u32 *func, u32
*num_params, struct tee_param *param);
int (*supp_send)(struct tee_context *ctx, u32 ret, u32 num_params,
struct tee_param *param);
int (*shm_register)(struct tee_context *ctx, struct tee_shm *shm,
struct page **pages, size_t num_pages, unsigned long start);
int (*shm_unregister)(struct tee_context *ctx, struct tee_shm *shm);
};
π§© Members π§©
get_versionβ returns version of driver β¨get_tee_revisionβ returns revision string (diagnostic only); do not infer feature support from this, useTEE_IOC_VERSIONinstead. like bestie, please do not use this for feature checks, okay? πopenβ called for a context when the device file is opened πclose_contextβ called when the device file is closed πΈreleaseβ called to release the context π«Άopen_sessionβ open a new session β¨close_sessionβ close a session πsystem_sessionβ declare session as a system session πinvoke_funcβ invoke a trusted function π₯object_invoke_funcβ invoke a TEE object π¦cancel_reqβ request cancel of an ongoing invoke or open πsupp_recvβ called for supplicant to get a command π¨supp_sendβ called for supplicant to send a response πshm_registerβ register shared memory buffer in TEE π§shm_unregisterβ unregister shared memory buffer in TEE π
πΈ Description πΈ
okay so the context given to open might last longer than the device file if it is tied to other resources in the TEE driver. close_context is called when the client closes the device file, even if there are existing references to the context. The TEE driver can use close_context to start cleaning up. that cleanup window is the whole point, bestie β donβt sleep on it π«Ά
π¦ SEE ALSO π¦
Kernel file ./include/linux/tee_core.h β plus the whole friend group:
struct tee_device(9)struct tee_desc(9)struct tee_protmem_pool(9)struct tee_protmem_pool_ops(9)tee_device_alloc(9)tee_device_register(9)tee_device_unregister(9)tee_device_get(9)tee_device_put(9)tee_device_set_dev_groups(9)tee_session_calc_client_uuid(9)struct tee_shm_pool(9)struct tee_shm_pool_ops(9)tee_shm_pool_free(9)tee_protmem_static_pool_alloc(9)tee_get_drvdata(9)tee_shm_alloc_priv_buf(9)tee_shm_is_dynamic(9)tee_shm_put(9)tee_shm_get_id(9)tee_shm_get_from_id(9)teedev_open(9)teedev_close_context(9)teedev_ctx_get(9)teedev_ctx_put(9)
π cute little sign-off: source/version is ./include/linux, dated October 2026, and this was struct tee_driver_ops(9) β bye bestie, go read the TEE docs and slay β¨π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms