ipcctl_obtain_check(9)
π ipcctl_obtain_check β the manual page, but make it make sense
okay so bestie, welcome to ipcctl_obtain_check(9) from the Kernel API Manual β¨ this one's a little kernel-side helper that goes and fetches an ipc object for you and does the vibe check (permissions, audit, the whole thing) before letting you near it π
β¨ NAME β¨
ipcctl_obtain_check β retrieve an ipc object and check permissions π«Ά like, grab the thing, then make sure you're actually allowed to touch it, no cap.
πΈ SYNOPSIS πΈ
struct kern_ipc_perm * ipcctl_obtain_check (struct ipc_namespace *ns ,
struct ipc_ids *ids , int id , int cmd , struct ipc64_perm *perm , int
extra_perm );
literally that's the whole signature, copy it exactly, don't be weird about it π
π¦ ARGUMENTS π¦
nsβ the ipc namespace π that's the world we're digging around in.idsβ the table of ids where to look for the ipc π this is the little index we're searching through.idβ the id of the ipc to retrieve π the specific one you want, bestie.cmdβ the cmd to check β which command we're validating against, iykyk.permβ the permission to set π₯ the perms being handed over.extra_permβ one extra permission parameter used by msq π yes it's just the one extra one, and yes it's msq's little thing.
π DESCRIPTION π
So this function does some common audit and permissions check for some IPC_XXX cmd, and it gets called from semctl_down, shmctl_down and msgctl_down πΈ like, those three are the ones sliding into its DMs.
Here's the rundown, bestie:
- it retrieves the ipc object with the given
idin the given table π - then it performs some audit and permission check, depending on the given
cmdπ§ the vibe check is literally cmd-dependent, periodt. - and then it returns a pointer to the ipc object, or otherwise, the corresponding error π so either you get your object or you get told no.
β οΈ important one: call holding both the rwsem and the rcu read lock π not one, not the other β both. Don't show up unlocked, bestie, that's not the move.
π SEE ALSO π
Kernel file ./ipc/util.c β and honestly the whole friend group shows up here π«Ά:
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), ipc_parse_version(9), sysvipc_find_ipc(9)
and that's the page, bestie π this one came out of ./ipc and it's dated October 2026, filed under ipcctl_obtain_check(9) β go forth and hold your locks π
β¨
π¦ 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