函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:keyctl_dh_compute_kdf

函数原型:static int keyctl_dh_compute_kdf(struct kdf_sdesc *sdesc, char __user *buffer, size_t buflen, uint8_t *kbuf, size_t kbuflen, size_t lzero)

返回类型:int

参数:

类型参数名称
struct kdf_sdesc *sdesc
char __user *buffer
size_tbuflen
uint8_t *kbuf
size_tkbuflen
size_tlzero
203  uint8_t * outbuf = NULL
205  outbuf_len等于undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().(buflen, 获得消息文摘大小)
208  outbuf等于开辟内存
209  如果非outbuf
210  ret等于负ENOMEM
211  转到:err
214  ret等于Implementation of the KDF in counter mode according to SP800-108 section 5
215  如果ret则转到:err
218  ret等于buflen
219  如果copy_to_user(buffer, outbuf, buflen)不等于0则ret等于负EFAULT
222  err :
223  kzfree - like kfree but zero memory*@p: object to free memory of* The memory of the object @p points to is zeroed before freed.* If @p is %NULL, kzfree() does nothing.* Note: this function zeroes the whole allocated buffer which can be a good
224  返回:ret
调用者
名称描述
__keyctl_dh_compute