blk_crypto_get_keyslot(9)
π blk_crypto_get_keyslot π
okay so this is a page from the Kernel API Manual (yes bestie, blk_crypto_get_keyslot(9), section 9, we're in kernel-doc territory now π) and it's literally about grabbing a keyslot for a key if needed. that's it. that's the whole vibe. let's get into it β¨
β¨ NAME β¨
blk_crypto_get_keyslot β get a keyslot for a key, if needed. no cap, that's the entire job π«Ά
πΈ SYNOPSIS πΈ
blk_status_t blk_crypto_get_keyslot (struct blk_crypto_profile *profile
, const struct blk_crypto_key *key , struct blk_crypto_keyslot
**slot_ptr );
π¦ ARGUMENTS π¦
profileβ the crypto profile of the device the key is gonna be used on πkeyβ the key that will be used πslot_ptrβ okay so if a keyslot gets allocated, an opaque pointer to the keyslot struct gets stored here. and heads up: you must callblk_crypto_put_keyslotlater to release it, no skipping that step bestie π otherwise,NULLgets stored here.
π§ DESCRIPTION π§
so if the device has keyslots, this gets you a keyslot that's been programmed with the specified key. and if the key is already in a slot? it just reuses it, iconic, no wasted work π otherwise it waits for a slot to become idle and programs the key into it. patient queen behavior honestly π
β CONTEXT β
Process context. it takes and releases profile->lock. π
π RETURN π
BLK_STS_OK on success β which means either a keyslot was allocated or one wasn't even needed β or a blk_status_t error on failure. simple as that π
π SEE ALSO π
- Kernel file
./block/blk-crypto-profile.c - blk-crypto profiles(9)
blk_crypto_profile_init(9)devm_blk_crypto_profile_init(9)blk_crypto_keyslot_index(9)blk_crypto_put_keyslot(9)blk_crypto_reprogram_all_keys(9)blk_crypto_derive_sw_secret(9)blk_crypto_intersect_capabilities(9)blk_crypto_has_capabilities(9)blk_crypto_update_capabilities(9)
seriously tho, go read blk_crypto_put_keyslot(9) if you took a slot. don't leave it hanging, that's so not main character energy π
and that's the whole page!! π this one lives in ./block, dated October 2026, and it's literally blk_crypto_get_keyslot(9) β go program some keys, bestie, you got this π₯π
π¦ 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