Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_supported_policy - check whether an encryption policy is supported* Given an encryption policy, check whether all its encryption modes and other* settings are supported by this kernel

Proto:bool fscrypt_supported_policy(const union fscrypt_policy *policy_u, const struct inode *inode)

Type:bool

Parameter:

TypeParameterName
const union fscrypt_policy *policy_u
const struct inode *inode
80  Case version == Legacy policy version; ad-hoc KDF and no key verification.* For new encrypted directories, use fscrypt_policy_v2 instead.* Careful: the .version field for this is actually 0, not 1.
81  policy = v1
85  fscrypt_warn(inode, "Unsupported encryption modes (contents %d, filenames %d)", contents_encryption_mode, filenames_encryption_mode)
89  Return false
94  fscrypt_warn(inode, "Unsupported encryption flags (0x%02x)", flags)
97  Return false
100  Return true
102  Case version == New policy version with HKDF and key verification (recommended).
103  policy = v2
107  fscrypt_warn(inode, "Unsupported encryption modes (contents %d, filenames %d)", contents_encryption_mode, filenames_encryption_mode)
111  Return false
115  fscrypt_warn(inode, "Unsupported encryption flags (0x%02x)", flags)
118  Return false
121  If flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 && Not supported_iv_ino_lblk_64_policy(policy, inode) Then Return false
127  fscrypt_warn(inode, "Reserved bits set in encryption policy")
129  Return false
132  Return true
135  Return false