new_policy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

new_policy(9) πŸ’…βœ¨

okay so bestie, welcome to the Kernel API Manual page for new_policy(9) β€” yes, kernel-space, 9-section energy. πŸ’– This one is the write handler for the securityfs node, "ipe/new_policy". no cap.


πŸŽ€ NAME

new_policy β€” the write handler for the securityfs node, "ipe/new_policy". literally its whole job. πŸ’…

✨ SYNOPSIS

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

πŸ¦‹ ARGUMENTS

  • f β€” supplies a file structure representing the securityfs node.
  • data β€” supplies a buffer passed to the write syscall.
  • len β€” supplies the length of data.
  • offset β€” unused. πŸ™ˆ

🌈 RETURN

okay so the return value is lowkey the whole plot. here's every outcome, fr fr:

  • Length of buffer written β€” Success. slay. βœ…
  • -EPERM β€” Insufficient permission.
  • -ENOMEM β€” Out of memory (OOM).
  • -EBADMSG β€” Policy is invalid.
  • -ERANGE β€” Policy version number overflow.
  • -EINVAL β€” Policy version parsing error.
  • -EEXIST β€” Same name policy already deployed.
  • -ENOKEY β€” Policy signing key not found.
  • -EKEYREJECTED β€” Policy signature verification failed.

πŸ‘‘ SEE ALSO

Kernel file ./security/ipe/fs.c β€” setaudit(9), getaudit(9), setenforce(9), getenforce(9), ipe_init_securityfs(9). go read those too, bestie. πŸ’œ


Signed off with all the receipts: source/version ./security/ipe, date October 2026, manual new_policy(9). mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from