update_policy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this page is update_policy(9), and yes, we're in the Kernel API Manual β€” hi, hello, welcome to the group chat πŸ’…

update_policy β€” Write handler for "ipe/policies/$name/update". That's the whole vibe fr fr.


πŸ“œ SYNOPSIS πŸ“œ

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

🧚 ARGUMENTS 🧚

  • f β€” Supplies a file structure representing the securityfs node. Basically it hands you the file struct for that securityfs node, periodt.
  • data β€” Supplies a buffer passed to the write syscall. It's the buffer that got passed to the write syscall, no cap.
  • len β€” Supplies the length of data. Literally how long the data is.
  • offset β€” unused. Not used. At all. Bestie, it's just sitting there 😭

πŸ’– DESCRIPTION πŸ’–

On success, this updates the policy represented by $name, in-place. That's it, that's the whole lore: success = policy gets updated right where it is, in-place. Slay ✨


πŸŽ€ RETURN πŸŽ€

  • Length of buffer written β€” Success πŸ‘‘
  • -EPERM β€” Insufficient permission
  • -ENOMEM β€” Out of memory (OOM)
  • -ENOENT β€” Policy was deleted while updating
  • -EINVAL β€” Policy name mismatch
  • -ESTALE β€” Policy version too old
bestie, those negative returns are the drama β€” read them carefully before you assume it worked πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./security/ipe/policy_fs.c struct ipefs_file(9), read_pkcs7(9), read_policy(9), read_name(9), read_version(9), setactive(9), getactive(9), delete_policy(9), ipe_del_policyfs_node(9), ipe_new_policyfs_node(9) β€” go read the whole friend group, iykyk 🌸


xoxo πŸ’– from the ./security/ipe source, October 2026 β€” mwah, periodt 🫢

πŸ“¦ where this page comes from