Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\platform_certs\efi_parser.c Create Date:2022-07-28 19:57:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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)

Proto: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 *))

Type:int

Parameter:

TypeParameterName
const char *source
const void *data
size_tsize
efi_element_handler_t (*get_handler_for_guid
43  offs = 0
45  pr_devel("-->%s(,%zu)\n", __func__, size)
47  When size > 0 cycle
52  If size < size of list Then Return -EBADMSG
55  memcpy( & list, data, size of list )
56  pr_devel("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 = lsize - size of list - hsize
66  If lsize > size Then
67  pr_devel("<--%s() = -EBADMSG [overrun @%x]\n", __func__, offs)
69  Return -EBADMSG
72  If lsize < size of list || lsize - size of list < hsize || esize < size of elem || elsize < esize || elsize % esize != 0 Then
77  pr_devel("- bad size combo @%x\n", offs)
78  Return -EBADMSG
81  handler = get_handler_for_guid( & signature_type)
82  If Not handler Then
83  data += lsize
84  size -= lsize
85  offs += lsize
86  Continue
89  data += size of list + hsize
90  size -= size of list + hsize
91  offs += size of list + hsize
93  When elsize > 0 cycle
94  elem = data
96  pr_devel("ELEM[%04x]\n", offs)
97  handler(source, & signature_data, esize - size of elem )
101  data += esize
102  size -= esize
103  offs += esize
107  Return 0
Caller
NameDescribe
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.