bpf_cpumask_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bpf_cpumask_acquire(9) β€” from the Kernel API Manual, bestie 🫢

okay so real talk, this one is short and sweet but it's IMPORTANT, so lock in for like thirty seconds ✨


✨ NAME ✨

bpf_cpumask_acquire β€” grab yourself a reference to a BPF cpumask, no cap πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

__bpf_kfunc struct bpf_cpumask * bpf_cpumask_acquire (struct bpf_cpumask
*cpumask );

that's it. that's the whole vibe. one function, one argument, one pointer back πŸ”₯


🌸 ARGUMENTS 🌸

  • cpumask β€” the BPF cpumask you're acquiring, bestie. and listen: the cpumask must be a trusted pointer. that's not optional, that's the whole assignment. πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it do? it acquires a reference to a BPF cpumask. literally that. 🫢

but here's the part you cannot skip, and i mean it β€” the cpumask returned by this function must either:

  • be embedded in a map as a kptr, or
  • be freed with bpf_cpumask_release
⚠️ like genuinely, pick one. those are the two options. don't just have a floating reference out there with no home, that's giving leak energy and we're not about that πŸ’€

πŸ‘‘ RETURN πŸ‘‘

  • the struct bpf_cpumask pointer that was passed to the function. yes, the same one. it gives you back what you handed it. iconic behavior honestly 🌈

⭐ SEE ALSO ⭐

go read these next, i'm obsessed with all of them, iykyk:


and that's the page, bestie πŸ’œ this one came out of ./kernel/bpf, dated October 2026, and it's bpf_cpumask_acquire(9) in the Kernel API Manual β€” go forth and acquire your references responsibly, mwah 🧚

πŸ“¦ where this page comes from