Lines Matching refs:kernel_fd
57 safe_close(p->kernel_fd); in bpf_program_free()
101 .kernel_fd = -1, in bpf_program_new()
124 .kernel_fd = -1, in bpf_program_new_from_bpffs_path()
131 r = bpf_program_get_info_by_fd(p->kernel_fd, &info, sizeof(info)); in bpf_program_new_from_bpffs_path()
146 if (p->kernel_fd >= 0) /* don't allow modification after we uploaded things to the kernel */ in bpf_program_add_instructions()
163 if (p->kernel_fd >= 0) { /* make this idempotent */ in bpf_program_load_kernel()
183 p->kernel_fd = bpf(BPF_PROG_LOAD, &attr, sizeof(attr)); in bpf_program_load_kernel()
184 if (p->kernel_fd < 0) in bpf_program_load_kernel()
195 if (p->kernel_fd >= 0) /* don't overwrite an assembled or loaded program */ in bpf_program_load_from_bpf_fs()
201 p->kernel_fd = bpf(BPF_OBJ_GET, &attr, sizeof(attr)); in bpf_program_load_from_bpf_fs()
202 if (p->kernel_fd < 0) in bpf_program_load_from_bpf_fs()
257 attr.attach_bpf_fd = p->kernel_fd; in bpf_program_cgroup_attach()
292 attr.attach_bpf_fd = p->kernel_fd; in bpf_program_cgroup_detach()
375 assert(p->kernel_fd >= 0); in bpf_program_serialize_attachment()
381 copy = fdset_put_dup(fds, p->kernel_fd); in bpf_program_serialize_attachment()
468 .kernel_fd = TAKE_FD(fd), in bpf_program_deserialize_attachment()