<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/test_btf.h, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-06-21T00:40:51Z</updated>
<entry>
<title>selftests/bpf: allow BTF specs and func infos in test_verifier tests</title>
<updated>2022-06-21T00:40:51Z</updated>
<author>
<name>Eduard Zingerman</name>
<email>eddyz87@gmail.com</email>
</author>
<published>2022-06-20T23:53:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a42008ca5c700819e4b3003025e5e1695fd1f86'/>
<id>urn:sha1:7a42008ca5c700819e4b3003025e5e1695fd1f86</id>
<content type='text'>
The BTF and func_info specification for test_verifier tests follows
the same notation as in prog_tests/btf.c tests. E.g.:

  ...
  .func_info = { { 0, 6 }, { 8, 7 } },
  .func_info_cnt = 2,
  .btf_strings = "\0int\0",
  .btf_types = {
    BTF_TYPE_INT_ENC(1, BTF_INT_SIGNED, 0, 32, 4),
    BTF_PTR_ENC(1),
  },
  ...

The BTF specification is loaded only when specified.

Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/r/20220620235344.569325-3-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add BTF_KIND_ENUM64 unit tests</title>
<updated>2022-06-07T17:20:44Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2022-06-07T06:27:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b5325186dfad5ad2b2d8f7e8a79662de1b2749d'/>
<id>urn:sha1:3b5325186dfad5ad2b2d8f7e8a79662de1b2749d</id>
<content type='text'>
Add unit tests for basic BTF_KIND_ENUM64 encoding.

Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/r/20220607062708.3724845-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add BTF_KIND_TYPE_TAG unit tests</title>
<updated>2021-11-12T01:41:11Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2021-11-12T01:26:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6aa5dabc9d0ef722905e4ca4f9751d70cf3ec8a4'/>
<id>urn:sha1:6aa5dabc9d0ef722905e4ca4f9751d70cf3ec8a4</id>
<content type='text'>
Add BTF_KIND_TYPE_TAG unit tests.

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;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211112012630.1506095-1-yhs@fb.com
</content>
</entry>
<entry>
<title>bpf: Rename BTF_KIND_TAG to BTF_KIND_DECL_TAG</title>
<updated>2021-10-19T01:35:36Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2021-10-12T16:48:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=223f903e9c832699f4e5f422281a60756c1c6cfe'/>
<id>urn:sha1:223f903e9c832699f4e5f422281a60756c1c6cfe</id>
<content type='text'>
Patch set [1] introduced BTF_KIND_TAG to allow tagging
declarations for struct/union, struct/union field, var, func
and func arguments and these tags will be encoded into
dwarf. They are also encoded to btf by llvm for the bpf target.

After BTF_KIND_TAG is introduced, we intended to use it
for kernel __user attributes. But kernel __user is actually
a type attribute. Upstream and internal discussion showed
it is not a good idea to mix declaration attribute and
type attribute. So we proposed to introduce btf_type_tag
as a type attribute and existing btf_tag renamed to
btf_decl_tag ([2]).

This patch renamed BTF_KIND_TAG to BTF_KIND_DECL_TAG and some
other declarations with *_tag to *_decl_tag to make it clear
the tag is for declaration. In the future, BTF_KIND_TYPE_TAG
might be introduced per [3].

 [1] https://lore.kernel.org/bpf/20210914223004.244411-1-yhs@fb.com/
 [2] https://reviews.llvm.org/D111588
 [3] https://reviews.llvm.org/D111199

Fixes: b5ea834dde6b ("bpf: Support for new btf kind BTF_KIND_TAG")
Fixes: 5b84bd10363e ("libbpf: Add support for BTF_KIND_TAG")
Fixes: 5c07f2fec003 ("bpftool: Add support for BTF_KIND_TAG")
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/20211012164838.3345699-1-yhs@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add BTF_KIND_TAG unit tests</title>
<updated>2021-09-15T01:45:52Z</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2021-09-14T22:30:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=35baba7a832fa466b4aa2e0d00473d795cec8f20'/>
<id>urn:sha1:35baba7a832fa466b4aa2e0d00473d795cec8f20</id>
<content type='text'>
Test good and bad variants of BTF_KIND_TAG encoding.

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;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210914223047.248223-1-yhs@fb.com
</content>
</entry>
<entry>
<title>selftest/bpf: Add BTF_KIND_FLOAT tests</title>
<updated>2021-03-05T01:58:16Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2021-02-26T20:22:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7e72aad3a15c06e40e3ccd2352e5010e978f1acf'/>
<id>urn:sha1:7e72aad3a15c06e40e3ccd2352e5010e978f1acf</id>
<content type='text'>
Test the good variants as well as the potential malformed ones.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210226202256.116518-8-iii@linux.ibm.com
</content>
</entry>
<entry>
<title>bpf: Refactor BTF encoding macro to test_btf.h</title>
<updated>2019-04-27T16:07:05Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>kafai@fb.com</email>
</author>
<published>2019-04-26T23:39:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3f4d4c74101d60b88d23289bd4f5f6126c7235fc'/>
<id>urn:sha1:3f4d4c74101d60b88d23289bd4f5f6126c7235fc</id>
<content type='text'>
Refactor common BTF encoding macros for other tests to use.
The libbpf may reuse some of them in the future  which requires
some more thoughts before publishing as a libbpf API.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
