函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_calc_profile_hash

函数原型:int aa_calc_profile_hash(struct aa_profile *profile, unsigned int version, void *start, size_t len)

返回类型:int

参数:

类型参数名称
struct aa_profile *profile
unsigned intversion
void *start
size_tlen
64  SHASH_DESC_ON_STACK(desc, apparmor_tfm)
65  error等于负ENOMEM
66  le32_version等于cpu_to_le32(version)
68  如果非whether policy verification hashing is enabled 则返回:0
71  如果非apparmor_tfm则返回:0
74  hash等于分配内存并置零
75  如果非hash则转到:fail
78  tfm等于apparmor_tfm
80  error等于rypto_shash_init() - (re)initialize message digest*@desc: operational state handle that is already filled* The call (re-)initializes the message digest referenced by the* operational state handle. Any potentially existing state created by
81  如果error则转到:fail
83  error等于rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
84  如果error则转到:fail
86  error等于rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
87  如果error则转到:fail
89  error等于rypto_shash_final() - calculate message digest*@desc: operational state handle that is already filled with data*@out: output buffer filled with the message digest* Finalize the message digest operation and create the message digest
90  如果error则转到:fail
93  返回:0
95  fail :
96  释放内存
97  hash = NULL
99  返回:error