blk_crypto_u...capabilities(9)
π blk_crypto_update_capabilities π
okay so bestie, welcome to this little entry from the Kernel API Manual. The main character is blk_crypto_update_capabilities, and she is literally here to update one crypto profile's capabilities so they match another crypto profile's capabilities. no cap, that's the assignment. π
πΈ NAME πΈ
blk_crypto_update_capabilities β update the capabilities of a crypto profile to match those of another crypto profile. slay. β¨
β¨ SYNOPSIS β¨
void blk_crypto_update_capabilities (struct blk_crypto_profile *dst ,
const struct blk_crypto_profile *src );
Return type is void, so there's no return value coming back β she does the update and exits, periodt. πββοΈ
π ARGUMENTS π
dstβ the crypto profile whose capabilities to update. she's the one getting the glow-up, iykyk.srcβ the crypto profile whose capabilities this function will updatedst's capabilities to. she's the inspo, fr fr.
π¦ DESCRIPTION π¦
Blk-crypto has a rule and it is not optional: the crypto capabilities that were advertised when a bio was created have to keep being supported by the device until that bio is ended. literally until the bio is over, bestie. This in turn means a device cannot shrink its advertised crypto capabilities without any explicit synchronization with upper layers. no sneaky downgrade. π«
So if there's no such explicit synchronization, src must support all the crypto capabilities that dst does β i.e. we need blk_crypto_has_capabilities(src, dst). that's the vibe check. β
Also note: as long as the crypto capabilities are being expanded, the order of updates becoming visible is not important. why? because it's alright for blk-crypto to see stale values β they only cause blk-crypto to believe that a crypto capability isn't supported when it actually is β which might result in blk-crypto-fallback being used if available, or the bio being failed. not ideal, but that's the consequence, periodt. π
π SEE ALSO π
Kernel file ./block/blk-crypto-profile.c, plus the whole reference friend group:
blk-crypto profiles(9)blk_crypto_profile_init(9)devm_blk_crypto_profile_init(9)blk_crypto_keyslot_index(9)blk_crypto_get_keyslot(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)
signed off from the ./block corner of the Kernel API Manual, dated October 2026, under the page label blk_crypto_u...capabilities(9). bye bestie π«Άπ
π¦ 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