函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_encryption_policy

函数原型:static int set_encryption_policy(struct inode *inode, const union fscrypt_policy *policy)

返回类型:int

参数:

类型参数名称
struct inode *inode
const union fscrypt_policy *policy
277  如果非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则返回:负EINVAL
281  :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.
293  pr_warn_once("%s (pid %d) is setting deprecated v1 encryption policy; recommend upgrading to v2.\n", comm, pid)
295  退出
296  :version恒等于New policy version with HKDF and key verification (recommended).
297  err等于Verify that the current user has added a master key with the given identifier* (returns -ENOKEY if not)
299  如果err则返回:err
301  退出
302  默认
303  WARN_ON(1)
304  返回:负EINVAL
307  ctxsize等于fscrypt_new_context_from_policy( & ctx, policy)
309  返回:set_context(inode, & ctx, ctxsize, NULL)
调用者
名称描述
fscrypt_ioctl_set_policy