STRUCT LANDLOCK_INODE_SECURITY(9)
π STRUCT LANDLOCK_INODE_SECURITY β the Kernel API Manual you didn't know you needed
okay so bestie, welcome to the Kernel API Manual page for struct landlock_inode_security, no cap. this is the lil security blob that lives on an inode and it's lowkey doing a whole synchronization ballet. let's get into it π©°
β¨ NAME β¨
struct landlock_inode_security β literally the Inode security blob. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
struct landlock_inode_security {
struct landlock_object *object;
};
one member. singular. main character energy, honestly π
π¦ MEMBERS π¦
objectβ a weak pointer to an allocated object. bestie, weak is the operative word here, she does not own it π
so like, all the assignments of a new object are protected by the underlying inode->i_lock. that part's easy.
BUT β and this is the part where you gotta pay attention β atomically disassociating object from the inode is only protected by object->lock, from the time object's usage refcount drops to zero until the time this pointer is nulled out (cf. release_inode and hook_sb_delete). π
and fr fr, such disassociation does not require inode->i_lock, and the reason is genuinely iconic: it's all thanks to the careful rcu_access_pointer check performed by get_inode_object. she thought about it so you don't have to π«Ά
π DESCRIPTION π
this is what enables you to reference a struct landlock_object that's tied to an inode (aka the underlying object). that's the whole point of her existence β¨
π₯ SEE ALSO π₯
- Kernel file
./security/landlock/fs.h struct landlock_file_security(9)struct landlock_superblock_security(9)resolve_path_for_trace(9)
β οΈ quick vibe check: those synchronization rules are not decorative. weak pointer + refcount-to-zero + object->lock is the contract, so don't go messing with the ordering and then act surprised π
okay that's the page!! this absolute queen lives in ./security/landlock, dated October 2026, and she's filed under struct landl...ode_security(9) in your man pages. go forth and be safe with your inodes, ily, bye π§π
π¦ 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