security_inode_killpriv(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… security_inode_killpriv(9)

okay bestie, welcome to the Kernel API Manual side of the group chat β€” today’s main character is security_inode_killpriv(9), and she is literally here to handle one very specific cleanup moment. ✨


πŸ’– NAME

security_inode_killpriv β€” the setuid bit is removed, update LSM state. periodt.

✨ SYNOPSIS

int security_inode_killpriv (struct mnt_idmap *idmap , struct dentry *dentry );

πŸŽ€ ARGUMENTS

  • idmap β€” idmap of the mount. yes, the mount’s idmap, exactly.
  • dentry β€” associated dentry. the dentry in question, bestie.

πŸ¦‹ DESCRIPTION

So the dentry’s setuid bit is being removed. When that happens, this hook is where similar security labels get removed too. 🫢

It’s called with dentry->d_inode->i_mutex held β€” that part is important, iykyk.

πŸ’… RETURN

Returns 0 on success. If an error is returned, then the operation causing setuid bit removal is failed. 😭 like, it does not go through.

🌈 SEE ALSO

Kernel file ./security/security.c is also on the list, and here’s the rest of the squad in original order β€” no gatekeeping, every single one: πŸ‘‘


okay that’s the tea β˜• this page comes from ./security, dated October 2026, and it’s literally security_inode_killpriv(9) β€” bye bestie πŸ’–

πŸ“¦ where this page comes from