STRUCT TEE_CONTEXT(9)
π struct tee_context(9) π
okay so bestie, welcome to the Kernel API Manual β¨ we're talking about struct tee_context today and honestly? she's kind of a big deal. it's the driver specific context that lives on file pointer data π iykyk.
πΈ NAME πΈ
struct tee_context β driver specific context on file pointer data π
β¨ SYNOPSIS β¨
struct tee_context {
struct tee_device *teedev;
void *data;
struct kref refcount;
bool releasing;
bool supp_nowait;
bool cap_memref_null;
};
like, that's the whole vibe right there π look at her. so tidy. so iconic.
π¦ Members π¦
teedevβ pointer to this driver'sstruct tee_deviceπ«Ά basically her home address, fr fr.dataβ driver specific context data, managed by the driver π the driver is the one holding the leash on this one, no cap.refcountβ reference counter for this structure β you know the drill, keep count or she gets freed at the worst possible moment πreleasingβ flag that indicates if context is being released right now π₯ and the reason it exists? it's needed to break circular dependency on context during shared memory release π circular dependency is giving toxic situationship, honestly. this flag is the friend who steps in and says "bestie, we're done here."supp_nowaitβ flag that says requests in this context should not wait for the tee-supplicant daemon to be started if it's not present β they just return with an error code and move on π it's needed for requests that arise from TEE based kernel drivers that should be non-blocking in nature. she does not have time to wait around, periodt. β°cap_memref_nullβ flag indicating if the TEE Client support shared memory buffer with aNULLpointer π§ that's it, that's the flag. a little capability check, a little "can u handle aNULLpointer, queen?" energy π
π SEE ALSO π
Kernel file ./include/linux/tee_drv.h plus this whole little friend group right here:
struct tee_shm(9)tee_shm_alloc_kernel_buf(9)tee_shm_register_kernel_buf(9)tee_shm_register_fd(9)tee_shm_free(9)tee_shm_get_va(9)tee_shm_get_pa(9)tee_shm_get_size(9)tee_shm_get_pages(9)tee_shm_get_page_offset(9)tee_client_open_context(9)tee_client_close_context(9)tee_client_get_version(9)tee_client_open_session(9)tee_client_close_session(9)tee_client_system_session(9)tee_client_invoke_func(9)tee_client_cancel_req(9)struct tee_client_device(9)struct tee_client_driver(9)
like, the whole squad π«Ά go read them, they're literally all right there, bestie.
π that's the page!! go forth and be a struct tee_context girlie. slay, but safely. mwah π
and the cute little sign-off from the bottom of the page: this one's filed under ./include/linux π, dated October 2026 π, and she answers to struct tee_context(9) π
β¨
π¦ 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