Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_tracing_prog_attach

Proto:static int bpf_tracing_prog_attach(struct bpf_prog *prog)

Type:int

Parameter:

TypeParameterName
struct bpf_prog *prog
1894  If For some prog types != BPF_TRACE_FENTRY && For some prog types != BPF_TRACE_FEXIT Then
1896  err = -EINVAL
1897  Go to out_put_prog
1900  err = bpf_trampoline_link_prog(prog)
1901  If err Then Go to out_put_prog
1904  tr_fd = anon_inode_getfd("bpf-tracing-prog", & bpf_tracing_prog_fops, prog, O_CLOEXEC)
1906  If tr_fd < 0 Then
1907  WARN_ON_ONCE(pf_trampoline_unlink_prog() should never fail. )
1908  err = tr_fd
1909  Go to out_put_prog
1911  Return tr_fd
1913  out_put_prog :
1914  bpf_prog_put(prog)
1915  Return err
Caller
NameDescribe
bpf_raw_tracepoint_open