selinux_netl...curity_reset(9)
β¨ selinux_netlbl_sk_security_reset(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's section 9, a kernel function page, and it's honestly a little cutie. let's get into it π«Ά
πΈ NAME πΈ
selinux_netlbl_sk_security_reset β reset the NetLabel fields β¨
π SYNOPSIS π
void selinux_netlbl_sk_security_reset (struct sk_security_struct *sksec
);
like, it returns void, so don't be out here expecting a return value, bestie π it just does the thing.
π¦ ARGUMENTS π¦
sksecβ thesk_security_struct, obvs π that's the thing getting its fields reset.
π DESCRIPTION π
so the vibe here is: you call this when the NetLabel state of a sk_security_struct needs to be reset. that's it, that's the whole function, and it ate π
heads up though β the caller is responsible for all the NetLabel sk_security_struct locking. all of it. not some of it, not "eh, close enough" β the caller. so lock it properly or don't come crying to me π
β SEE ALSO β
- Kernel file
./security/selinux/netlabel.cβ that's where the magic lives π§ selinux_netlbl_sidlookup_cached(9)selinux_netlbl_sock_genattr(9)selinux_netlbl_sock_getattr(9)selinux_netlbl_cache_invalidate(9)selinux_netlbl_err(9)selinux_netlbl_sk_security_free(9)selinux_netlbl_skbuff_getsid(9)selinux_netlbl_skbuff_setsid(9)selinux_netlbl_sctp_assoc_request(9)selinux_netlbl_inet_conn_request(9)selinux_netlbl_inet_csk_clone(9)selinux_netlbl_sctp_sk_clone(9)selinux_netlbl_socket_post_create(9)selinux_netlbl_sock_rcv_skb(9)selinux_netlbl_option(9)selinux_netlbl_socket_setsockopt(9)selinux_netlbl_socket_connect_helper(9)selinux_netlbl_socket_connect_locked(9)selinux_netlbl_socket_connect(9)
like, that's the whole netlabel friend group right there π go read them too, iykyk.
ngl the whole "caller handles the locking" line is the main character of this page β don't skip it π
okay that's the page!! mwah π this one came from ./security/selinux, dated October 2026, living in section 9 of the Kernel API Manual β and yes, the header up top and the footer down here both said selinux_netlbl_sk_security_reset(9) the whole time, iconic behavior honestly πβ¨π
π¦ 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