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:Search ->s_master_keys or ->mk_users

Proto:static struct key *search_fscrypt_keyring(struct key *keyring, struct key_type *type, const char *description)

Type:struct key

Parameter:

TypeParameterName
struct key *keyring
struct key_type *type
const char *description
141  keyref = make_key_ref(keyring, true)
143  keyref = keyring_search(keyref, type, description, false)
144  If IS_ERR(keyref) Then
145  If PTR_ERR(keyref) == -EAGAIN || PTR_ERR(keyref) == -EKEYREVOKED Then keyref = ERR_PTR( - ENOKEY)
148  Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
150  Return key_ref_to_ptr(keyref)
Caller
NameDescribe
fscrypt_find_master_keyFind the specified master key in ->s_master_keys.* Returns ERR_PTR(-ENOKEY) if not found.
find_master_key_userFind the current user's "key" in the master key's ->mk_users.* Returns ERR_PTR(-ENOKEY) if not found.