Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:key_payload_reserve - Adjust data quota reservation for the key's payload*@key: The key to make the reservation for

Proto:int key_payload_reserve(struct key *key, size_t datalen)

Type:int

Parameter:

TypeParameterName
struct key *key
size_tdatalen
371  delta = datalen - payload data length * - may not match RCU dereferenced payload * - payload should contain own length
372  ret = 0
374  key_check(key)
377  If delta != 0 && st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then
378  maxbytes = If uid_eq(uid, GLOBAL_ROOT_UID) Then 's key space quota Else general key space quota
381  spin_lock( & lock)
383  If delta > 0 && ( qnbytes + delta >= maxbytes || qnbytes + delta < qnbytes ) Then
386  ret = -EDQUOT
388  Else
389  qnbytes += delta
392  spin_unlock( & lock)
396  If ret == 0 Then payload data length * - may not match RCU dereferenced payload * - payload should contain own length = datalen
399  Return ret
Caller
NameDescribe
generic_key_instantiategeneric_key_instantiate - Simple instantiation of a key from preparsed data*@key: The key to be instantiated*@prep: The preparsed data to load.* Instantiate a key from preparsed data. We assume we can just copy the data
__key_link_beginPreallocate memory so that a key can be linked into to a keyring.
__key_link_endFinish linking a key into to a keyring.* Must be called with __key_link_begin() having being called.
__key_unlinkApply an unlink change.
keyring_clearkeyring_clear - Clear a keyring*@keyring: The keyring to clear.* Clear the contents of the specified keyring.* Returns 0 if successful or -ENOTDIR if the keyring isn't a keyring.
keyring_revoke
user_updatepdate a user defined key* - the key's semaphore is write-locked
user_revokedispose of the links from a revoked keyring* - called with the key sem write-locked
big_key_revokedispose of the links from a revoked keyring* - called with the key sem write-locked
trusted_payload_alloc
encrypted_key_allocAllocate memory for decrypted key and datablob.