<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/bpf/prog_tests/module_attach.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-27T22:13:08+00:00</updated>
<entry>
<title>selftests/bpf: Fix typos and grammar in test sources</title>
<updated>2025-08-27T22:13:08+00:00</updated>
<author>
<name>Shubham Sharma</name>
<email>slopixelz@gmail.com</email>
</author>
<published>2025-08-26T12:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3abefe897408718799ae3bd06295b89b870a38e'/>
<id>urn:sha1:d3abefe897408718799ae3bd06295b89b870a38e</id>
<content type='text'>
Fix spelling typos and grammar errors in BPF selftests source code.

Signed-off-by: Shubham Sharma &lt;slopixelz@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250826125746.17983-1-slopixelz@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: add tests for the "module: Function" syntax</title>
<updated>2024-05-01T16:53:48+00:00</updated>
<author>
<name>Viktor Malik</name>
<email>vmalik@redhat.com</email>
</author>
<published>2024-04-30T09:38:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=960635887c967338fd567def3e7905a294f5002b'/>
<id>urn:sha1:960635887c967338fd567def3e7905a294f5002b</id>
<content type='text'>
The previous patch added support for the "module:function" syntax for
tracing programs. This adds tests for explicitly specifying the module
name via the SEC macro and via the bpf_program__set_attach_target call.

Signed-off-by: Viktor Malik &lt;vmalik@redhat.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/8a076168ed847f7c8a6c25715737b1fea84e38be.1714469650.git.vmalik@redhat.com
</content>
</entry>
<entry>
<title>selftests/bpf: Use un/load_bpf_testmod functions in tests</title>
<updated>2023-05-17T05:09:23+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2023-05-15T13:37:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11642eb92b3bc67171b23abff0d062758c5a4730'/>
<id>urn:sha1:11642eb92b3bc67171b23abff0d062758c5a4730</id>
<content type='text'>
Now that we have un/load_bpf_testmod helpers in testing_helpers.h,
we can use it in other tests and save some lines.

Acked-by: David Vernet &lt;void@manifault.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/r/20230515133756.1658301-7-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Add kprobe_multi check to module attach test</title>
<updated>2022-10-25T17:14:51+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2022-10-25T13:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e697d8dcebd2f557fa5e5ed57aaf0a9992ce9df8'/>
<id>urn:sha1:e697d8dcebd2f557fa5e5ed57aaf0a9992ce9df8</id>
<content type='text'>
Adding test that makes sure the kernel module won't be removed
if there's kprobe multi link defined on top of it.

Acked-by: Song Liu &lt;song@kernel.org&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Link: https://lore.kernel.org/r/20221025134148.3300700-8-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf/selftests: Add test for writable bare tracepoint</title>
<updated>2021-10-08T20:22:57+00:00</updated>
<author>
<name>Hou Tao</name>
<email>houtao1@huawei.com</email>
</author>
<published>2021-10-04T09:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa7f17d066bd0996b930b664aa0ed1f213fc1828'/>
<id>urn:sha1:fa7f17d066bd0996b930b664aa0ed1f213fc1828</id>
<content type='text'>
Add a writable bare tracepoint in bpf_testmod module, and
trigger its calling when reading /sys/kernel/bpf_testmod
with a specific buffer length. The reading will return
the value in writable context if the early return flag
is enabled in writable context.

Signed-off-by: Hou Tao &lt;houtao1@huawei.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/20211004094857.30868-4-hotforest@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add test for bpf_get_branch_snapshot</title>
<updated>2021-09-13T17:53:50+00:00</updated>
<author>
<name>Song Liu</name>
<email>songliubraving@fb.com</email>
</author>
<published>2021-09-10T18:33:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=025bd7c753aab18cd594924a46ab46ac47209df9'/>
<id>urn:sha1:025bd7c753aab18cd594924a46ab46ac47209df9</id>
<content type='text'>
This test uses bpf_get_branch_snapshot from a fexit program. The test uses
a target function (bpf_testmod_loop_test) and compares the record against
kallsyms. If there isn't enough record matching kallsyms, the test fails.

Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20210910183352.3151445-4-songliubraving@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Test that module can't be unloaded with attached trampoline</title>
<updated>2021-04-26T04:09:02+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2021-04-14T19:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1c05c3b09e0a92b26b94650837bf06c664beb1b'/>
<id>urn:sha1:a1c05c3b09e0a92b26b94650837bf06c664beb1b</id>
<content type='text'>
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&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/20210414195147.1624932-7-jolsa@kernel.org
</content>
</entry>
<entry>
<title>selftests: bpf: Add a new test for bare tracepoints</title>
<updated>2021-01-20T22:14:05+00:00</updated>
<author>
<name>Qais Yousef</name>
<email>qais.yousef@arm.com</email>
</author>
<published>2021-01-19T12:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=407be92206d54517765e028c8b79032eb8f8ac86'/>
<id>urn:sha1:407be92206d54517765e028c8b79032eb8f8ac86</id>
<content type='text'>
Reuse module_attach infrastructure to add a new bare tracepoint to check
we can attach to it as a raw tracepoint.

Signed-off-by: Qais Yousef &lt;qais.yousef@arm.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20210119122237.2426878-3-qais.yousef@arm.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add set_attach_target() API selftest for module target</title>
<updated>2020-12-14T15:39:42+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2020-12-11T21:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e33f831fccd2df83836a8e255755f85d364aaeb'/>
<id>urn:sha1:2e33f831fccd2df83836a8e255755f85d364aaeb</id>
<content type='text'>
Add test for bpf_program__set_attach_target() API, validating it can find
kernel module fentry target.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/20201211215825.3646154-3-andrii@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: Add fentry/fexit/fmod_ret selftest for kernel module</title>
<updated>2020-12-04T01:38:21+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2020-12-03T20:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e38abefcfd65f3ef7b12895dfd48db80aca28da'/>
<id>urn:sha1:1e38abefcfd65f3ef7b12895dfd48db80aca28da</id>
<content type='text'>
Add new selftest checking attachment of fentry/fexit/fmod_ret (and raw
tracepoint ones for completeness) BPF programs to kernel module function.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201203204634.1325171-15-andrii@kernel.org
</content>
</entry>
</feed>
