函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:keyring_read

函数原型:static long keyring_read(const struct key *keyring, char __user *buffer, size_t buflen)

返回类型:long

参数:

类型参数名称
const struct key *keyring
char __user *buffer
size_tbuflen
491  kenter("{%d},,%zu", key_serial(keyring), buflen)
493  如果buflen按位与sizeof(key_serial_t)减1则返回:负EINVAL
497  如果bufferbuflen
498  buffer等于buffer
499  buflen等于buflen
500  count等于0
501  ret等于assoc_array_iterate - Pass all objects in the array to a callback*@array: The array to iterate over.*@iterator: The callback function.*@iterator_data: Private data for the callback function.* Iterate over all the objects in an associative array
503  如果ret小于0则
504  kleave(" = %ld [iterate]", ret)
505  返回:ret
510  ret等于nr_leaves_on_treesizeof(key_serial_t)
511  如果ret小于等于buflenkleave("= %ld [ok]", ret)
513  否则kleave("= %ld [buffer too small]", ret)
515  返回:ret