函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keyring.c Create Date:2022-07-29 10:57:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Retrieve the status of an fscrypt master encryption key

函数原型:int fscrypt_ioctl_get_key_status(struct file *filp, void __user *uarg)

返回类型:int

参数:

类型参数名称
struct file *filp
void __user *uarg
896  sb等于i_sb
902  如果copy_from_user( & arg, uarg, arg的长度)则返回:负EFAULT
905  如果非valid_key_spec( & put )则返回:负EINVAL
908  如果memchr_inv - Find an unmatching character in an area of memory.*@start: The memory area*@c: Find a character other than c*@bytes: The size of the area.* returns the address of the first character other than @c, or %NULL则返回:负EINVAL
911  status_flags等于0
912  user_count等于0
913  memset(__out_reserved, 0, __out_reserved的长度)
915  key等于Find the specified master key in ->s_master_keys.* Returns ERR_PTR(-ENOKEY) if not found.
916  如果是错误
917  如果key不等于错误号则返回:错误
919  status等于utput
920  err等于0
921  转到:out
923  mk等于data[0]
924  lock for reading
926  如果非is_master_key_secret_present( & The secret key material. After FS_IOC_REMOVE_ENCRYPTION_KEY is* executed, this is wiped and no new inodes can be unlocked with this* key; however, there may still be inodes in ->mk_decrypted_inodes* which could not be evicted)则
927  status等于FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED
928  err等于0
929  转到:out_release_key
932  status等于FSCRYPT_KEY_STATUS_PRESENT
933  如果Keyring which contains a key of type 'key_type_fscrypt_user' for each* user who has added this key
936  user_count等于nr_leaves_on_tree
937  mk_user等于Find the current user's "key" in the master key's ->mk_users.* Returns ERR_PTR(-ENOKEY) if not found.
938  如果非是错误
941  key_put(mk_user)
942  否则如果mk_user不等于错误号
943  err等于错误
944  转到:out_release_key
947  err等于0
948  out_release_key :
949  lease a read lock
950  key_put(key)
951  out :
952  如果非errcopy_to_user(uarg, & arg, arg的长度)则err等于负EFAULT
954  返回:err