bpf_prog_ar...lete_safe_at(9)
π NAME π
bpf_prog_ar...lete_safe_at β okay so this one replaces the program sitting at the index you pass in, inside the program array, with a dummy no-op program. Like, it ghosts the real program and puts a vibe-only stand-in in its place π
(this page lives in the Kernel API Manual, bestie, kernel internals edition β¨)
β¨ SYNOPSIS β¨
int bpf_prog_array_delete_safe_at (struct bpf_prog_array *array , int index );
π«Ά ARGUMENTS π«Ά
arrayβ abpf_prog_array. That's the array we're messing with, periodt.indexβ the index of the program you want to replace. Which program? That one. The one at this index π
πΈ DESCRIPTION πΈ
So when it's figuring out where the program to replace actually lives, it skips over dummy programs β by just... not counting them π. Lowkey the whole trick. They don't count, so they don't shift the position math. Iconic behavior honestly.
π RETURN π
0β Success π slay, it worked-EINVALβ Invalid index value. It literally must be a non-negative integer, no cap π©-ENOENTβ Index out of range π you went too far bestie
π¦ SEE ALSO π¦
- Kernel file
./kernel/bpf/core.c ___bpf_prog_run(9)bpf_prog_select_runtime(9)bpf_prog_array_update_at(9)
and that's the whole page, bestie π§π this lil masterpiece came from the ./kernel/bpf source tree and it's dated October 2026 β go forth and replace programs safely, mwah ππ
π¦ 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