avc_insert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ avc_insert(9) β€” the kernel API manual, bestie edition ✨

okay so real talk, this is avc_insert from the avc_insert(9) Kernel API Manual, and it's genuinely so important β€” it's the glow-up moment where an access decision finally gets to live in the cache. let's get into it πŸ’…


🌸 NAME 🌸

avc_insert β€” insert an AVC entry. that's it, that's the whole vibe. it puts a thing in the cache, no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void avc_insert (u32 ssid , u32 tsid , u16 tclass , struct av_decision
*avd , struct avc_xperms_node *xp_node );

bestie it returns void, so literally nothing comes back. it just does the thing and dips. main character energy fr fr πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • ssid β€” the source security identifier. who's doing the thing πŸ‘€
  • tsid β€” the target security identifier. who's having the thing done to them πŸ’€
  • tclass β€” the target security class. the category the target belongs to, yk?
  • avd β€” the resulting av decision. this is the ✨verdict✨ we're working with.
  • xp_node β€” the resulting extended permissions. the extra little sprinkles on top 🌈

πŸ”₯ DESCRIPTION πŸ”₯

so what this does is insert an AVC entry for the SID pair (ssid, tsid) and class tclass β€” like, it's literally registering this combo into the cache 🫢

the access vectors and the sequence number are normally provided by the security server in response to a security_compute_av call β€” that's the usual plug, iykyk 🧚

then here's the actual vibe check: if the sequence number avd->seqno is not less than the latest revocation notification, then (and only then!) the function copies the access vectors into a cache entry. slay. πŸŽ€

no cap though β€” that condition is the whole gate. if the seqno is less than the latest revocation notification, nothing gets copied. it's giving ✨conditional✨ and honestly? iconic.

⭐ SEE ALSO ⭐

kernel file ./security/selinux/avc.c β€” and the whole friend group, honestly:

like the entire avc entourage, we love a supportive squad πŸ’œ


and that's the page!! brought to you by ./security/selinux, dated October 2026, signed off with a very cute avc_insert(9) β€” go forth and insert those entries, bestie πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from