ipe_update_policy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ipe_update_policy β€” Kernel API Manual, bestie edition πŸŽ€

Okay so real talk, this page is from the ipe_update_policy(9) fam β€” kernel API manual energy, very "I live in ./security/ipe and I know things" of it. Let's get into it ✨


✨ NAME ✨

ipe_update_policy β€” parse a new policy and replace old with it. That's it, that's the whole vibe: out with the old, in with the new, no cap πŸ”₯


🌸 SYNOPSIS 🌸

int ipe_update_policy (struct inode *root , const char *text , size_t
textlen , const char *pkcs7 , size_t pkcs7len );

Literally the whole signature, character for character, because we do not mess with the code around here 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • root β€” Supplies a pointer to the securityfs inode saved the policy. (Yes, that's the original wording, she's a little quirky but she's ours πŸ’–)
  • text β€” Supplies a pointer to the plain text policy. The words, the tea, the whole narrative β˜•
  • textlen β€” Supplies the length of text. Gotta know how much of the text is actually text, y'know?
  • pkcs7 β€” Supplies a pointer to a buffer containing a pkcs7 message. Signed, sealed, delivered πŸ“¨
  • pkcs7len β€” Supplies the length of pkcs7len. (Yes bestie, the manpage literally says the length of pkcs7len β€” we are quoting it exactly and not touching it πŸ™ˆ)

πŸ’œ DESCRIPTION πŸ’œ

text/textlen is mutually exclusive with pkcs7/pkcs7len β€” see ipe_new_policy. So like, pick a lane, babe. You get the plain-text route or the pkcs7 route, not both. It's giving "you can't sit with both tables at lunch" πŸ’…


πŸ‘‘ CONTEXT πŸ‘‘

Requires root->i_rwsem to be held. So hold the lock before you come through, fr fr β€” this is not a "walk in whenever" situation πŸ”’


⭐ RETURN ⭐

  • 0 β€” Success πŸŽ‰ iconic, slay, we love a zero
  • -ENOENT β€” Policy was deleted while updating 😭 she ghosted mid-conversation
  • -EINVAL β€” Policy name mismatch πŸ’€ wrong name, wrong person, block and move on
  • -ESTALE β€” Policy version too old πŸ§“ bringing 2019 energy to a 2026 function, respectfully

🌈 SEE ALSO 🌈

Kernel file ./security/ipe/policy.c β€” and its little friends: ver_to_u64(9), ipe_free_policy(9), ipe_new_policy(9), ipe_set_active_pol(9). Go read them, iykyk πŸ¦‹


Heads up bestie: every flag, value, path and error code above is verbatim from the original page. The personality is new. The facts are not. Periodt πŸ’…

And that's the whole page! πŸŽ€ Big kisses from the ./security/ipe directory, dated October 2026 β€” go forth and update that policy, main character πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from