blk_crypto_start_using_key(9)
π blk_crypto_start_using_key(9) β Kernel API Manual energy π
okay bestie, welcome to the blk_crypto_start_using_key(9) page from the Kernel API Manual. this is the group-chat version, but the facts are all here, fr fr. π«Ά
β¨ NAME β¨
blk_crypto_start_using_key β Start using a blk_crypto_key on a device. π
πΈ SYNOPSIS πΈ
int blk_crypto_start_using_key (struct block_device *bdev , const struct
blk_crypto_key *key );
π ARGUMENTS π
bdevβ block device to operate on. thatβs your main character device rn. πkeyβ A key to use on the device. yes, the actual key-key. π
π¦ DESCRIPTION π¦
okay so upper layers must call this function to ensure that either the hardware supports the keyβs crypto settings, or the crypto API fallback has transforms for the needed mode allocated and ready to go. no cap. β¨
This function may allocate an skcipher, and should not be called from the data path, since that might cause a deadlock. π please do not do that. itβs giving βdo not text your ex at 3amβ levels of bad idea.
π₯ RETURN π₯
0β success, slay. β¨-EOPNOTSUPPβ if the key is wrapped but the hardware does not support wrapped keys. π-ENOPKGβ if the key is a raw key but the hardware does not support raw keys andblk-crypto-fallbackis either disabled or the needed algorithm is disabled in the crypto API. π- another
-errnocode β if something else went wrong. yeah.
π SEE ALSO π
- Kernel file
./block/blk-crypto.c blk_crypto_init_key(9)blk_crypto_config_supported_natively(9)blk_crypto_evict_key(9)
go read these next, iykyk. π«Ά
bestie, thatβs the whole vibe check. source/version: ./block π date: October 2026 π page: blk_crypto_start_using_key(9) π¦
π¦ 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