STRUCT BPF_CRYPTO_CTX(9)
πΈ NAME πΈ
okay bestie, welcome to the struct bpf_crypto_ctx(9) page from the Kernel API Manual β it's literally the refcounted BPF crypto context structure. That's the whole assignment: a refcounted BPF crypto context structure. No cap, we love a name that tells you exactly what it is. π
β¨ SYNOPSIS β¨
here's the struct in all its main-character glory:
struct bpf_crypto_ctx {
const struct bpf_crypto_type *type;
void *tfm;
u32 siv_len;
struct rcu_head rcu;
refcount_t usage;
};
π Members π
typeβ the pointer to bpf crypto type. That's it, that's the field. π¦tfmβ the pointer to instance of crypto API struct. Very demure, very crypto-api-core. β¨siv_lenβ the Size of IV and state storage for cipher. Important little number, fr fr. π₯rcuβ the RCU head used to free the crypto context with RCU safety. Gotta free it safely, bestie. π«Άusageβ the object reference counter. When the refcount goes to 0, the memory is released back to the BPF allocator, which provides RCU safety. That's the lifecycle, periodt. π
π SEE ALSO π
- Kernel file
./kernel/bpf/crypto.c struct bpf_crypto_params(9)bpf_crypto_ctx_create(9)bpf_crypto_ctx_acquire(9)bpf_crypto_ctx_release(9)bpf_crypto_decrypt(9)bpf_crypto_encrypt(9)
these are the docs to pull up next, iykyk. π
xoxo, bestie π β source/version: ./kernel/bpf; date: October 2026 β¨π
π¦ 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