ecryptfs_decrypt_page(9)
π ecryptfs_decrypt_page π
Okay bestie, welcome to the ecryptfs_decrypt_page(9) page from the Kernel API Manual β this is the crypt girly that un-scrambles your eCryptfs pages, and honestly? She's doing the most. Let's get into it β¨
πΈ NAME πΈ
ecryptfs_decrypt_page β
(no cap, that's literally the whole thing, the original says nothing else here and I refuse to invent lore π)
π SYNOPSIS π
int ecryptfs_decrypt_page (struct folio *folio );
π¦ ARGUMENTS π¦
folioβ a Folio that's been mapped from the eCryptfs inode for the file π . Anything read and decrypted from the lower file gets written straight into this page β so this is the destination, the main character, the place where the good stuff lands π«Ά
π DESCRIPTION π
So like, this function decrypts an eCryptfs page π. And the way it does that is on a per-extent basis β not the whole page at once, an extent at a time, periodt.
Now the important vibe check here: eCryptfs pages can totally straddle the lower pages π β like they don't line up neatly, and here's the iconic example the page gives us:
Say the file was created on a machine with an8Kpage size (which means you get an8Kheader). Then the file gets copied onto a host with a32Kpage size. Now when you're reading page 0 of the eCryptfs file,24Kof page 0 of the lower file gets read and decrypted, and then8Kof page 1 of the lower file gets read and decrypted. Two pages, one read, it's giving teamwork π
Returns zero on success; negative on error β (so like, check the return value, bestie, fr fr π)
π« SEE ALSO π«
Kernel file ./fs/ecryptfs/crypto.c β and then the whole group chat, alphabetically-by-nothing but here they all are, every single one π₯:
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_encrypt_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 the whole page, you ate that β¨ This little gem lives in ./fs/ecryptfs, it's dated October 2026, and it answers to the name ecryptfs_decrypt_page(9) β mwah ππ
π¦ 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