STRUCT INLINECRYPT_CTX(9)
π struct inlinecrypt_ctx(9) β like, the kernel API manual, bestie π
okay so real talk, this page is all about struct inlinecrypt_ctx β aka the private data of an inlinecrypt target. it lives in the kernel API manual and honestly? it's giving backstage-pass energy. let's get into it β¨
πΈ NAME πΈ
struct inlinecrypt_ctx β the private data of an inlinecrypt target. that's it, that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
like, here's the struct in all its glory, no cap:
struct inlinecrypt_ctx {
struct dm_dev *dev;
sector_t start;
const char *cipher_string;
unsigned int key_size;
u64 iv_offset;
unsigned int sector_size;
unsigned int sector_bits;
enum blk_crypto_key_type key_type;
struct blk_crypto_key key;
u64 max_dun;
};
π¦ Members π¦
okay now the main character energy β every single field, explained, periodt:
devβ the underlying device. literally the whole point πstartβ the starting sector of the range ofdevthat this target actually maps. and for this purpose a "sector" is512bytes β write that down, it comes up again πcipher_stringβ the name of the encryption algorithm being used. yes bestie, name-drop it π₯key_sizeβ size of the encryption key in bytes πiv_offsetβ starting offset for IVs. the IVs are generated as if the target were preceded byiv_offset512-byte sectors. it's giving "pretend there's stuff before us" energy β¨sector_sizeβ crypto sector size in bytes (usually4096) πsector_bitsβlog2(sector_size). math moment, we love to see it π§key_typeβ type of the key β either raw or hardware-wrapped. two paths, both iconic πkeyβ the encryption key to use. the actual key, the star of the show πmax_dunβ the maximum DUN that may be used (computed from other params). not me computing things from other params π
π SEE ALSO π
- Kernel file
./drivers/md/dm-inlinecrypt.cβ go read it, iykyk π
and that's the whole page, bestie π sign-off time: this cutie came out of ./drivers/md and it's dated October 2026, so yeah β it's lowkey from the future fr fr. slay π¦β
π¦ 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