ecryptfs_tfm_exists(9)
β¨ ecryptfs_tfm_exists β¨
okay so bestie, welcome to the Kernel API Manual page for ecryptfs_tfm_exists(9) β yes that (9) is the section number, we're in kernel-land now, buckle up π
π NAME π
ecryptfs_tfm_exists β literally just goes looking for an existing tfm for cipher_name, that's the whole job π΅οΈββοΈ
πΈ SYNOPSIS πΈ
int ecryptfs_tfm_exists (char *cipher_name , struct ecryptfs_key_tfm
**key_tfm );
π¦ ARGUMENTS π¦
cipher_nameβ the name of the cipher you're hunting for, like the name-name. this is your search query bestie πkey_tfmβ gets set to the matching tfm if one is found. it's the output slot, the "here's your answer" spot π¬
π DESCRIPTION π
so what it does: it searches the cache for a key_tfm that matches cipher_name. that's it. that's the function. no cap π―
β οΈ but listen β it must be called with key_tfm_list_mutex held. not optional, not a vibe suggestion, it's a requirement. like holding someone's hand before crossing the street π«Ά
and the return values, because this matters:
- returns
1if it's found β andkey_tfmgets set to the thing you found β - returns
0if it's not found β andkey_tfmgets set toNULL, so like, don't go dereferencing it, it's emptier than my wallet π
π₯ SEE ALSO π₯
the kernel file vibes live in ./fs/ecryptfs/crypto.c β and here's the whole friend group, no one gets left behind π
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_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_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)
okay that's the whole page, go forth and find your tfm bestie ππ
and yeah β this one's from the source ./fs/ecryptfs, dated October 2026, page ecryptfs_tfm_exists(9). iconic, timeless, slay β¨π§ββοΈ
π¦ 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