ipe_new_policy(9)
π ipe_new_policy(9) π
okay so bestie, welcome to ipe_new_policy β it's a kernel API manual page (the manual itself is literally called Kernel API Manual, which is giving "I'm the whole syllabus" energy ngl). This function lives in the ./security/ipe corner of the kernel and it's the main character of allocating and parsing an ipe_policy structure. Let's get into it π«Ά
β¨ NAME β¨
ipe_new_policy β Allocate and parse an ipe_policy structure. That's it, that's the whole job description, and honestly it ate π
π¦ SYNOPSIS π¦
struct ipe_policy * ipe_new_policy (const char *text , size_t textlen ,
const char *pkcs7 , size_t pkcs7len );
Four arguments, one struct ipe_policy * coming back at you. Slay β¨
πΈ ARGUMENTS πΈ
textβ Supplies a pointer to the plain-text policy to parse. Like, the actual readable policy. Fresh out the group chat, no signature, just vibes.textlenβ Supplies the length oftext. Yes bestie, you gotta tell it how long it is, it's not gonna count for you πpkcs7β Supplies a pointer to a pkcs7-signed IPE policy. Fancy cryptographic signed version. Iconic behavior only π₯pkcs7lenβ Supplies the length ofpkcs7. Same deal astextlen, keep it exact.
π DESCRIPTION π
okay so here's the one rule of the whole page, and it's lowkey important:
text/textlen Should be NULL/0 if pkcs7/pkcs7len is set. No cap. Like, pick a lane β you're either doing plain text or you're doing the signed pkcs7 thing. Don't do both, it's giving messy π
π RETURN π
Here's the vibe check on what comes back at you:
- a pointer to the
ipe_policystructure β Success π (this is the good ending, we love to see it) -EBADMSGβ Policy is invalid π (the policy said something unhinged and got rejected)-ENOMEMβ Out of memory (OOM) π (the machine is full, no more room bestie)-ERANGEβ Policy version number overflow π (the version number got way too big, it's over-committing)-EINVALβ Policy version parsing error π« (couldn't even read the version, embarrassing)-ENOKEYβ Policy signing key not found π (where is the key. the key is missing. who took the key)-EKEYREJECTEDβ Policy signature verification failed β (the signature did NOT pass the vibe check, straight up rejected)
fr fr, every one of these error codes is a different flavor of "nope" β don't assume they're interchangeable, they each mean a specific thing π
π SEE ALSO π
Kernel file ./security/ipe/policy.c and its besties:
go read them, they're all part of the same squad π§
aaaand that's the page!! sign-off time: this one ships out of ./security/ipe in the October 2026 release, so like, future energy but make it kernel π¦β periodt β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms