Function report |
Source Code:fs\crypto\keysetup_v1.c |
Create Date:2022-07-28 20:24:09 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Find/insert the given key into the fscrypt_direct_keys table. If found, it* is returned with elevated refcount, and 'to_insert' is freed if non-NULL. If* not found, 'to_insert' is inserted and returned if it's non-NULL; otherwise* NULL is returned.
Proto:static struct fscrypt_direct_key *find_or_insert_direct_key(struct fscrypt_direct_key *to_insert, const u8 *raw_key, const struct fscrypt_info *ci)
Type:struct fscrypt_direct_key
Parameter:
Type | Parameter | Name |
---|---|---|
struct fscrypt_direct_key * | to_insert | |
const u8 * | raw_key | |
const struct fscrypt_info * | ci |
191 | BUILD_BUG_ON - break compile if a condition is true( size of hash_key > FSCRYPT_KEY_DESCRIPTOR_SIZE) |
192 | memcpy( & hash_key, master_key_descriptor, size of hash_key ) |
195 | spin_lock( & fscrypt_direct_keys_lock) |
197 | If memcmp(master_key_descriptor, dk_descriptor, FSCRYPT_KEY_DESCRIPTOR_SIZE) != 0 Then Continue |
200 | If Encryption mode used for this inode. It corresponds to either the* contents or filenames encryption mode, depending on the inode type. != dk_mode Then Continue |
206 | spin_unlock( & fscrypt_direct_keys_lock) |
207 | free_direct_key(to_insert) |
208 | Return dk |
212 | spin_unlock( & fscrypt_direct_keys_lock) |
213 | Return to_insert |
Name | Describe |
---|---|
fscrypt_get_direct_key | Prepare to encrypt directly using the master key in the given mode |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |