getactive(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… getactive(9) β€” the Kernel API Manual glow-up

okay so real talk, this is getactive, a read handler for "ipe/policies/$name/active". yes bestie, that whole path. it's a kernel page, from the Kernel API Manual, and it's short and sweet and we're gonna eat it up πŸ’–


✨ SYNOPSIS ✨

ssize_t getactive (struct file *f , char __user *data , size_t len ,
loff_t *offset );

that's the whole signature, no cap. ssize_t return, four args, and every single one of them matters 🫢


🌸 ARGUMENTS 🌸

  • f β€” supplies a file structure representing the securityfs node. that's your entry point, bestie, the securityfs node in struct form ✨
  • data β€” supplies a buffer passed to the write syscall. yes, that's what the page says, we're not editing the source material πŸ’…
  • len β€” supplies the length of data. the size of the vibe, basically πŸŽ€
  • offset β€” unused. not me ignoring it. it is literally unused πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“: data will be populated with the 1 or 0 depending on if the corresponding policy is active. that's the whole bit. one for yes, zero for no, main character energy from a single byte πŸ‘‘

like... it's giving "am I active or not" and the answer is a single digit. iconic.


πŸ”₯ RETURN πŸ”₯

  • Length of buffer written β€” Success ✨ slay, we wrote something, that's the length of it
  • -ENOENT β€” Policy initializing/deleted 😭 so the policy is either still booting up or it's gone gone, no policy found

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr πŸ’œ

go read the whole squad, iykyk 🌈


heads up bestie: this page lives under ./security/ipe, dated October 2026, and it's getactive(9) all the way down. that's the sign-off, mwah πŸ’‹ πŸ§šβ€β™€οΈ
πŸ“¦ where this page comes from