Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\module_signature.c Create Date:2022-07-28 10:59:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:int mod_check_sig(const struct module_signature *ms, size_t file_len, const char *name)

Type:int

Parameter:

TypeParameterName
const struct module_signature *ms
size_tfile_len
const char *name
24  If be32_to_cpu(Length of signature data ) >= file_len - size of ms Then Return -EBADMSG
27  If Key identifier type [PKEY_ID_PKCS7] != Signature in PKCS#7 message Then
28  pr_err("%s: Module is not signed with expected PKCS#7 message\n", name)
30  Return -ENOPKG
33  If Public-key crypto algorithm [0] != 0 || Digest algorithm [0] != 0 || Length of signer's name [0] != 0 || Length of key identifier [0] != 0 || __pad[0] != 0 || __pad[1] != 0 || __pad[2] != 0 Then
40  pr_err("%s: PKCS#7 signature info has unexpected non-zero params\n", name)
42  Return -EBADMSG
45  Return 0