ipc_check_perms(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ipc_check_perms β€” check security and permissions for an ipc object

okay so bestie, this is a page from the Kernel API Manual (yes, the kernel has lore too) and it's literally about double-checking that you're allowed to touch an ipc object. security girl summer πŸŽ€


✨ SYNOPSIS ✨

int ipc_check_perms (struct ipc_namespace *ns , struct kern_ipc_perm
*ipcp , const struct ipc_ops *ops , struct ipc_params *params );

like, that's the whole vibe. one function, four args, returns an int. slay.


🫢 ARGUMENTS 🫢

  • ns β€” the ipc namespace, bestie. it's giving "which world are we in".
  • ipcp β€” the ipc permission set. this is the whole receipts folder for who's allowed what πŸ‘‘
  • ops β€” the actual security routine to call. like, the real one doing the work, we're just the messenger πŸ’…
  • params β€” its parameters. you know, the little bag of stuff ops needs. πŸŽ€

🌸 DESCRIPTION 🌸

so here's the tea: this routine gets called by sys_msgget, sys_semget and sys_shmget β€” but only when the key is not IPC_PRIVATE and that key already exists in the ds IDR. like it's the "oh you think you know this object already? prove it" checkpoint πŸ”₯

On success, the ipc id is returned. periodt. that's the win condition ✨

and just so we're clear: it is called with ipc_ids.rwsem and ipcp->lock held. do not show up without your locks, that's not the vibe 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./ipc/util.c β€” and honestly the whole friend group:


okay that's the whole page!! mwah πŸ’– this one lives in ./ipc and it's dated October 2026, so like… future icon behavior tbh 🌈⭐ go check your permissions bestie, iykyk πŸ’œ

πŸ“¦ where this page comes from