sysvipc_find_ipc(9)
π sysvipc_find_ipc β like, the Kernel API Manual page you actually wanna read π
okay so bestie, welcome to sysvipc_find_ipc(9) from the Kernel API Manual β we're in the kernel's System V IPC corner and this little function is doing the find-and-lock thing for you. no cap, it's lowkey iconic β¨
π NAME π
sysvipc_find_ipc β find and lock the ipc structure based on seq pos π
π¦ SYNOPSIS π¦
struct kern_ipc_perm * sysvipc_find_ipc (struct ipc_ids *ids , loff_t *pos );
like, that's the whole vibe. it hands you back a struct kern_ipc_perm *, and it wants two things: an ids and a pos. slay.
πΈ ARGUMENTS πΈ
idsβ the ipc identifier set π«Ά this is the collection we're digging through.posβ the expected position β this is where we think the thing is (or where we're starting from, bestie).
β¨ DESCRIPTION β¨
okay so here's the tea π β the function finds an ipc structure, based on the sequence file position pos. that's literally its whole main character job.
if there is no ipc structure at position pos, then the successor is selected π (yes, the next one gets promoted, we love a succession arc).
if a structure is found, then it is locked β and not just one lock, bestie, both rcu_read_lock and ipc_lock_object π₯ β and pos is set to the position needed to locate the found ipc structure. so pos gets updated to where the thing actually lives. very helpful of it ngl.
if nothing is found (i.e. EOF π), pos is not modified. hands off. no touchy. π
the function returns the found ipc structure, or NULL at EOF. periodt. π
π«Ά friendly reminder: don't forget it's locking bothrcu_read_lockandipc_lock_objectwhen it finds something β that's the whole point of the lock in the name, bestie.
π SEE ALSO π
kernel file ./ipc/util.c (that's where the magic lives π§), plus the whole friend group:
ipc_init(9)ipc_init_ids(9)ipc_init_proc_interface(9)ipc_findkey(9)ipc_addid(9)ipcget_new(9)ipc_check_perms(9)ipcget_public(9)ipc_kht_remove(9)ipc_search_maxidx(9)ipc_rmid(9)ipc_set_key_private(9)ipcperms(9)kernel_to_ipc64_perm(9)ipc64_perm_to_ipc_perm(9)ipc_obtain_object_idr(9)ipc_obtain_object_check(9)ipcget(9)ipc_update_perm(9)ipcctl_obtain_check(9)ipc_parse_version(9)
π and that's the page, bestie! this one came from the ./ipc source, version/date stamp October 2026, and it's filed under sysvipc_find_ipc(9) β go forth and find those ipc structures, you've got this ππ¦π
π¦ 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