函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:key_update - Update a key's contents.*@key_ref: The pointer (plus possession flag) to the key.*@payload: The data to be used to update the key.*@plen: The length of @payload.* Attempt to update the contents of a key with the given payload data. The

函数原型:int key_update(key_ref_t key_ref, const void *payload, size_t plen)

返回类型:int

参数:

类型参数名称
key_ref_tkey_ref
const void *payload
size_tplen
988  key等于key_ref_to_ptr(key_ref)
991  key_check(key)
994  ret等于Check to see whether permission is granted to use a key in the desired way.
995  如果ret小于0则返回:ret
999  如果非update则返回:负EOPNOTSUPP
1002  memset( & prep, 0, prep的长度)
1003  Raw data 等于payload
1004  Raw datalen 等于plen
1005  Quota length for proposed payload 等于def_datalen
1006  Expiry time of key 等于Located here for timespec[64]_valid_strict
1007  如果preparse
1008  ret等于preparse( & prep)
1009  如果ret小于0则转到:error
1013  lock for writing
1015  ret等于update(key, & prep)
1016  如果ret恒等于0则Change the key state to being instantiated.
1020  lease a write lock
1022  error :
1023  如果preparsefree_preparse( & prep)
1025  返回:ret
调用者
名称描述
keyctl_update_keyUpdate a key's data payload from the given data.* The key must grant the caller Write permission and the key type must support* updating for this to work. A negative key can be positively instantiated* with this call.* If successful, 0 will be returned