TEE_IOC_SHM_REGISTER_FD(9)
π TEE_IOC_SHM_REGISTER_FD(9) β like, the Kernel API Manual one, bestie β¨
okay so picture this: it's a kernel API manual page, section 9, and the star of the show is TEE_IOC_SHM_REGISTER_FD. she's a header-file girly, she lives in the uapi folder, and today we're gonna understand her. no gatekeeping, let's go π
πΈ NAME πΈ
TEE_IOC_SHM_REGISTER_FD β register a shared memory from a file descriptor</p> π«Ά
like, you hand her a file descriptor, she hands you back a shared memory registration. match made in heaven, honestly.
β¨ SYNOPSIS β¨
TEE_IOC_SHM_REGISTER_FD
that's it. that's the whole synopsis. she's lowkey minimal about it π
π DESCRIPTION π
so here's the tea π: this call returns a file descriptor on success, or < 0 on failure. that's the whole vibe check β positive fd or a negative number telling you it didn't slay.
the file descriptor she gives you back refers to the shared memory object in the kernel. and here's the part everyone asks about β yes, the supplied file descriptor can be closed if you don't need it for other purposes. she's not clingy. π
but bestie, listen π β the shared memory is freed when the descriptor is closed. so don't close that returned one unless you're actually done with the shared memory, because that's the whole lifecycle right there. no cap. π₯
π¦ SEE ALSO π¦
okay this is the iconic friend group, everyone shows up to the group chat π:
- Kernel file
./include/uapi/linux/tee.hβ the home base π 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)struct tee_ioctl_shm_register_fd_data(9)TEE_IOC_SHM_REGISTER(9)struct tee_ioctl_object_invoke_arg(9)
ngl that's a lot of friends but they all ate, every single one π
friendly reminder π«Ά this page lives under ./include/uapi/linux and the manual is dated October 2026. if you're citing her anywhere, that's the receipt. π§Ύ
and that's the whole page, bestie! π tysm for reading, she's from the Kernel API Manual, sourced from ./include/uapi/linux, dated October 2026 β now go register some shared memory and be the main character of your own ioctl call ππ
β¨
π¦ 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