smack_from_netlbl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smack_from_netlbl(9) β€” Kernel API Manual, but make it make sense

okay so bestie, welcome to the smack_from_netlbl page πŸ’– this is a kernel API manpage (yes, from the Kernel API Manual, we're fancy) and it's literally just vibes about pulling a Smack label out of IP options. let's get into it, no cap.


✨ NAME ✨

smack_from_netlbl β€” Smack data from the IP options in an skb πŸŽ€

like, the whole personality of this function is "find the Smack data lurking in the IP options of a socket buffer." that's it. that's the girl.


🌸 SYNOPSIS 🌸

struct smack_known * smack_from_netlbl (const struct sock *sk , u16 family , struct sk_buff *skb );

read it slowly, she's not complicated 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sk β€” the socket the data came in on, aka where it all started, main character energy fr
  • family β€” the address family πŸ‘‘
  • skb β€” the packet itself, the little guy we're inspecting

πŸ’œ DESCRIPTION πŸ’œ

so what does she do? she finds the Smack label in the IP options ✨ and if that label hasn't already been added to the netlabel cache? she adds it right there. dropping it in herself, unbothered.

she returns the smack_known of the IP options β€” or NULL if that won't work 😭 (yes, NULL is a real possible answer, don't come for her).

ngl this one's short and sweet. the whole function is basically "look in the IP options, cache the label if it's new, hand back the smack_known or NULL." periodt.

🌈 SEE ALSO 🌈

okay this list is genuinely iconic, she's LONG, and we are not skipping a single one β€” everything lives in the kernel file ./security/smack/smack_lsm.c, and every single entry below is (9) because we're in kernel-doc land, and we're listing all 137 (yes, i counted, bestie) πŸ’€πŸ«Ά

like… the way that list just goes πŸ”₯ every one of those cuties is in the same kernel file, iykyk. go read them, bestie, they're all right there waiting for you πŸ’–


and that's the whole page, angel 🧚 source is ./security/smack, dated October 2026, and honestly? iconic of her. slay, go read some LSM source, ily, bye πŸŽ€πŸ’…

πŸ“¦ where this page comes from