Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sverity_ioctl_measure() - get a verity file's measurement* Retrieve the file measurement that the kernel is enforcing for reads from a* verity file

Proto:int fsverity_ioctl_measure(struct file *filp, void __user *_uarg)

Type:int

Parameter:

TypeParameterName
struct file *filp
void __user *_uarg
23  inode = file_inode(filp)
24  __user * uarg = _uarg
29  vi = fsverity_get_info(inode)
30  If Not vi Then Return -ENODATA
32  hash_alg = he hash algorithm
40  If Get a simple variable from user space( input/output , & input/output ) Then Return -EFAULT
42  If input/output < digest size in bytes, e.g. 32 for SHA-256 Then Return -EOVERFLOW
45  memset( & arg, 0, size of arg )
46  digest_algorithm = hash_alg - The hash algorithms supported by fs-verity
47  input/output = digest size in bytes, e.g. 32 for SHA-256
49  If copy_to_user(uarg, & arg, size of arg ) Then Return -EFAULT
52  If copy_to_user(digest, measurement, digest size in bytes, e.g. 32 for SHA-256 ) Then Return -EFAULT
55  Return 0