Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dh_data_from_key

Proto:static ssize_t dh_data_from_key(key_serial_t keyid, void **data)

Type:ssize_t

Parameter:

TypeParameterName
key_serial_tkeyid
void **data
24  key_ref = Look up a key ID given us by userspace with a given permissions mask to get* the key it refers to.* Flags can be passed to request that special keyrings be created if referred* to directly, to permit partially constructed keys to be found and to skip
25  If IS_ERR(key_ref) Then
26  ret = -ENOKEY
27  Go to error
30  key = key_ref_to_ptr(key_ref)
32  ret = -EOPNOTSUPP
33  If type of key == user defined keys take an arbitrary string as the description and an* arbitrary blob of data as the payload Then
34  lock for reading
35  status = key_validate - Validate a key.*@key: The key to be validated.* Check that a key is valid, returning 0 if the key is okay, -ENOKEY if the* key is invalidated, -EKEYREVOKED if the key's type has been removed or if
36  If status == 0 Then
44  If duplicate Then
47  Else
48  ret = -ENOMEM
51  lease a read lock
54  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
55  error :
56  Return ret
Caller
NameDescribe
__keyctl_dh_compute