ENUM BPF_BINPRM_FLAGS(9)
π enum bpf_binprm_flags(9) π
okay so bestie, welcome to the Kernel API Manual β this is the page for enum bpf_binprm_flags, and honestly? it's giving "tiny enum, huge responsibilities". stay with me, it's cute.
β¨ NAME β¨
enum bpf_binprm_flags β the per-exec invocation flags that a load program can request π
like, per. exec. every single time. not once at registration. we'll get there.
β¨ SYNOPSIS β¨
enum bpf_binprm_flags {
BPF_BINPRM_PRESERVE_ARGV0 ,
BPF_BINPRM_CREDENTIALS ,
BPF_BINPRM_EXECFD ,
BPF_BINPRM_TRANSPARENT ,
BPF_BINPRM_LOADER
};
β¨ OPTIONS β¨
πΈ Constants
BPF_BINPRM_PRESERVE_ARGV0β keeps the caller'sargv[0]around, no take-backsies. this one's the'P'flag energy πBPF_BINPRM_CREDENTIALSβ computes the credentials from the binary. lowkey impliesexecfd. it's the'C'flag π₯BPF_BINPRM_EXECFDβ passes the binary over viaAT_EXECFD. classic'O'flag behaviour π«ΆBPF_BINPRM_TRANSPARENTβ leavesargvcompletely untouched, and the interpreter pulls the binary fromAT_EXECFD. this is the'T'flag. heads up: it impliesexecfdand it excludes preserve-argv0 β they are not friends, do not put them in the same group chat πBPF_BINPRM_LOADERβ swaps the interpreter in for the binary'sPT_INTERPand runs the binary as a native exec. that's the'L'flag, and it's kind of a main character because it excludes every other flag. periodt π
β¨ Description β¨
so these get set from a load program with bpf_binprm_set_flags. that's the whole vibe.
and here's the part that slaps: unlike a static entry β which picks its thing once at registration and then just lives like that forever β a bpf handler chooses these per exec rather than once at registration. every exec gets a fresh vibe check π
β¨
β¨ SEE ALSO β¨
- Kernel file
./include/linux/binfmt_misc.hβstruct binfmt_misc_interp(9),struct binfmt_misc_ops(9)π¦
that's the page, bestie! this icon was brought to you by the source in ./include/linux, dated October 2026, straight out of the Kernel API Manual β go forth and flag responsibly πππ
π¦ 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