<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/lib/bpf, branch v6.7.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-24T23:06:58+00:00</updated>
<entry>
<title>libbpf: Add link-based API for netkit</title>
<updated>2023-10-24T23:06:58+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2023-10-24T21:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05c31b4ab20527c4d1695130aaecc54ef59a0e54'/>
<id>urn:sha1:05c31b4ab20527c4d1695130aaecc54ef59a0e54</id>
<content type='text'>
This adds bpf_program__attach_netkit() API to libbpf. Overall it is very
similar to tcx. The API looks as following:

  LIBBPF_API struct bpf_link *
  bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex,
                             const struct bpf_netkit_opts *opts);

The struct bpf_netkit_opts is done in similar way as struct bpf_tcx_opts
for supporting bpf_mprog control parameters. The attach location for the
primary and peer device is derived from the program section "netkit/primary"
and "netkit/peer", respectively.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20231024214904.29825-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Don't assume SHT_GNU_verdef presence for SHT_GNU_versym section</title>
<updated>2023-10-17T09:43:20+00:00</updated>
<author>
<name>Andrii Nakryiko</name>
<email>andrii@kernel.org</email>
</author>
<published>2023-10-16T18:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=137df1189d128a6b5dee2f653e054b40ef36b94c'/>
<id>urn:sha1:137df1189d128a6b5dee2f653e054b40ef36b94c</id>
<content type='text'>
Fix too eager assumption that SHT_GNU_verdef ELF section is going to be
present whenever binary has SHT_GNU_versym section. It seems like either
SHT_GNU_verdef or SHT_GNU_verneed can be used, so failing on missing
SHT_GNU_verdef actually breaks use cases in production.

One specific reported issue, which was used to manually test this fix,
was trying to attach to `readline` function in BASH binary.

Fixes: bb7fa09399b9 ("libbpf: Support symbol versioning for uprobe")
Reported-by: Liam Wisehart &lt;liamwisehart@meta.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Tested-by: Manu Bretelle &lt;chantr4@gmail.com&gt;
Reviewed-by: Fangrui Song &lt;maskray@google.com&gt;
Acked-by: Hengqi Chen &lt;hengqi.chen@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20231016182840.4033346-1-andrii@kernel.org
</content>
</entry>
<entry>
<title>libbpf: Add support for cgroup unix socket address hooks</title>
<updated>2023-10-12T00:27:55+00:00</updated>
<author>
<name>Daan De Meyer</name>
<email>daan.j.demeyer@gmail.com</email>
</author>
<published>2023-10-11T18:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf90438c78df885c17a3474276ed39abb4a7c026'/>
<id>urn:sha1:bf90438c78df885c17a3474276ed39abb4a7c026</id>
<content type='text'>
Add the necessary plumbing to hook up the new cgroup unix sockaddr
hooks into libbpf.

Signed-off-by: Daan De Meyer &lt;daan.j.demeyer@gmail.com&gt;
Link: https://lore.kernel.org/r/20231011185113.140426-6-daan.j.demeyer@gmail.com
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
</content>
</entry>
<entry>
<title>libbpf: Fix syscall access arguments on riscv</title>
<updated>2023-10-04T20:19:13+00:00</updated>
<author>
<name>Alexandre Ghiti</name>
<email>alexghiti@rivosinc.com</email>
</author>
<published>2023-10-04T11:09:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a412c5c1cd6cc6c55e8b9b84fbb789fc395fe78'/>
<id>urn:sha1:8a412c5c1cd6cc6c55e8b9b84fbb789fc395fe78</id>
<content type='text'>
Since commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers"), riscv
selects ARCH_HAS_SYSCALL_WRAPPER so let's use the generic implementation
of PT_REGS_SYSCALL_REGS().

Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers")
Signed-off-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Link: https://lore.kernel.org/bpf/20231004110905.49024-2-bjorn@kernel.org
</content>
</entry>
<entry>
<title>libbpf: Allow Golang symbols in uprobe secdef</title>
<updated>2023-09-29T21:32:20+00:00</updated>
<author>
<name>Hengqi Chen</name>
<email>hengqi.chen@gmail.com</email>
</author>
<published>2023-09-29T15:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2147c8d07e1abc8dfc3433ca18eed5295e230ede'/>
<id>urn:sha1:2147c8d07e1abc8dfc3433ca18eed5295e230ede</id>
<content type='text'>
Golang symbols in ELF files are different from C/C++
which contains special characters like '*', '(' and ')'.
With generics, things get more complicated, there are
symbols like:

  github.com/cilium/ebpf/internal.(*Deque[go.shape.interface { Format(fmt.State, int32); TypeName() string;github.com/cilium/ebpf/btf.copy() github.com/cilium/ebpf/btf.Type}]).Grow

Matching such symbols using `%m[^\n]` in sscanf, this
excludes newline which typically does not appear in ELF
symbols. This should work in most use-cases and also
work for unicode letters in identifiers. If newline do
show up in ELF symbols, users can still attach to such
symbol by specifying bpf_uprobe_opts::func_name.

A working example can be found at this repo ([0]).

  [0]: https://github.com/chenhengqi/libbpf-go-symbols

Suggested-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Hengqi Chen &lt;hengqi.chen@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230929155954.92448-1-hengqi.chen@gmail.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__consume</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16058ff28b7eedd62f1643beb841e3bd611674fe'/>
<id>urn:sha1:16058ff28b7eedd62f1643beb841e3bd611674fe</id>
<content type='text'>
Add ring__consume to consume a single ringbuffer, analogous to
ring_buffer__consume.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-14-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__map_fd</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae769390377adaec2798bd1a69171f00d0a25be0'/>
<id>urn:sha1:ae769390377adaec2798bd1a69171f00d0a25be0</id>
<content type='text'>
Add ring__map_fd to get the file descriptor underlying a given
ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-12-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__size</title>
<updated>2023-09-25T23:22:43+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e79abf717fce6439022547124571dfe17f2ac15a'/>
<id>urn:sha1:e79abf717fce6439022547124571dfe17f2ac15a</id>
<content type='text'>
Add ring__size to get the total size of a given ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-10-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__avail_data_size</title>
<updated>2023-09-25T23:22:42+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b34d2972612299fb38ad7f3c2bc62c2d03237f3'/>
<id>urn:sha1:3b34d2972612299fb38ad7f3c2bc62c2d03237f3</id>
<content type='text'>
Add ring__avail_data_size for querying the currently available data in
the ringbuffer, similar to the BPF_RB_AVAIL_DATA flag in
bpf_ringbuf_query. This is racy during ongoing operations but is still
useful for overall information on how a ringbuffer is behaving.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-8-martin.kelly@crowdstrike.com
</content>
</entry>
<entry>
<title>libbpf: Add ring__producer_pos, ring__consumer_pos</title>
<updated>2023-09-25T23:22:42+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>martin.kelly@crowdstrike.com</email>
</author>
<published>2023-09-25T21:50:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=059a8c0c5acd37ecfa64f1832e8765d30f253ce8'/>
<id>urn:sha1:059a8c0c5acd37ecfa64f1832e8765d30f253ce8</id>
<content type='text'>
Add APIs to get the producer and consumer position for a given
ringbuffer.

Signed-off-by: Martin Kelly &lt;martin.kelly@crowdstrike.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20230925215045.2375758-6-martin.kelly@crowdstrike.com
</content>
</entry>
</feed>
