blk_crypto_start_using_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 and blk-crypto-fallback is either disabled or the needed algorithm is disabled in the crypto API. πŸ’€
  • another -errno code β€” if something else went wrong. yeah.

🌈 SEE ALSO 🌈

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