ecryptfs_encrypt_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 ecryptfs_encrypt_page(9) 🌸

okay bestie, welcome to the kernel API manual, eCryptfs edition πŸ’… this one's short and sweet but she's important, so pay attention.


✨ NAME ✨

ecryptfs_encrypt_page β€”

so like… the description part after the dash is literally empty in the source πŸ™ˆ no cap, there's nothing there. She's a mystery. But don't worry, the rest of the page has you covered 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int ecryptfs_encrypt_page (struct folio *folio );

that's it, that's the whole vibe check. one folio, one int back. iconic behavior honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio, mapped from the eCryptfs inode for the file πŸ—‚οΈ she's holding the decrypted content that needs to get encrypted β€” and heads up, it's encrypted to a temporary page, not in place (so we're not overwriting the original in the moment, okay?? we're classy) β€” and then written out to the lower file. slay.

πŸ’– DESCRIPTION πŸ’–

so the whole job here is: encrypt an eCryptfs page πŸ” and it's done on a per-extent basis. ngl that detail matters.

and here's the part where you gotta listen β€” eCryptfs pages can straddle the lower pages 😭 like, imagine the scenario:

  • the file got created on a machine with an 8K page size, which gives you an 8K header,
  • then that file gets copied onto a host with a 32K page size,
  • so now when you read page 0 of the eCryptfs file, you're gonna read and decrypt 24K of page 0 of the lower file, and then read and decrypt 8K of page 1 of the lower file πŸŒ€

like… she spans multiple pages, she contains multitudes, she's giving main character energy across page boundaries πŸ’« the way that it just keeps going into the next page, honestly obsessed.

πŸ’€ Return value tea: returns zero on success; negative on error. that's the whole contract bestie, don't forget it.

🌈 SEE ALSO 🌈

that's a whole friend group right there, fr fr 🫢 go say hi to all of them.


aaand that's the page!! ✨ shoutout to /fs/ecryptfs for bringing us this absolute banger, dated October 2026, filed under ecryptfs_encrypt_page(9) πŸŽ€ mwah, go encrypt something, ily bye πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from