函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Verify that the current user has added a master key with the given identifier* (returns -ENOKEY if not)

函数原型:int fscrypt_verify_key_added(struct super_block *sb, const u8 identifier[16])

返回类型:int

参数:

类型参数名称
struct super_block *sb
const u8identifier
591  of FSCRYPT_KEY_SPEC_TYPE_* 等于v2 policy keys are specified by a 16-byte key "identifier" which the kernel* calculates as a cryptographic hash of the key itself,* matching fscrypt_policy_v2::master_key_identifier.
592  memcpy(identifier, identifier, FSCRYPT_KEY_IDENTIFIER_SIZE)
594  key等于Find the specified master key in ->s_master_keys.* Returns ERR_PTR(-ENOKEY) if not found.
595  如果是错误
596  err等于错误
597  转到:out
599  mk等于data[0]
600  mk_user等于Find the current user's "key" in the master key's ->mk_users.* Returns ERR_PTR(-ENOKEY) if not found.
601  如果是错误
602  err等于错误
603  否则
604  key_put(mk_user)
605  err等于0
607  key_put(key)
608  out :
609  如果err恒等于负ENOKEY操作权限检查err等于0
611  返回:err
调用者
名称描述
set_encryption_policy
set_encryption_policy