函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-27 14:04:04
Last Modify:2022-05-19 18:06:12 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:If we're handed a bigger struct than we know of, ensure all the unknown bits* are 0 - i.e. new user-space does not rely on any kernel feature extensions* we don't know about yet.* There is a ToCToU between this function call and the following

函数原型:int bpf_check_uarg_tail_zero(void __user *uaddr, size_t expected_size, size_t actual_size)

返回类型:int

参数:

类型参数名称
void __user *uaddr
size_texpected_size
size_tactual_size
68  __useraddr
69  __userend
73  如果此条件成立可能性小(为编译器优化)(actual_size > PAGE_SIZE)则返回:负E2BIG
76  如果此条件成立可能性小(为编译器优化)(!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.(uaddr, actual_size))则返回:负EFAULT
79  如果actual_size小于等于expected_size则返回:0
82  addr等于uaddrexpected_size
83  end等于uaddractual_size
85 addr小于end循环
86  err等于Careful: we have to cast the result to the type of the pointer* for sign reasons(val, addr)
87  如果err则返回:err
89  如果val则返回:负E2BIG
93  返回:0
调用者
名称描述
bpf_prog_get_info_by_fd
bpf_map_get_info_by_fd
bpf_btf_get_info_by_fd
check_btf_func
check_btf_line