STRUCT LANDLOCK_RULES(9)
π struct landlock_rules(9) β from the Kernel API Manual, bestie π
okay so this is a page from the Kernel API Manual, and it's literally all about struct landlock_rules β aka the red-black tree storage situation for Landlock rules. iykyk π³β¨
πΈ NAME πΈ
struct landlock_rules β the red-black tree storage for Landlock rules, no cap. they hold the trees, that's the whole vibe π«Ά
π SYNOPSIS π
here's the struct verbatim, don't touch a single character bestie:
struct landlock_rules {
struct rb_root root_inode;
#if IS_ENABLED(CONFIG_INET);
struct rb_root root_net_port;
#endif ;
u32 num_rules;
};
π¦ Members π¦
root_inodeβ root of a red-black tree that's holdingstruct landlock_rulenodes with an inode object. and listen: it's immutable for domains. like, not changing. periodt πroot_net_portβ root of a red-black tree holdingstruct landlock_rulenodes with network port. also immutable for domains. same energy πnum_rulesβ the number of non-overlapping rules in this tree storage (i.e. not for the same object). it's giving "count carefully" π
β¨ Description β¨
so what does this thing actually do? it holds the rule trees that are shared by both rulesets and domains. that's it, that's the whole job β main character energy honestly π
π SEE ALSO π
go look at the kernel file ./security/landlock/ruleset.h, plus all these iconic friends:
struct landlock_layer(9)union landlock_key(9)enum landlock_key_type(9)struct landlock_id(9)struct landlock_rule(9)struct landlock_ruleset(9)landlock_get_rule_root(9)
π§ source lives at ./security/landlock, and this page is dated October 2026. mwah, go read the other landlock pages bestie ππ
struct landlock_rules(9) β that's a wrap, slay πΈ
π¦ 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