Function report |
Source Code:kernel\bpf\syscall.c |
Create Date:2022-07-28 12:54:09 |
| Last Modify:2022-05-19 18:06:12 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bpf_prog_get_fd_by_id
Proto:static int bpf_prog_get_fd_by_id(const union bpf_attr *attr)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const union bpf_attr * | attr |
| 2314 | If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_PROG_GET_FD_BY_ID) Then Return -EINVAL |
| 2317 | If Not Check operation authority Then Return -EPERM |
| 2320 | spin_lock_bh( & prog_idr_lock) |
| 2322 | If prog Then prog = prog_idr_lock should have been held |
| 2326 | spin_unlock_bh( & prog_idr_lock) |
| 2331 | fd = bpf_prog_new_fd(prog) |
| 2332 | If fd < 0 Then bpf_prog_put(prog) |
| 2335 | Return fd |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |