rdtgroup_kn_mode_restrict(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rdtgroup_kn_mode_restrict β€” a Kernel API Manual moment (yes, the Kernel API Manual, bestie, we're fancy)

okay so picture this: you're deep in the resctrl filesystem, right, and there's this one named file that is simply not relevant to the state the system is in. so we lock it down. that's the whole vibe. it's giving "you don't need to see this" energy and honestly? iconic.


✨ NAME ✨

rdtgroup_kn_mode_restrict β€” restrict user access to a named resctrl file πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int rdtgroup_kn_mode_restrict (struct rdtgroup *r , const char *name );

like, that's it. that's the function. two args, one int coming back at you. slay. ✨


🌸 ARGUMENTS 🌸

  • r β€” the resource group this file is associated with. your home base, your main character, the struct rdtgroup * in question. πŸ‘‘
  • name β€” name of the file. literally just the name. that's the string. πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so what actually happens? the permissions of the named resctrl file, directory, or link get modified so that read, write, or execute are not allowed by any user. all three. nobody. not even a little peek. 🚫✨

⚠️ WARNING β€” and bestie, please read this one, ok? This function is intended to communicate to the user that the resctrl file has been locked down β€” that it is not relevant to the particular state the system finds itself in. It should not be relied on to protect from user access, because after the file's permissions are restricted the user can still change the permissions using chmod from the command line. 😭 so it's a vibe check, not a vault. do not build your whole security model on it, fr fr. πŸ’€

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • <0 on failure 😭

that's it. that's the return. no cap.


🧚 SEE ALSO 🧚

the kernel file ./fs/resctrl/rdtgroup.c and honestly this whole little friend group right here:

iykyk 🫢


🌈 okay that's the whole page!! source: ./fs/resctrl, dated October 2026, living in the Kernel API Manual β€” mwah, sending you kisses, go forth and lock down those files (but like, remember the chmod thing πŸ’€) πŸ’…πŸ’–πŸŽ€

πŸ“¦ where this page comes from