Skip to content

Commit ade3621

Browse files
committed
kernel: bump minimal Linux kernel to 5.10
Follow up to open-telemetry#1259 and open-telemetry#1178 and bump the minimal supported Linux kernel version to 5.10. Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
1 parent 8047150 commit ade3621

16 files changed

Lines changed: 40 additions & 428 deletions

File tree

.github/workflows/unit-test-on-pull-request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ jobs:
145145
# https://github.com/cilium/ci-kernels/pkgs/container/ci-kernels/versions?filters%5Bversion_type%5D=tagged
146146

147147
# AMD64
148-
- { target_arch: amd64, kernel: 5.4.276 }
149148
- { target_arch: amd64, kernel: 5.10.217 }
150149
- { target_arch: amd64, kernel: 5.15.159 }
151150
- { target_arch: amd64, kernel: 6.1.91 }

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ slack channel for discussions and questions.
2020

2121
## Pre-requisites
2222

23-
- Linux (5.4+ for x86-64, 5.5+ for ARM64) with eBPF enabled (the profiler currently only runs on Linux)
23+
- Linux (5.10+) with eBPF enabled (the profiler currently only runs on Linux)
2424
- Go as specified in [go.mod](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/main/go.mod)
2525
- docker
2626
- Rust as specified in [Cargo.toml](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/main/Cargo.toml)

LICENSES/golang.org/x/exp/constraints/LICENSE

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ Since the profiler is Linux-only, macOS and Windows users need to set up a Linux
5858

5959
## Supported Linux kernel version
6060

61-
[7ddc23ea](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/commit/7ddc23ea135a2e00fffc17850ab90534e9b63108) is the last commit with support for 4.19. Changes after this commit may require a minimal Linux kernel version of 5.4.
61+
The minimum required Linux kernel version has increased with certain commits. Specifically:
62+
63+
- Commit [8047150e](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/commit/8047150e3f325f852874591356c69d0487b67d7c) was the last to support kernel version 5.4. Subsequent changes may require a minimal Linux kernel version of 5.10 or greater.
64+
- Commit [7ddc23ea](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/commit/7ddc23ea135a2e00fffc17850ab90534e9b63108) was the last to support kernel version 4.19. Subsequent changes may require a minimal Linux kernel version of at least 5.4.
6265

6366
### Updating the supported Linux kernel version
6467

collector/config/config.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package config // import "go.opentelemetry.io/ebpf-profiler/collector/config"
66
import (
77
"errors"
88
"fmt"
9-
"runtime"
109
"strings"
1110
"time"
1211

@@ -122,17 +121,7 @@ func (cfg *Config) Validate() error {
122121
}
123122

124123
var minMajor, minMinor uint32
125-
switch runtime.GOARCH {
126-
case "amd64":
127-
minMajor, minMinor = 5, 2
128-
case "arm64":
129-
// Older ARM64 kernel versions have broken bpf_probe_read.
130-
// https://github.com/torvalds/linux/commit/6ae08ae3dea2cfa03dd3665a3c8475c2d429ef47
131-
minMajor, minMinor = 5, 5
132-
default:
133-
return fmt.Errorf("unsupported architecture: %s", runtime.GOARCH)
134-
}
135-
124+
minMajor, minMinor = 5, 10
136125
if major < minMajor || (major == minMajor && minor < minMinor) {
137126
return fmt.Errorf("host Agent requires kernel version "+
138127
"%d.%d or newer but got %d.%d.%d", minMajor, minMinor, major, minor, patch)

doc/KNOWN_KERNEL_LIMITATIONS.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

doc/internals.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,10 @@ of these limitations are significantly relaxed in newer kernel versions, but we
206206
still have to stick to the old limits because we wish to continue supporting
207207
older kernels.
208208

209-
The minimum supported Linux kernel versions are
210-
- 5.4 for amd64/x86_64
211-
- 5.5 for arm64/aarch64
209+
The minimum supported Linux kernel versions is 5.10 for amd64/x86_64 and arm64/aarch64.
212210

213211
The most notable limitations are the following two:
214212

215-
- **4096 instructions per program**\
216-
A single BPF program can consist of a maximum of 4096 instructions, otherwise
217-
older kernels will refuse to load it. Since BPF does not allow for loops, they
218-
instead need to be unrolled.
219213
- **32 tail-calls**\
220214
Linux allows BPF programs to do a tail-call to another BPF program. A tail
221215
call is essentially a `jmp` into another BPF program, ending execution of the

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ require (
2626
github.com/stretchr/testify v1.11.1
2727
github.com/zeebo/xxh3 v1.1.0
2828
go.opentelemetry.io/collector/component v1.54.0
29+
go.opentelemetry.io/collector/component/componenttest v0.148.0
2930
go.opentelemetry.io/collector/confmap/xconfmap v0.148.0
3031
go.opentelemetry.io/collector/consumer/consumertest v0.148.0
3132
go.opentelemetry.io/collector/consumer/xconsumer v0.148.0
@@ -39,7 +40,6 @@ require (
3940
go.opentelemetry.io/proto/otlp/profiles/v1development v0.3.0
4041
go.uber.org/zap/exp v0.3.0
4142
golang.org/x/arch v0.25.0
42-
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90
4343
golang.org/x/mod v0.34.0
4444
golang.org/x/sync v0.20.0
4545
golang.org/x/sys v0.42.0
@@ -87,7 +87,6 @@ require (
8787
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
8888
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
8989
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
90-
go.opentelemetry.io/collector/component/componenttest v0.148.0 // indirect
9190
go.opentelemetry.io/collector/confmap v1.54.0 // indirect
9291
go.opentelemetry.io/collector/consumer v1.54.0 // indirect
9392
go.opentelemetry.io/collector/consumer/consumererror v0.148.0 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
203203
golang.org/x/arch v0.25.0 h1:qnk6Ksugpi5Bz32947rkUgDt9/s5qvqDPl/gBKdMJLE=
204204
golang.org/x/arch v0.25.0/go.mod h1:0X+GdSIP+kL5wPmpK7sdkEVTt2XoYP0cSjQSbZBwOi8=
205205
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
206-
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 h1:jiDhWWeC7jfWqR9c/uplMOqJ0sbNlNWv0UkzE0vX1MA=
207-
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90/go.mod h1:xE1HEv6b+1SCZ5/uscMRjUBKtIxworgEcEi+/n9NQDQ=
208206
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
209207
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
210208
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

0 commit comments

Comments
 (0)