| Function report | 
| Source Code: fs\crypto\keysetup.c | Create Date:2022-07-28 20:24:00 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:setup_per_mode_key
Proto:static int setup_per_mode_key(struct fscrypt_info *ci, struct fscrypt_master_key *mk, struct crypto_skcipher **tfms, u8 hkdf_context, bool include_fs_uuid)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct fscrypt_info * | ci | |
| struct fscrypt_master_key * | mk | |
| struct crypto_skcipher ** | tfms | |
| u8 | hkdf_context | |
| bool | include_fs_uuid | 
| 128 | mode = Encryption mode used for this inode. It corresponds to either the* contents or filenames encryption mode, depending on the inode type. | 
| 129 | mode_num = mode - available_modes | 
| 133 | hkdf_infolen = 0 | 
| 136 | If WARN_ON(mode_num > __FSCRYPT_MODE_MAX) Then Return -EINVAL | 
| 141 | If Value is more likely to compile time(tfm != NULL) Then Go to done | 
| 144 | BUILD_BUG_ON - break compile if a condition is true( size of mode_num != 1) | 
| 145 | BUILD_BUG_ON - break compile if a condition is true( size of s_uuid != 16) | 
| 146 | BUILD_BUG_ON - break compile if a condition is true( size of hkdf_info != 17) | 
| 147 | hkdf_info[hkdf_infolen++] = mode_num | 
| 148 | If include_fs_uuid Then | 
| 149 | memcpy( & hkdf_info[hkdf_infolen], & s_uuid, size of s_uuid ) | 
| 151 | hkdf_infolen += size of s_uuid | 
| 165 | If (prev_tfm != NULL) Then | 
| 169 | done : | 
| 171 | Return 0 | 
| Name | Describe | 
|---|---|
| fscrypt_setup_v2_file_key | 
| 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 |