bpf_crypto_ctx_acquire(9)
π bpf_crypto_ctx_acquire(9) π
okay so bestie, welcome to the Kernel API Manual β yes that's the manual name, we're being fancy today π β and this page is all about bpf_crypto_ctx_acquire, the little kfunc that hands you a reference like it's passing you the aux cord π§β¨
πΈ NAME πΈ
bpf_crypto_ctx_acquire β acquire a reference to a BPF crypto context. that's it, that's the whole vibe π
π SYNOPSIS π
__bpf_kfunc struct bpf_crypto_ctx * bpf_crypto_ctx_acquire (struct
bpf_crypto_ctx *ctx );
literally the whole signature, copied exactly, no cap π«Ά
π¦ ARGUMENTS π¦
ctxβ the BPF crypto context being acquired π and important detail:ctxmust be a trusted pointer. like, trusted trusted. don't be out here passing it random pointers, that's not the move π
β¨ DESCRIPTION β¨
So what does it do? It acquires a reference to a BPF crypto context. iconic behavior, honestly π₯
But here's the part you cannot skip, bestie β the context returned by this function must either be:
- embedded in a map as a
kptr, or - freed with
bpf_crypto_ctx_release
that's a hard either/or, not a suggestion. the way that this is mandatory and not vibes-based π please don't leak it, the kernel will not be slaying with you π
π SEE ALSO π
- Kernel file
./kernel/bpf/crypto.c struct bpf_crypto_params(9)struct bpf_crypto_ctx(9)bpf_crypto_ctx_create(9)bpf_crypto_ctx_release(9)bpf_crypto_decrypt(9)bpf_crypto_encrypt(9)
go read the whole friend group, they all ate π π
and that's a wrap, bestie π this page lives in ./kernel/bpf and it's dated October 2026, and yes the footer is being extra and repeating bpf_crypto_ctx_acquire(9) at us again β main character energy fr fr ππ
π¦ 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