函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ima_write_template_field_data

函数原型:static int ima_write_template_field_data(const void *data, const unsigned int datalen, enum data_formats datafmt, struct ima_field_data *field_data)

返回类型:int

参数:

类型参数名称
const void *data
const unsigned intdatalen
enum data_formatsdatafmt
struct ima_field_data *field_data
36  buflen等于datalen
38  如果datafmt恒等于DATA_FMT_STRINGbuflen等于datalen加1
41  buf等于分配内存并置零
42  如果非buf则返回:负ENOMEM
45  memcpy(buf, data, datalen)
54  如果datafmt恒等于DATA_FMT_STRING
55 buf_ptrbuf小于datalen循环如果buf_ptr恒等于' '则
57  buf_ptr等于'_'
60  data等于buf
61  len等于buflen
62  返回:0
调用者
名称描述
ima_eventdigest_init_common
ima_eventname_init_common
ima_eventsig_initma_eventsig_init - include the file signature as part of the template data
ima_eventbuf_initma_eventbuf_init - include the buffer(kexec-cmldine) as part of the* template data.
ima_eventmodsig_initma_eventmodsig_init - include the appended file signature as part of the* template data