<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/lib/bpf, branch v6.3</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=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-03-10T18:19:25Z</updated>
<entry>
<title>libbpf: Revert poisoning of strlcpy</title>
<updated>2023-03-10T18:19:25Z</updated>
<author>
<name>Jesus Sanchez-Palencia</name>
<email>jesussanp@google.com</email>
</author>
<published>2023-03-09T00:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6f7ff9dd387861fa30cbc6375d15b586da17d33'/>
<id>urn:sha1:d6f7ff9dd387861fa30cbc6375d15b586da17d33</id>
<content type='text'>
This reverts commit 6d0c4b11e743("libbpf: Poison strlcpy()").

It added the pragma poison directive to libbpf_internal.h to protect
against accidental usage of strlcpy but ended up breaking the build for
toolchains based on libcs which provide the strlcpy() declaration from
string.h (e.g. uClibc-ng). The include order which causes the issue is:

    string.h,
    from Iibbpf_common.h:12,
    from libbpf.h:20,
    from libbpf_internal.h:26,
    from strset.c:9:

Fixes: 6d0c4b11e743 ("libbpf: Poison strlcpy()")
Signed-off-by: Jesus Sanchez-Palencia &lt;jesussanp@google.com&gt;
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/20230309004836.2808610-1-jesussanp@google.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()</title>
<updated>2023-02-16T23:32:45Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-02-14T23:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=629dfc660cae86a6a48d19f5295226d03caae673'/>
<id>urn:sha1:629dfc660cae86a6a48d19f5295226d03caae673</id>
<content type='text'>
Use the new type-safe wrappers around bpf_obj_get_info_by_fd().

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230214231221.249277-3-iii@linux.ibm.com
</content>
</entry>
<entry>
<title>libbpf: Introduce bpf_{btf,link,map,prog}_get_info_by_fd()</title>
<updated>2023-02-16T23:32:36Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-02-14T23:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55a9ed0e16baf4d025c160d46bc1e3fac0d4cdc4'/>
<id>urn:sha1:55a9ed0e16baf4d025c160d46bc1e3fac0d4cdc4</id>
<content type='text'>
These are type-safe wrappers around bpf_obj_get_info_by_fd(). They
found one problem in selftests, and are also useful for adding
Memory Sanitizer annotations.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230214231221.249277-2-iii@linux.ibm.com
</content>
</entry>
<entry>
<title>libbpf: Fix alen calculation in libbpf_nla_dump_errormsg()</title>
<updated>2023-02-10T23:27:22Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-02-10T00:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17bcd27a08a21397698edf143084d7c87ce17946'/>
<id>urn:sha1:17bcd27a08a21397698edf143084d7c87ce17946</id>
<content type='text'>
The code assumes that everything that comes after nlmsgerr are nlattrs.
When calculating their size, it does not account for the initial
nlmsghdr. This may lead to accessing uninitialized memory.

Fixes: bbf48c18ee0c ("libbpf: add error reporting in XDP")
Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230210001210.395194-8-iii@linux.ibm.com
</content>
</entry>
<entry>
<title>libbpf: Add sample_period to creation options</title>
<updated>2023-02-08T23:27:39Z</updated>
<author>
<name>Jon Doron</name>
<email>jond@wiz.io</email>
</author>
<published>2023-02-07T08:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab8684b8cecf711cc9e47c1cbb1a8f4b549f8893'/>
<id>urn:sha1:ab8684b8cecf711cc9e47c1cbb1a8f4b549f8893</id>
<content type='text'>
Add option to set when the perf buffer should wake up, by default the
perf buffer becomes signaled for every event that is being pushed to it.

In case of a high throughput of events it will be more efficient to wake
up only once you have X events ready to be read.

So your application can wakeup once and drain the entire perf buffer.

Signed-off-by: Jon Doron &lt;jond@wiz.io&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230207081916.3398417-1-arilou@gmail.com
</content>
</entry>
<entry>
<title>libbpf: Always use libbpf_err to return an error in bpf_xdp_query()</title>
<updated>2023-02-07T21:56:11Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2023-02-07T11:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02fc0e73e852f78ec374004f924b9d84275d0006'/>
<id>urn:sha1:02fc0e73e852f78ec374004f924b9d84275d0006</id>
<content type='text'>
In order to properly set errno, rely on libbpf_err utility routine in
bpf_xdp_query() to return an error to the caller.

