Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Extended ioctl version; can get policies of any version

Proto:int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *uarg)

Type:int

Parameter:

TypeParameterName
struct file *filp
void __user *uarg
400  union fscrypt_policy * policy = (union fscrypt_policy * ) & utput
405  BUILD_BUG_ON - break compile if a condition is true(offsetof(typeof(arg), policy_size) != 0)
406  BUILD_BUG_ON - break compile if a condition is true(get the member end offset of(typeof(arg), policy_size) != offsetof(typeof(arg), policy))
408  BUILD_BUG_ON - break compile if a condition is true( size of utput != size of policy )
410  err = fscrypt_get_policy(file_inode(filp), policy)
411  If err Then Return err
413  policy_size = Return the size expected for the given fscrypt_policy based on its version* number, or 0 if the policy version is unrecognized.
415  If copy_from_user( & arg, uarg, size of put/output ) Then Return -EFAULT
418  If policy_size > put/output Then Return -EOVERFLOW
420  put/output = policy_size
422  If copy_to_user(uarg, & arg, size of put/output + policy_size) Then Return -EFAULT
424  Return 0