函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:parse_efi_signature_list - Parse an EFI signature list for certificates*@source: The source of the key*@data: The data blob to parse*@size: The size of the data blob*@get_handler_for_guid: Get the handler func for the sig type (or NULL)

函数原型:int __init parse_efi_signature_list(const char *source, const void *data, size_t size, efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *))

返回类型:int

参数:

类型参数名称
const char *source
const void *data
size_tsize
efi_element_handler_t (*get_handler_for_guid
43  offs等于0
45  打印调试信息("-->%s(,%zu)\n", __func__, size)
47 size大于0循环
52  如果size小于list的长度则返回:负EBADMSG
55  memcpy( & list, data, list的长度)
56  打印调试信息("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n", offs, b, signature_list_size, signature_header_size, signature_size)
61  lsize等于signature_list_size
62  hsize等于signature_header_size
63  esize等于signature_size
64  elsize等于lsizelist的长度减hsize
66  如果lsize大于size
67  打印调试信息("<--%s() = -EBADMSG [overrun @%x]\n", __func__, offs)
69  返回:负EBADMSG
72  如果lsize小于list的长度或lsizelist的长度小于hsizeesize小于elem的长度或elsize小于esizeelsize取模esize不等于0则
77  打印调试信息("- bad size combo @%x\n", offs)
78  返回:负EBADMSG
81  handler等于get_handler_for_guid( & signature_type)
82  如果非handler
83  data加等于lsize
84  size减等于lsize
85  offs加等于lsize
86  继续下一循环
89  data加等于list的长度加hsize
90  size减等于list的长度加hsize
91  offs加等于list的长度加hsize
93 elsize大于0循环
94  elem等于data
96  打印调试信息("ELEM[%04x]\n", offs)
97  handler(source, & signature_data, esize - elem的长度)
101  data加等于esize
102  size减等于esize
103  offs加等于esize
107  返回:0
调用者
名称描述
load_uefi_certsLoad the certs contained in the UEFI databases into the platform trusted* keyring and the UEFI blacklisted X.509 cert SHA256 hashes into the blacklist* keyring.
load_powerpc_certsLoad the certs contained in the keys databases into the platform trusted* keyring and the blacklisted X.509 cert SHA256 hashes into the blacklist* keyring.