tee_shm_get_va(9)
π tee_shm_get_va β a kernel API manual moment
okay bestie, welcome to the Kernel API Manual entry for tee_shm_get_va(9) β yes that (9) is the section number, we're in the deep kernel lore now π§β¨
β¨ NAME β¨
tee_shm_get_va β get the virtual address of a shared memory, plus an offset π
πΈ SYNOPSIS πΈ
void * tee_shm_get_va (struct tee_shm *shm , size_t offs );
like, that's the whole vibe. two args, one pointer out. simple. iconic. π
π¦ ARGUMENTS π¦
shmβ the shared memory handle π (your main character struct, fr)offsβ offset from the start of this shared memory. and here's the tea: it returns the virtual address of the shared memory +offsifoffsis within the bounds of this shared memory, else anERR_PTRπ so likeβ¦ bounds check your girl, or you get an error pointer back. no cap.
π₯ SEE ALSO π₯
the whole friend group, in the kernel file ./include/linux/tee_drv.h:
struct tee_context(9)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_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)
ngl bestie, if you got here from a NULL-ish looking pointer, checkoffsagainst the size first β anERR_PTRis not a real address, mwah π
and that's the page, periodt π«Ά this one lives under source path ./include/linux, dated October 2026, and honestly? she ate. go read your TEE headers, iykyk ππβ
π¦ 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