函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sverity_ioctl_enable() - enable verity on a file* Enable fs-verity on a file. See the "FS_IOC_ENABLE_VERITY" section of* Documentation/filesystems/fsverity.rst for the documentation.* Return: 0 on success, -errno on failure

函数原型:int fsverity_ioctl_enable(struct file *filp, const void __user *uarg)

返回类型:int

参数:

类型参数名称
struct file *filp
const void __user *uarg
301  inode等于file_inode(filp)
305  如果copy_from_user( & arg, uarg, arg的长度)则返回:负EFAULT
308  如果version不等于1则返回:负EINVAL
311  如果__reserved1memchr_inv - Find an unmatching character in an area of memory.*@start: The memory area*@c: Find a character other than c*@bytes: The size of the area.* returns the address of the first character other than @c, or %NULL则返回:负EINVAL
315  如果block_size不等于PAGE_SIZE则返回:负EINVAL
318  如果salt_size大于sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structfsverity_descriptor, salt)则返回:负EMSGSIZE
321  如果sig_size大于FS_VERITY_MAX_SIGNATURE_SIZE则返回:负EMSGSIZE
331  err等于de_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode
332  如果err则返回:err
335  如果IS_APPEND(inode)则返回:负EPERM
338  如果S_ISDIR(i_mode)则返回:负EISDIR
341  如果非S_ISREG(i_mode)则返回:负EINVAL
344  err等于mnt_want_write_file - get write access to a file's mount*@file: the file who's mount on which to take a write* This is like mnt_want_write, but it takes a file and can* do some optimisations if the file is open for write already
345  如果err则返回:err
348  err等于deny_write_access(filp)
349  如果err则转到:out_drop_write
352  err等于enable_verity(filp, & arg)
353  如果err则转到:out_allow_write_access
364  filemap_write_and_wait(i_mapping)
365  validate_inode_pages2 - remove all pages from an address_space*@mapping: the address_space* Any pages which are found to be mapped into pagetables are unmapped prior to* invalidation.* Return: -EBUSY if any pages could not be invalidated.
371  out_allow_write_access :
372  allow_write_access(filp)
373  out_drop_write :
374  mnt_drop_write_file(filp)
375  返回:err