STRUCT TEE_DRIVER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, use TEE_IOC_VERSION instead. 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:


πŸ’– 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