+
Skip to content

Tags: cilium/ebpf

Tags

v0.19.0

Toggle v0.19.0's commit message
linker: do not error out when there is nothing in `/sys/kernel/btf`

9958a4f allowed to perform CO-RE
against all kernel modules, but introduced a small regression where
kernels with no BTF would fail to perform CO-RE with the manually
provided types. This commit fixes the issue by skipping the modules
BTF collection if there is nothing in `/sys/kernel/btf`.

Signed-off-by: Paul Cacheux <paul.cacheux@datadoghq.com>

v0.18.0

Toggle v0.18.0's commit message
golangci-lint: ignore QF1010 (convert byte slices to strings before p…

…rinting)

Printing a []byte and a string([]byte) are not the same thing. We typically print
bytes on purpose, so we don't need this linter.

Fixed one case where we should've been using t.Log instead of fmt.Println anyway.

Signed-off-by: Timo Beckers <timo@isovalent.com>

v0.17.3

Toggle v0.17.3's commit message
Fix ksym buffer overrun on 32 bit platforms

Commit 78074c5 ("info: expose more prog jited info"), which made its
way into v0.17.0, resulted in random runc CI failures when running i386
binary on an amd64 kernel (see [1]).

Apparently [2], the kernel always returns 64-bit pointers, so uint64
(rather than uintptr) should be used for ksyms slice regardless of
the platform to avoid the buffer overrun.

Now, to keep the public API of (*ProgramInfo).JitedKsymAddrs intact,
convert those addresses back to uintptr, as it was done before
commit 78074c5. Except, if the kernel address won't fit into an
uintptr (as it is the case when running i386 binary on an amd64 kernel),
return an empty slice and a false, rather than incorrect addresses.

[1]: opencontainers/runc#4594
[2]: https://github.com/torvalds/linux/blob/2014c95afecee3e76ca4a56956a936e23283f05b/kernel/bpf/syscall.c#L4840-L4846

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

v0.17.2

Toggle v0.17.2's commit message
internal: add OnLinux constant

Add a constant which indicates whether we are building for Linux.
This is so that we can write

	if !internal.OnLinux {

instead of

	if runtime.GOOS != "linux" {

This makes it easy to remove platform dependent code by removing the
constant and then fixing the breakage.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

v0.17.1

Toggle v0.17.1's commit message
prog: fix shadowing log size variable in verifier log retry loop

When ProgramOptions.LogSize was removed in 0.16, the tests weren't updated to
exercise the retry loop, since a minimum log size was chosen that was larger
than what the test program could generate.

With the addition of LogSizeStart, this notoriously fragile code broke when
logSize was again tracked as a separate variable, while being accidentally
shadowed within the scope of the for loop. This resulted in an endless loop
on kernels without the LogTrueSize field.

Remove the shadowing and fix the tests.

Signed-off-by: Timo Beckers <timo@isovalent.com>

v0.17.0

Toggle v0.17.0's commit message
examples: tcx: use Variable API

This commit updates the `example/tcx` program to use the new Variable API
rather than traditional bpf maps. The example already depends on `bpf_link`,
which requires kernel >= v6.6, therefore the Variable API is already
supported and working (since v5.5).

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>

v0.16.0

Toggle v0.16.0's commit message
map: remove misleading error message when creating without BTF

Time and time again people misunderstand errors like the following:

    map create: cannot allocate memory (without BTF k/v)

Instead of focusing on the ENOMEM they assume that it has something
to do with BTF. In reality it just means that creating a map has
failed, and we didn't supply any BTF during creation.

Avoid this confusion by removing the "without BTF k/v" part.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

v0.15.0

Toggle v0.15.0's commit message
program: don't return error when kmod BTF is disabled

In kernels where the flag CONFIG_DEBUG_INFO_BTF_MODULES is not set,
including kernels 5.10 and below (because the flag was introduced in 5.11),
loading a program that attaches to kernel module functions and relied on
CORE failed because the module's BTF is not available.

This fix allows the program to run, obviously only as long as it only
relies on the kernel's BTF and not on the specific module's BTF.

Fixes: #1436
Signed-off-by: Ori Shussman <orishuss@gmail.com>

v0.14.0

Toggle v0.14.0's commit message
link: add Iterator

Add an iterator for links that loops over all links in the system.

Signed-off-by: Charalampos (Babis) Stylianopoulos <charalampos.stylianopoulos@emnify.com>

v0.13.2

Toggle v0.13.2's commit message
btf: fix race in mutableTypes.copy

We reference mt.copiedTypeIDs during copy to be able to figure out
the correct ID for a copied type. This access can currently race
with mutableTypes.add since we don't protect mt.copiedTypeIDs.

Take a read lock to prevent modification.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载