ecryptfs_encrypt_page(9)
πΈ 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 π
- Kernel file
./fs/ecryptfs/crypto.c ecryptfs_from_hex(9)ecryptfs_derive_iv(9)ecryptfs_init_crypt_stat(9)ecryptfs_destroy_crypt_stat(9)virt_to_scatterlist(9)crypt_scatterlist(9)crypt_extent(9)ecryptfs_decrypt_page(9)ecryptfs_init_crypt_ctx(9)ecryptfs_copy_mount_wide_flags_to_inode_flags(9)ecryptfs_set_default_crypt_stat_vals(9)ecryptfs_new_file_context(9)ecryptfs_validate_marker(9)ecryptfs_process_flags(9)write_ecryptfs_marker(9)ecryptfs_code_for_cipher_string(9)ecryptfs_cipher_code_to_string(9)ecryptfs_write_headers_virt(9)ecryptfs_write_metadata(9)set_default_header_data(9)ecryptfs_read_headers_virt(9)ecryptfs_read_xattr_region(9)ecryptfs_process_key_cipher(9)ecryptfs_destroy_crypto(9)ecryptfs_tfm_exists(9)ecryptfs_get_tfm_and_mutex_for_cipher_name(9)ecryptfs_encode_for_filename(9)ecryptfs_decode_from_filename(9)ecryptfs_encrypt_and_encode_filename(9)ecryptfs_decode_and_decrypt_filename(9)
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
- 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