<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/bpf/prog_tests/bad_struct_ops.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-06T23:18:15Z</updated>
<entry>
<title>selftests/bpf: Verify struct_ops autoload/autocreate sync</title>
<updated>2024-03-06T23:18:15Z</updated>
<author>
<name>Eduard Zingerman</name>
</author>
<published>2024-03-06T10:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=651d49f15b2a84b3bcfe950fa99c3672b9619dbd'/>
<id>urn:sha1:651d49f15b2a84b3bcfe950fa99c3672b9619dbd</id>
<content type='text'>
Check that autocreate flags of struct_ops map cause autoload of
struct_ops corresponding programs:
- when struct_ops program is referenced only from a map for which
  autocreate is set to false, that program should not be loaded;
- when struct_ops program with autoload == false is set to be used
  from a map with autocreate == true using shadow var,
  that program should be loaded;
- when struct_ops program is not referenced from any map object load
  should fail.

Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20240306104529.6453-10-eddyz87@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Bad_struct_ops test</title>
<updated>2024-03-06T23:18:15Z</updated>
<author>
<name>Eduard Zingerman</name>
</author>
<published>2024-03-06T10:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1b93c07b3ac3204c6a42a7f7b6217e36f44df4f'/>
<id>urn:sha1:c1b93c07b3ac3204c6a42a7f7b6217e36f44df4f</id>
<content type='text'>
When loading struct_ops programs kernel requires BTF id of the
struct_ops type and member index for attachment point inside that
type. This makes impossible to use same BPF program in several
struct_ops maps that have different struct_ops type.
Check if libbpf rejects such BPF objects files.

Signed-off-by: Eduard Zingerman &lt;eddyz87@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20240306104529.6453-7-eddyz87@gmail.com
</content>
</entry>
</feed>
