Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_prog_test_run

Proto:static int bpf_prog_test_run(const union bpf_attr *attr, union bpf_attr __user *uattr)

Type:int

Parameter:

TypeParameterName
const union bpf_attr *attr
union bpf_attr __user *uattr
2252  ret = -Operation is not supported
2254  If Not Check operation authority Then Return -EPERM
2256  If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_PROG_TEST_RUN) Then Return -EINVAL
2259  If ctx_size_in && Not ctx_in || Not input: len of ctx_in && ctx_in Then Return -EINVAL
2263  If input/output: len of ctx_out * returns ENOSPC if ctx_out * is too small. && Not ctx_out || Not input/output: len of ctx_out * returns ENOSPC if ctx_out * is too small. && ctx_out Then Return -EINVAL
2267  prog = bpf_prog_get( anonymous struct used by BPF_PROG_TEST_RUN command )
2268  If IS_ERR(prog) Then Return PTR_ERR(prog)
2271  If test_run Then ret = test_run(prog, attr, uattr)
2274  bpf_prog_put(prog)
2275  Return ret