avc_insert(9)
β¨ 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:
avc_init(9)avc_lookup(9)avc_audit_pre_callback(9)avc_audit_post_callback(9)avc_add_callback(9)avc_update_node(9)avc_flush(9)avc_ss_reset(9)avc_compute_av(9)avc_perm_nonode(9)avc_has_perm_noaudit(9)avc_has_perm(9)
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
- 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