sel_ib_pkey_sid(9)
π 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 thesubnet_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 π
- Kernel file
./security/selinux/ibpkey.c sel_ib_pkey_hashfn(9)sel_ib_pkey_find(9)sel_ib_pkey_insert(9)sel_ib_pkey_sid_slow(9)sel_ib_pkey_flush(9)
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
- 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