STRUCT TEE_IOCTL_SHM_REGISTER_FD_DATA(9)
π struct tee_ioctl_shm_register_fd_data(9) π
okay so bestie, you found a page from the Kernel API Manual β yes, that one, the big scary one π β and honestly? This one's a lil cutie. It's a struct. It's about shared memory registration. Let's get into it β¨
πΈ NAME πΈ
struct tee_ioctl_shm_register_fd_data β the shared memory registering argument π«Ά
Like, it's literally the argument struct. That's its whole job. And it slays at it.
β¨ SYNOPSIS β¨
struct tee_ioctl_shm_register_fd_data {
__s64 fd;
__u64 size;
__u32 flags;
__s32 id;
};
Look at her. Four fields. Perfectly balanced. Not me being obsessed with a C struct π
π Members π
fdβ[in]bestie this is the file descriptor that identifies the dmabuf reference π you hand it in, it's your ticketsizeβ[out]the size of the referenced memory, coming back at you π«flagsβ[in]the flags going to/from allocation, okurrr π¦idβ[out]the identifier of the shared memory, and there she is β
π§ Description π§
So here's the vibe check: the flags field should currently be zero as input π¨ β like, zero, nada, nothing, keep it empty bestie. It then gets updated by the call with the actual flags, as defined by TEE_IOCTL_SHM_* above π (iykyk, scroll up, they're right there).
This structure is used as the argument for TEE_IOC_SHM_REGISTER_FD below π and that's literally the whole dynamic.
ngl, "should currently be zero as input" is the kind of note you do NOT want to gloss over π keep that field at zero on your way in, fr fr.
π₯ SEE ALSO π₯
okay so this is the extended universe, get comfy:
- Kernel file
./include/uapi/linux/tee.hπ struct tee_ioctl_version_data(9)TEE_IOC_VERSION(9)struct tee_ioctl_shm_alloc_data(9)TEE_IOC_SHM_ALLOC(9)struct tee_ioctl_buf_data(9)struct tee_ioctl_param(9)struct tee_ioctl_open_session_arg(9)TEE_IOC_OPEN_SESSION(9)struct tee_ioctl_invoke_arg(9)TEE_IOC_INVOKE(9)struct tee_ioctl_cancel_arg(9)TEE_IOC_CANCEL(9)struct tee_ioctl_close_session_arg(9)TEE_IOC_CLOSE_SESSION(9)struct tee_iocl_supp_recv_arg(9)TEE_IOC_SUPPL_RECV(9)struct tee_iocl_supp_send_arg(9)TEE_IOC_SUPPL_SEND(9)struct tee_ioctl_shm_register_data(9)TEE_IOC_SHM_REGISTER_FD(9)TEE_IOC_SHM_REGISTER(9)struct tee_ioctl_object_invoke_arg(9)
That's the whole friend group π go read them too, they're iconic.
β¨ and that's the page! sign-off time: this lil gem lives in ./include/uapi/linux π and it's dated October 2026 ποΈ β go off, bestie, struct your heart out π
ππ
π¦ 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