Lines Matching full:program
34 A BPF iterator is a type of BPF program that allows users to iterate over
45 A BPF program is always loaded into the kernel at the behest of a user space
46 process. A user space process loads a BPF program by opening and initializing
47 the program skeleton as required and then invoking a syscall to have the BPF
48 program verified and loaded by the kernel.
50 In traditional tracing programs, a program is activated by having user space
51 obtain a ``bpf_link`` to the program with ``bpf_program__attach()``. Once
52 activated, the program callback will be invoked whenever the tracepoint is
54 program is obtained using ``bpf_link_create()``, and the program callback is
66 a BPF iterator program. To begin, we’ll look at `bpf_iter.c
69 Later, we’ll look at a BPF program that runs in kernel space.
74 * The BPF program is loaded into the kernel through ``libbpf``. Once the kernel
75 has verified and loaded the program, it returns a file descriptor (fd) to user
77 * Obtain a ``link_fd`` to the BPF program by calling the ``bpf_link_create()``
78 specified with the BPF program file descriptor received from the kernel.
121 so they won't go away when the BPF program runs.
157 the program is a BPF iterator program to iterate all files from all tasks. The
158 context of the program is ``bpf_iter__task_file`` struct.
160 The user space program invokes the BPF iterator program running in the kernel
162 program can export data to user space using a variety of BPF helper functions.
187 Implement Kernel Support for BPF Iterator Program Types
233 - Specifies the verifier states for BPF program arguments associated with
257 from iteration by allowing user space to configure the iterator program when it
261 BPF Task Iterator Program
264 The following code is a BPF iterator program to print files and task information
265 through the ``seq_file`` of the iterator. It is a standard BPF iterator program
266 that visits every file of an iterator. We will use this BPF program in our
321 Now, in the userspace program, pass the pointer of struct to the
334 The whole program looks like the following code:
398 The following lines are the output of the program.
419 processes in the system. In this case, the BPF program has to check the pid or
422 BPF program to pass a *pid* to the BPF program.
424 The BPF program would look like the following block.
442 The user space program would look like the following block:
461 ``target_pid`` is a global variable in the BPF program. The user space program
463 processes in the BPF program. When you parametrize a BPF iterator, the iterator
464 calls the BPF program fewer times which can save significant resources.
480 BPF program receives these tasks one after another. You can specify a BPF task