Fixes: 04d58f1b26a4 ("libbpf: add API to get XDP/XSK supported features")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Link: https://lore.kernel.org/bpf/827d40181f9f90fb37702f44328e1614df7c0503.1675768112.git.lorenzo@kernel.org
</content>
</entry>
<entry>
<title>libbpf: Correctly set the kernel code version in Debian kernel.</title>
<updated>2023-02-06T22:30:50Z</updated>
<author>
<name>Hao Xiang</name>
<email>hao.xiang@bytedance.com</email>
</author>
<published>2023-02-03T23:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1d7730ff8756c6db20ff82096b577d8cfbaf547'/>
<id>urn:sha1:d1d7730ff8756c6db20ff82096b577d8cfbaf547</id>
<content type='text'>
In a previous commit, Ubuntu kernel code version is correctly set
by retrieving the information from /proc/version_signature.

commit&lt;5b3d72987701d51bf31823b39db49d10970f5c2d&gt;
(libbpf: Improve LINUX_VERSION_CODE detection)

The /proc/version_signature file doesn't present in at least the
older versions of Debian distributions (eg, Debian 9, 10). The Debian
kernel has a similar issue where the release information from uname()
syscall doesn't give the kernel code version that matches what the
kernel actually expects. Below is an example content from Debian 10.

release: 4.19.0-23-amd64
version: #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64

Debian reports incorrect kernel version in utsname::release returned
by uname() syscall, which in older kernels (Debian 9, 10) leads to
kprobe BPF programs failing to load due to the version check mismatch.

Fortunately, the correct kernel code version presents in the
utsname::version returned by uname() syscall in Debian kernels. This
change adds another get kernel version function to handle Debian in
addition to the previously added get kernel version function to handle
Ubuntu. Some minor refactoring work is also done to make the code more
readable.

Signed-off-by: Hao Xiang &lt;hao.xiang@bytedance.com&gt;
Signed-off-by: Ho-Ren (Jack) Chuang &lt;horenchuang@bytedance.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230203234842.2933903-1-hao.xiang@bytedance.com
</content>
</entry>
<entry>
<title>libbpf: add API to get XDP/XSK supported features</title>
<updated>2023-02-03T04:48:24Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2023-02-01T10:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04d58f1b26a436c429581d286528ea3c01624462'/>
<id>urn:sha1:04d58f1b26a436c429581d286528ea3c01624462</id>
<content type='text'>
Extend bpf_xdp_query routine in order to get XDP/XSK supported features
of netdev over route netlink interface.
Extend libbpf netlink implementation in order to support netlink_generic
protocol.

Co-developed-by: Kumar Kartikeya Dwivedi &lt;memxor@gmail.com&gt;
Signed-off-by: Kumar Kartikeya Dwivedi &lt;memxor@gmail.com&gt;
Co-developed-by: Marek Majtyka &lt;alardam@gmail.com&gt;
Signed-off-by: Marek Majtyka &lt;alardam@gmail.com&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/a72609ef4f0de7fee5376c40dbf54ad7f13bfb8d.1675245258.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: add the capability to specify netlink proto in libbpf_netlink_send_recv</title>
<updated>2023-02-03T04:48:23Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2023-02-01T10:24:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f1669319c31dcdd07ae292822c9455aeb3bc7c7'/>
<id>urn:sha1:8f1669319c31dcdd07ae292822c9455aeb3bc7c7</id>
<content type='text'>
This is a preliminary patch in order to introduce netlink_generic
protocol support to libbpf.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/7878a54667e74afeec3ee519999c044bd514b44c.1675245258.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x</title>
<updated>2023-01-28T20:45:14Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-01-28T00:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42fae973c2b168d527c8b4f6a02828ecd1e19626'/>
<id>urn:sha1:42fae973c2b168d527c8b4f6a02828ecd1e19626</id>
<content type='text'>
BPF_PROBE_READ_INTO() and BPF_PROBE_READ_STR_INTO() should map to
bpf_probe_read() and bpf_probe_read_str() respectively in order to work
correctly on architectures with !ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20230128000650.1516334-24-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
