Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

Name:v1 policy, DIRECT_KEY: use the master key directly

Proto:static int setup_v1_file_key_direct(struct fscrypt_info *ci, const u8 *raw_master_key)

Type:int

Parameter:

TypeParameterName
struct fscrypt_info *ci
const u8 *raw_master_key
256  mode = Encryption mode used for this inode. It corresponds to either the* contents or filenames encryption mode, depending on the inode type.
259  If Not fscrypt_mode_supports_direct_key(mode) Then
260  fscrypt_warn(Back-pointer to the inode , "Direct key mode not allowed with %s", friendly_name)
263  Return -EINVAL
266  If contents_encryption_mode != filenames_encryption_mode Then
268  fscrypt_warn(Back-pointer to the inode , "Direct key mode not allowed with different contents and filenames modes")
270  Return -EINVAL
273  dk = Prepare to encrypt directly using the master key in the given mode
274  If IS_ERR(dk) Then Return PTR_ERR(dk)
276  If non-NULL, then encryption is done using the master key directly* and ci_ctfm will equal ci_direct_key->dk_ctfm. = dk
277  The actual crypto transform used for encryption and decryption = dk_ctfm
278  Return 0
Caller
NameDescribe
fscrypt_setup_v1_file_key