ima_bprm_creds_for_exec(9)
π NAME π
ima_bprm_creds_for_exec β bestie, this is the one that collects, stores, and appraises the measurement β¨
π SYNOPSIS π
int ima_bprm_creds_for_exec (struct linux_binprm *bprm );
π¦ ARGUMENTS π¦
bprmβ this cutie right here contains thelinux_binprmstructure, no cap π
πΈ DESCRIPTION πΈ
okay so here's the vibe: this function looks at the IMA policy and the execveat(2) AT_EXECVE_CHECK flag, and then it measures and appraises the integrity of a file that's about to be executed by script interpreters π§β¨
and here's the part that's actually iconic β unlike literally every other LSM hook where the kernel is the one enforcing file integrity, this time around enforcing file integrity is left up to the discretion of the script interpreter (that's userspace, babe). so the kernel isn't the bouncer here, the interpreter is π
on success, it returns 0 π but if there's an integrity appraisal error β assuming the file is in policy and IMA-appraisal is in enforcing mode β it returns -EACCES. so like, not a slay π
ngl this one's giving "trust the userspace to do the right thing" energy, which is a choice, but okay π«Ά
π SEE ALSO π
kernel file ./security/integrity/ima/ima_main.c (the mothership π) plus all these besties:
ima_file_free(9)ima_file_mmap(9)ima_file_mprotect(9)ima_bprm_check(9)ima_creds_check(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)
and that's the whole page, periodt π this gem lives at ./security/integrity/ima, it's dated October 2026, and it's officially known as ima_bprm_creds_for_exec(9) β go off, kernel API manual, you ate πβ¨
π¦ 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