ecryptfs_get..._cipher_name(9)
omg hi bestie π welcome to ecryptfs_get..._cipher_name(9) from the Kernel API Manualβyes, that's the whole manual name, and no we are not abbreviating her, she's iconic like that. This is the kernel crypto matchmaker page, and we're keeping every pointer, return value, and reference intact. No cap. π«Ά
β¨ NAME β¨
ecryptfs_get_tfm_and_mutex_for_cipher_name-
that's it, that's the name listing; the original line ends with a dash and leaves the summary slot mysteriously empty, and honestly? mysterious main character energy. π
πΈ SYNOPSIS πΈ
here's the function signature, copied exactly because we do not play with code around here:
int ecryptfs_get_tfm_and_mutex_for_cipher_name (struct crypto_skcipher
**tfm , struct mutex **tfm_mutex , char *cipher_name );
π ARGUMENTS π
okay so the function takes three pointers and they all matter:
tfmβ gets set to the cachedtfmthat was found, or to the newtfmthat got created. like a little pointer handoff, slay β¨tfm_mutexβ gets set to the mutex for the cachedtfmthat was found, or for the newtfmthat got created. lock vibe check complete πcipher_nameβ the name of the cipher to search for and/or add. yes, search and/or add, she contains multitudes π
π¦ DESCRIPTION π¦
so what does ecryptfs_get_tfm_and_mutex_for_cipher_name actually do? it sets pointers to tfm & tfm_mutex matching cipher_name. first it searches for a cached item, and if it doesn't find one, it creates a new one. very "if you can't find your fave in the group chat, make a new group chat" energy.
return value tea β: 0 on success, and non-zero if adding the new cipher failed. that's the whole vibe check, fr fr.
π SEE ALSO π
Kernel file ./fs/ecryptfs/crypto.c and the whole iconic friend group:
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_tfm_exists(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 page bestie π this little icon lives in the source tree as ./fs/ecryptfs, it's dated October 2026, and the manual entry is ecryptfs_get..._cipher_name(9). mwah, go call your nearest kernel crypto function responsibly β¨π
π¦ 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