tee_shm_alloc_user_buf(9)
π§ tee_shm_alloc_user_buf(9) π§
okay so bestie, welcome to the Kernel API Manual page for tee_shm_alloc_user_buf(9) β yes, the name is a whole mouthful, but it's literally about allocating shared memory for user space. π
β¨ NAME β¨
tee_shm_alloc_user_buf β Allocate shared memory for user space
πΈ SYNOPSIS πΈ
struct tee_shm * tee_shm_alloc_user_buf (struct tee_context *ctx ,
size_t size );
π ARGUMENTS π
ctxβ Context that allocates the shared memory. (slay, that's the context doing the allocating)sizeβ Requested size of shared memory. (how big you want the shared-memory moment to be)
π¦ DESCRIPTION π¦
Okay so here's the tea: memory allocated as user space shared memory is automatically freed when the TEE file pointer is closed. no cap. π«Ά
The primary usage of this function is when the TEE driver doesn't support registering ordinary user space memory. That's the whole reason it exists, bestie. β¨
And yes β returns a pointer to 'struct tee_shm'. iconic return-value behavior, honestly. π
π SEE ALSO π
- Kernel file
./drivers/tee/tee_shm.c tee_shm_alloc_kernel_buf(9)tee_shm_alloc_priv_buf(9)tee_shm_alloc_dma_mem(9)tee_shm_register_user_buf(9)tee_shm_register_kernel_buf(9)tee_shm_get_fd(9)tee_shm_free(9)tee_shm_get_va(9)tee_shm_get_pa(9)tee_shm_get_from_id(9)tee_shm_put(9)
mwah π β source/version: ./drivers/tee, date: October 2026. now go be the main character of your own shared-memory allocation, bestie. π«Άβ¨
π¦ 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