ima_collect_modsig(9)
π ima_collect_modsig(9) β Kernel API Manual π
Okay bestie, this is ima_collect_modsig(9) from the Kernel API Manual, and it's lowkey iconic because it's all about hashing a file without the signature tacked onto the end. No cap, let's get into it β¨
πΈ NAME πΈ
ima_collect_modsig β Calculate the file hash without the appended signature. π
β¨ SYNOPSIS β¨
void ima_collect_modsig (struct modsig *modsig , const void *buf ,
loff_t size );
π«Ά ARGUMENTS π«Ά
modsigβ parsed module signature πbufβ data to verify the signature onsizeβ data size
π¦ DESCRIPTION π¦
Okay so here's the situation: since the modsig is literally part of the file contents, the hash used in its signature isn't the same one ordinarily calculated by IMA. π Therefore the PKCS7 code calculates a separate one for signature verification. Slay, that's the whole reason this function exists. β¨
π SEE ALSO π
- Kernel file
./security/integrity/ima/ima_modsig.cβ go peek, bestie π
Shoutout to source/version ./security/integrity/ima and date October 2026 β this was ima_collect_modsig(9), signing off π«Άπ
π¦ 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