Files
kernel_arpi/include/uapi/linux
Yonghong Song ac51d99bf8 bpf: Create anonymous bpf iterator
A new bpf command BPF_ITER_CREATE is added.

The anonymous bpf iterator is seq_file based.
The seq_file private data are referenced by targets.
The bpf_iter infrastructure allocated additional space
at seq_file->private before the space used by targets
to store some meta data, e.g.,
  prog:       prog to run
  session_id: an unique id for each opened seq_file
  seq_num:    how many times bpf programs are queried in this session
  done_stop:  an internal state to decide whether bpf program
              should be called in seq_ops->stop() or not

The seq_num will start from 0 for valid objects.
The bpf program may see the same seq_num more than once if
 - seq_file buffer overflow happens and the same object
   is retried by bpf_seq_read(), or
 - the bpf program explicitly requests a retry of the
   same object

Since module is not supported for bpf_iter, all target
registeration happens at __init time, so there is no
need to change bpf_iter_unreg_target() as it is used
mostly in error path of the init function at which time
no bpf iterators have been created yet.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200509175905.2475770-1-yhs@fb.com
2020-05-09 17:05:26 -07:00
..
2019-12-18 18:07:31 +01:00
2020-05-09 17:05:26 -07:00
2019-10-09 22:31:14 -04:00
2019-09-25 17:51:39 -07:00
2019-08-02 14:44:02 +10:00
2020-01-18 09:19:18 -05:00
2019-08-12 19:33:50 -07:00
2019-12-11 15:31:52 +01:00
2020-04-20 12:43:24 -07:00
2020-03-21 14:03:46 -06:00
2019-09-08 15:37:04 +02:00
2020-03-29 22:30:57 -07:00
2020-02-07 14:39:38 +09:00
2019-08-19 13:04:45 -07:00
2020-03-29 22:14:49 -07:00
2020-01-18 09:19:18 -05:00
2019-10-02 20:32:27 -06:00
2020-03-29 22:30:57 -07:00
2020-01-26 15:28:47 +01:00
2019-11-13 12:15:34 -08:00
2019-12-18 18:07:31 +01:00
2020-01-04 13:49:51 +08:00
2019-12-09 09:59:07 +01:00
2020-03-29 23:29:08 +02:00
2020-04-02 10:41:40 -04:00
2019-09-18 20:17:50 +02:00
2019-08-01 21:49:46 +02:00