bpf_put_file(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– bpf_put_file(9)

okay so bestie, this page comes from the Kernel API Manual, and it’s all about bpf_put_file β€” the BPF kfunc that puts a reference on the supplied file. It’s giving β€œreference hygiene is self-care” energy πŸ’…βœ¨


πŸŽ€ NAME πŸŽ€

bpf_put_file β€” put a reference on the supplied file. periodt πŸ’–


✨ SYNOPSIS ✨

__bpf_kfunc void bpf_put_file (struct file *file );

🌸 ARGUMENTS 🌸

  • file β€” the file to put a reference on. that’s the whole assignment, bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Put a reference on the supplied file. okay so that’s the vibe: only referenced file pointers may be passed to this BPF kfunc, fr fr.

🚨 no cap: attempting to pass an unreferenced file pointer β€” or any other arbitrary pointer for that matter β€” will result in the BPF program being rejected by the BPF verifier. that’s not a drill, bestie πŸ’€

This BPF kfunc may only be called from BPF LSM programs. periodt. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ β€” source: ./fs, date: October 2026, and yes bestie this is still bpf_put_file(9) energy. bye πŸ«ΆπŸ’–

πŸ“¦ where this page comes from