selinux_skb_peerlbl_sid(9)
π selinux_skb_peerlbl_sid(9) π
okay so this is a page straight out of the Kernel API Manual, bestie β buckle up π
β¨ NAME β¨
selinux_skb_peerlbl_sid β literally the function that figures out the peer label of a packet π¦
πΈ SYNOPSIS πΈ
int selinux_skb_peerlbl_sid (struct sk_buff *skb , u16 family , u32 *sid );
π ARGUMENTS π
skbβ the packet itself, the main character of this whole situation πfamilyβ the protocol family, iykyksidβ the packet's peer label SID, the thing we're here to determine π
π DESCRIPTION π
so what this does is it checks all the various different forms of network peer labeling and determines the peer label/SID for the packet π«Ά and ngl, most of the actual magic happens somewhere else β it's all going down in the security server function security_net_peersid_cmp, not me, I'm just the messenger β¨
the function returns zero if the value in sid is valid (although heads up, it may be SECSID_NULL π), or -EACCES if sid is invalid because of inconsistencies with the different peer labels. fr fr, that's the vibe check and sometimes it does not pass π
π¦ SEE ALSO π¦
Kernel file ./security/selinux/hooks.c, plus the whole friend group:
selinux_secmark_enabled(9)selinux_peerlbl_enabled(9)task_avdcache_reset(9)task_avdcache_search(9)task_avdcache_update(9)selinux_inode_permission(9)selinux_inode_xattr_skipcap(9)selinux_mmap_backing_file(9)selinux_conn_sid(9)selinux_getselfattr(9)selinux_uring_override_creds(9)selinux_uring_sqpoll(9)selinux_uring_cmd(9)selinux_uring_allowed(9)
and that's the whole page, babe π it lives in ./security/selinux, it's dated October 2026, and honestly? iconic. slay, go read your kernel source, periodt π§βπ
π¦ 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