函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:key_payload_reserve - Adjust data quota reservation for the key's payload*@key: The key to make the reservation for

函数原型:int key_payload_reserve(struct key *key, size_t datalen)

返回类型:int

参数:

类型参数名称
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  如果delta不等于0且st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
378  maxbytes等于如果uid_eq(uid, GLOBAL_ROOT_UID)则's key space quota 否则general key space quota
381  加自旋锁
383  如果delta大于0且qnbytesdelta大于等于maxbytesqnbytesdelta小于qnbytes的值则
386  ret等于负EDQUOT
388  否则
389  qnbytes加等于delta
392  自旋锁解锁
396  如果ret恒等于0则 payload data length * - may not match RCU dereferenced payload * - payload should contain own length等于datalen
399  返回:ret
调用者
名称描述
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.