函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-29 10:31:25
Last Modify:2020-03-18 10:18:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:compat_rw_copy_check_uvector

函数原型:ssize_t compat_rw_copy_check_uvector(int type, const struct compat_iovec __user *uvector, unsigned long nr_segs, unsigned long fast_segs, struct iovec *fast_pointer, struct iovec **ret_pointer)

返回类型:ssize_t

参数:

类型参数名称
inttype
const struct compat_iovec __user *uvector
unsigned longnr_segs
unsigned longfast_segs
struct iovec *fast_pointer
struct iovec **ret_pointer
846  iov等于ret_pointer等于fast_pointer
847  ret等于0
855  如果nr_segs恒等于0则转到:out
858  ret等于负EINVAL
859  如果nr_segs大于UIO_MAXIOV则转到:out
861  如果nr_segs大于fast_segs
862  ret等于负ENOMEM
863  iov等于分配数组内存
864  如果(iov == NULL)则转到:out
867  ret_pointer等于iov
869  ret等于负EFAULT
870  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(uvector, nr_segs * uvector的长度)则转到:out
881  tot_len等于0
882  ret等于负EINVAL
883 seg小于nr_segs循环
889  ret等于负EFAULT
890  转到:out
892  如果len小于0则转到:out
896  ret等于负EFAULT
897  转到:out
899  如果len大于MAX_RW_COUNTtot_lenlen等于MAX_RW_COUNTtot_len
901  tot_len加等于len
902  BSD uses caddr_t (1003.1g requires void *) 等于A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
903  Must be size_t (1003.1g) 等于len
904  uvector自加
905  iov自加
907  ret等于tot_len
909  out :
910  返回:ret
调用者
名称描述
compat_import_iovec
compat_process_vm_rw