Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-28 12:51:37
Last Modify:2022-05-19 18:06:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int bpf_check_uarg_tail_zero(void __user *uaddr, size_t expected_size, size_t actual_size)

Type:int

Parameter:

TypeParameterName
void __user *uaddr
size_texpected_size
size_tactual_size
68  __user * addr
69  __user * end
73  If Value for the false possibility is greater at compile time(actual_size > PAGE_SIZE) Then Return -E2BIG
76  If Value for the false possibility is greater at compile time(!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)) Then Return -EFAULT
79  If actual_size <= expected_size Then Return 0
82  addr = uaddr + expected_size
83  end = uaddr + actual_size
85  When addr < end cycle
86  err = Get a simple variable from user space(val, addr)
87  If err Then Return err
89  If val Then Return -E2BIG
93  Return 0
Caller
NameDescribe
bpf_prog_get_info_by_fd
bpf_map_get_info_by_fd
bpf_btf_get_info_by_fd
check_btf_func
check_btf_line