<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/bpf/map_iter.c, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-05-13T19:30:50Z</updated>
<entry>
<title>bpf: Enable bpf_iter targets registering ctx argument types</title>
<updated>2020-05-13T19:30:50Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2020-05-13T18:02:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c32cc1bceba8a1755dc35cd97516f6c67856844'/>
<id>urn:sha1:3c32cc1bceba8a1755dc35cd97516f6c67856844</id>
<content type='text'>
Commit b121b341e598 ("bpf: Add PTR_TO_BTF_ID_OR_NULL
support") adds a field btf_id_or_null_non0_off to
bpf_prog-&gt;aux structure to indicate that the
first ctx argument is PTR_TO_BTF_ID reg_type and
all others are PTR_TO_BTF_ID_OR_NULL.
This approach does not really scale if we have
other different reg types in the future, e.g.,
a pointer to a buffer.

This patch enables bpf_iter targets registering ctx argument
reg types which may be different from the default one.
For example, for pointers to structures, the default reg_type
is PTR_TO_BTF_ID for tracing program. The target can register
a particular pointer type as PTR_TO_BTF_ID_OR_NULL which can
be used by the verifier to enforce accesses.

Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200513180221.2949882-1-yhs@fb.com
</content>
</entry>
<entry>
<title>bpf: net: Refactor bpf_iter target registration</title>
<updated>2020-05-13T19:30:50Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2020-05-13T18:02:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15172a46fa2796c1a1358a36babd31274716ed41'/>
<id>urn:sha1:15172a46fa2796c1a1358a36babd31274716ed41</id>
<content type='text'>
Currently bpf_iter_reg_target takes parameters from target
and allocates memory to save them. This is really not
necessary, esp. in the future we may grow information
passed from targets to bpf_iter manager.

The patch refactors the code so target reg_info
becomes static and bpf_iter manager can just take
a reference to it.

Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200513180219.2949605-1-yhs@fb.com
</content>
</entry>
<entry>
<title>bpf: Add bpf_map iterator</title>
<updated>2020-05-10T00:05:26Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2020-05-09T17:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6086d29def80edd78f9832ea6eafa74e3818f6a7'/>
<id>urn:sha1:6086d29def80edd78f9832ea6eafa74e3818f6a7</id>
<content type='text'>
Implement seq_file operations to traverse all bpf_maps.

Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200509175909.2476096-1-yhs@fb.com
</content>
</entry>
</feed>
