Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-28 18:17:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:keyring_read

Proto:static long keyring_read(const struct key *keyring, char __user *buffer, size_t buflen)

Type:long

Parameter:

TypeParameterName
const struct key *keyring
char __user *buffer
size_tbuflen
491  kenter("{%d},,%zu", key_serial(keyring), buflen)
493  If buflen & sizeof(key_serial_t) - 1 Then Return -EINVAL
497  If buffer && buflen Then
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  If ret < 0 Then
504  kleave(" = %ld [iterate]", ret)
505  Return ret
510  ret = nr_leaves_on_tree * sizeof(key_serial_t)
511  If ret <= buflen Then kleave("= %ld [ok]", ret)
513  Else kleave("= %ld [buffer too small]", ret)
515  Return ret