ima_bprm_check(9)
π ima_bprm_check(9) β Kernel API Manual β¨
okay so bestie, welcome to the ima_bprm_check(9) page, straight out of the Kernel API Manual π this one's a lil short and sweet but it ATE, trust.
π¦ NAME π¦
ima_bprm_check β based on policy, collect/store measurement. literally that's the whole job description, no cap π
πΈ SYNOPSIS πΈ
int ima_bprm_check (struct linux_binprm *bprm );
β¨ ARGUMENTS β¨
bprmβ contains thelinux_binprmstructure. that's it, that's the whole argument, she's low maintenance π
π₯ DESCRIPTION π₯
okay so here's the lore π the OS is out here doing the most to protect you, fr fr. An executable file that's already open for write gets blocked from being executed in deny_write_access, and an executable file that's already open for execute gets blocked from being modified in get_write_access. iconic teamwork, honestly π«Ά
so like. because of all that, we can be certain that what we verify and measure here is actually what is being executed. no sneaky swap-outs, no bait-and-switch, the vibe check is real π β¨
on success, return 0 π on integrity appraisal error β assuming the file is in policy and IMA-appraisal is in enforcing mode β return -EACCES. and yeah that -EACCES is giving "you shall not pass" energy, so handle it π
π SEE ALSO π
Kernel file ./security/integrity/ima/ima_main.c and honestly the whole friend group:
ima_file_free(9)ima_file_mmap(9)ima_file_mprotect(9)ima_creds_check(9)ima_bprm_creds_for_exec(9)ima_file_check(9)ima_file_hash(9)ima_inode_hash(9)ima_post_create_tmpfile(9)ima_post_path_mknod(9)ima_read_file(9)ima_post_read_file(9)ima_load_data(9)ima_post_load_data(9)process_buffer_measurement(9)ima_kexec_cmdline(9)ima_measure_critical_data(9)ima_measure_raw_policy(9)ima_kernel_module_request(9)
bestie reminder: this page lives in ./security/integrity/ima, and it's dated October 2026 β so like, future vibes ππ
and that's the whole page!! short, sweet, slayed ππ« mwah, go read the source, iykyk π§ββοΈ
π¦ 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