vfs_readlink(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to vfs_readlink(9) β€” yes that's a section 9 kernel page, we're in the deep end now and honestly? iconic. Let's get into it 🫢


✨ NAME ✨

vfs_readlink β€” literally just copies the body of a symlink into a userspace buffer. that's the whole vibe. no notes. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int vfs_readlink (struct dentry *dentry , char __user *buffer , int
buflen );

three args, one int coming back at you, slay πŸ’…


🌸 ARGUMENTS 🌸

  • dentry β€” the dentry you're asking to spill the symbolic link tea β˜• this is the one you want the link target from
  • buffer β€” user memory pointer, aka where the answer goes. it's __user, so mind your manners πŸ‘€
  • buflen β€” size of buffer. the actual how-much-room-you-got situation πŸ“

⭐ DESCRIPTION ⭐

so here's the thing, bestie β€” there are two whole things this function does NOT do, and they're lowkey the most important part:

  • It does not touch atime. that's up to the caller if necessary β€” like genuinely, if you need it updated, that's your problem, not hers πŸ™ˆ
  • It does not call the security hook. nope. not doing it. if you wanted that you're at the wrong function, no cap πŸ’€

that's literally it, she's a small function with big main character energy πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

the kernel file ./fs/namei.c says hi, and here is the entire group chat β€” every single one of these, in order, no skips:

like, that's the whole friend group, everybody showed up to the party πŸŽ‰


ngl if you skip the "does not touch atime" and "does not call security hook" lines you're gonna have a bad time β€” those aren't decoration, they're the whole personality πŸ’€

and that's the page!! 🌈 she's from ./fs, dated October 2026, and she's filed under vfs_readlink(9) β€” mwah, go read a symlink, bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from