smk_net4addr_insert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– smk_net4addr_insert(9) β€” like, the Kernel API Manual edition, bestie πŸŽ€

okay so real talk, this whole page lives in the Kernel API Manual, and the function we're stanning today is smk_net4addr_insert. she's a little helper with one job and she does it flawlessly, no notes πŸ’…


✨ NAME ✨

smk_net4addr_insert β€” insert a new entry into the net4addrs list πŸ¦‹


🌸 SYNOPSIS 🌸

void smk_net4addr_insert (struct smk_net4addr *new );

πŸŽ€ ARGUMENTS πŸŽ€

  • new β€” the netlabel you're inserting. that's her. that's the whole argument, bestie, she's the main character πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: this helper takes your netlabel and inserts it into the smack_net4addrs list β€” but not just anywhere, she's sorted. sorted by netmask length, longest to smallest, so the beefiest mask sits up top and the tiny ones chill at the bottom. it's giving organized queen energy πŸ™ˆβœ¨

and the tea? the whole thing is locked by smk_net4addr_lock in smk_write_net4addr. so like, don't just roll up and start poking at it without going through the proper channels, okay? respect the lock πŸ”₯


🌈 SEE ALSO 🌈

literally the entire friend group, fr fr β€” caught hanging out in the kernel file ./security/smack/smackfs.c: smk_netlabel_audit_set(9), smk_set_access(9), smk_perm_from_str(9), smk_fill_rule(9), smk_parse_rule(9), smk_parse_long_rule(9), smk_write_rules_list(9), smk_open_load(9), smk_write_load(9), smk_cipso_doi(9), smk_unlbl_ambient(9), smk_open_cipso(9), smk_set_cipso(9), smk_write_cipso(9), smk_open_cipso2(9), smk_write_cipso2(9), smk_open_net4addr(9), smk_write_net4addr(9), smk_open_net6addr(9), smk_net6addr_insert(9), smk_write_net6addr(9), smk_read_doi(9), smk_write_doi(9), smk_read_cipso_auto_level(9), smk_write_cipso_auto_level(9), smk_read_ambient(9), smk_write_ambient(9), smk_list_swap_rcu(9), smk_parse_label_list(9), smk_destroy_label_list(9), smk_write_onlycap(9), smk_read_unconfined(9), smk_write_unconfined(9), smk_read_logging(9), smk_write_logging(9), smk_open_load_self(9), smk_write_load_self(9), smk_user_access(9), smk_write_access(9), smk_open_load2(9), smk_write_load2(9), smk_open_load_self2(9), smk_write_load_self2(9), smk_write_access2(9), smk_write_revoke_subj(9), smk_init_sysfs(9), smk_write_change_rule(9), smk_read_syslog(9), smk_write_syslog(9), smk_open_relabel_self(9), smk_write_relabel_self(9), smk_read_ptrace(9), smk_write_ptrace(9), smk_fill_super(9), smk_get_tree(9), smk_init_fs_context(9), init_smk_fs(9).

like I said. the whole group chat. πŸ’€πŸ’–


ngl bestie, that's the entire page β€” she's short, she's sweet, she inserts things in order. periodt. 🌟

and that's a wrap on this little kernel moment 🫢 this one ships outta ./security/smack, dated October 2026 β€” write it in your notes, mwah πŸ’‹πŸ“

πŸ“¦ where this page comes from