Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keyring.c Create Date:2022-07-28 20:23:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Find the specified master key in ->s_master_keys.* Returns ERR_PTR(-ENOKEY) if not found.

Proto:struct key *fscrypt_find_master_key(struct super_block *sb, const struct fscrypt_key_specifier *mk_spec)

Type:struct key

Parameter:

TypeParameterName
struct super_block *sb
const struct fscrypt_key_specifier *mk_spec
236  keyring = READ_ONCE(s_master_keys)
237  If (keyring == NULL) Then Return ERR_PTR( - ENOKEY)
240  format_mk_description(description, mk_spec)
241  Return Search ->s_master_keys or ->mk_users
Caller
NameDescribe
add_master_key
fscrypt_verify_key_addedVerify that the current user has added a master key with the given identifier* (returns -ENOKEY if not)
do_remove_keyTry to remove an fscrypt master encryption key
fscrypt_ioctl_get_key_statusRetrieve the status of an fscrypt master encryption key
setup_file_encryption_keyFind the master key, then set up the inode's actual encryption key.* If the master key is found in the filesystem-level keyring, then the* corresponding 'struct key' is returned in *master_key_ret with* ->mk_secret_sem read-locked