STRUCT TEE_CONTEXT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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's struct 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 a NULL pointer 🧚 that's it, that's the flag. a little capability check, a little "can u handle a NULL pointer, queen?" energy πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./include/linux/tee_drv.h plus this whole little friend group right here:

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