smk_net4addr_insert(9)
π 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
- 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