STRUCT BPF_CRYPTO_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 🌈

these are the docs to pull up next, iykyk. πŸ‘‘


xoxo, bestie πŸ’– β€” source/version: ./kernel/bpf; date: October 2026 βœ¨πŸ’…

πŸ“¦ where this page comes from