函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\policy.c Create Date:2022-07-29 10:57:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:bool fscrypt_supported_policy(const union fscrypt_policy *policy_u, const struct inode *inode)

返回类型:bool

参数:

类型参数名称
const union fscrypt_policy *policy_u
const struct inode *inode
80  :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  返回:false
92  如果flags按位与FSCRYPT_POLICY_FLAGS_PAD_MASK按位或FSCRYPT_POLICY_FLAG_DIRECT_KEY的值的反则
94  fscrypt_warn(inode, "Unsupported encryption flags (0x%02x)", flags)
97  返回:false
100  返回:true
102  :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  返回:false
114  如果flags按位与FSCRYPT_POLICY_FLAGS_VALID的反则
115  fscrypt_warn(inode, "Unsupported encryption flags (0x%02x)", flags)
118  返回:false
121  如果flags按位与FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64且非supported_iv_ino_lblk_64_policy(policy, inode)则返回:false
127  fscrypt_warn(inode, "Reserved bits set in encryption policy")
129  返回:false
132  返回:true
135  返回:false
调用者
名称描述
set_encryption_policy
fscrypt_get_encryption_info