bpf_prog_ar...lete_safe_at(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 β€” a bpf_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 πŸ¦‹


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