get_vfs_caps_from_disk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

get_vfs_caps_from_disk(9) β€” Kernel API Manual, bestie edition ✨

NAME 🌸

get_vfs_caps_from_disk β€” retrieve vfs caps from disk, and yes this is the whole vibe πŸ’…


SYNOPSIS πŸ¦‹

int get_vfs_caps_from_disk (struct mnt_idmap *idmap , const struct
       dentry *dentry , struct cpu_vfs_cap_data *cpu_caps );

ARGUMENTS πŸŽ€

  • idmap β€” idmap of the mount the inode was found from. that’s the mount’s idmap, okay bestie?
  • dentry β€” dentry from which inode is retrieved. you hand over the dentry, and the inode gets retrieved from it
  • cpu_caps β€” vfs capabilities. this is where the vfs capabilities live

DESCRIPTION 🫢

Okay so this function extracts the on-exec-apply capability sets for an executable file. Iconic behavior, honestly. ✨

If the inode has been found through an idmapped mount, the idmap of the vfsmount must be passed through idmap. This function will then take care to map the inode according to idmap before checking permissions. the way it maps before checking permissions? slay. πŸ’…

On non-idmapped mounts, or if permission checking is to be performed on the raw inode, simply pass nop_mnt_idmap. Periodt. πŸŽ€


SEE ALSO πŸ‘‘

Kernel file ./security/commoncap.c β€” yes, that’s the source file. The SEE ALSO squad is literally right here, iykyk:


_signed off from ./security, dated October 2026 β€” stay caps-locked and hydrated, bestie πŸ’–πŸ§š_

πŸ“¦ where this page comes from