sel_ib_pkey_sid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sel_ib_pkey_sid(9) β€” the Kernel API Manual, bestie edition ✨

okay so this is a page from the Kernel API Manual and it's about sel_ib_pkey_sid, and honestly? it's a little baddie of a function that just wants to find you a SID. let's get into it 🫢


✨ NAME ✨

sel_ib_pkey_sid β€” Lookup the SID of a PKEY πŸ”

like, it goes and finds the SID for a PKEY. that's the whole vibe. no cap.


🌸 SYNOPSIS 🌸

int sel_ib_pkey_sid (u64 subnet_prefix , u16 pkey_num , u32 *sid );

that's the signature, character for character, don't @ me. she takes a u64, a u16 and a u32 *, and she gives you back an int πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • subnet_prefix β€” literally the subnet_prefix. yes, the description is the same as the name, and honestly? iconic minimalism. she said "the name says it all" and left πŸ’…
  • pkey_num β€” the pkey number πŸŽ€
  • sid β€” the pkey SID. that's the pointer where the SID comes out ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this function determines the SID of a PKEY using the fastest method possible. like, she is not wasting your time, she is not doing side quests, she is speedrunning this πŸƒβ€β™€οΈπŸ’¨

first, the pkey table is queried. that's the first stop on the itinerary.

but if an entry can't be found, then the policy is queried, and the result is added to the table so future queries get that sweet, sweet speedup πŸ”₯ literally caching her own glow-up.

and the returns? here's the vibe check:

Returns zero on success, and negative values on failure. so like, 0 = slay, anything negative = something went wrong bestie 😭

🌈 SEE ALSO 🌈

the whole friend group fr fr β€” go read their pages too, iykyk πŸ’œ


and that's the page!! mwah πŸ’‹ this lil manpage came from ./security/selinux and it's dated October 2026, so mark your calendars, bestie πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from