函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_modsig.c Create Date:2022-07-27 22:07:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ma_read_modsig - Read modsig from buf.* Return: 0 on success, error code otherwise.

函数原型:int ima_read_modsig(enum ima_hooks func, const void *buf, loff_t buf_len, struct modsig **modsig)

返回类型:int

参数:

类型参数名称
enum ima_hooksfunc
const void *buf
loff_tbuf_len
struct modsig **modsig
63  marker_len等于strlen - Find the length of a string*@s: The string to be sized
70  如果buf_len小于等于marker_lensig的长度则返回:负ENOENT
73  p等于bufbuf_lenmarker_len
74  如果内存比较则返回:负ENOENT
77  buf_len减等于marker_len
78  sig等于psig的长度
80  rc等于mod_check_sig - check that the given signature is sane*@ms: Signature to check.*@file_len: Size of the file to which @ms is appended.*@name: What is being checked. Used for error messages.
81  如果rc则返回:rc
84  sig_len等于be32_to_cpu(Length of signature data )
85  buf_len减等于sig_lensig的长度
88  hdr等于分配内存并置零
89  如果非hdr则返回:负ENOMEM
92  pkcs7_msg等于pkcs7_parser.c
93  如果是错误
94  rc等于错误
95  释放内存
96  返回:rc
99  memcpy(raw_pkcs7, buf + buf_len, sig_len)
100  * This is what will go to the measurement list if the template requires * storing the signature.等于sig_len
103  hash_algo等于HASH_ALGO__LAST
105  modsig等于hdr
107  返回:0