Skip to content

Commit

Permalink
Update Dockerfiles and kernel versions
Browse files Browse the repository at this point in the history
In kernel 6.11 decl tag generation for kfuncs has been added. This
allows users to list all kfuncs built into the kernel via the vmlinux
BTF. This commit updates the versions.json to include kernel 6.11.

The current builder ships with pahole 1.24 which it gets from the
debian repository. This version does not support the new decl tag
generation. This commit updates the builder to build pahole 1.27 from
source.

During the version upgrade two CI build errors were found. For 6.11
we new require `CONFIG_MPTCP=y`. Due to missing dependencies in the
backport process the selftests can't build on v6.6.42-v6.6.52. So
despite v6.6.52 being the latest version, only upgrading to v6.6.41.
We should be able to upgrade once
`tools/testing/selftests/bpf/netlink_helpers.{c,h}` have been backported
to v6.6.x.

Signed-off-by: Dylan Reimerink <[email protected]>
  • Loading branch information
dylandreimerink committed Oct 1, 2024
1 parent 2cf24ef commit e3830fd
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM ghcr.io/cilium/ci-kernels-builder:1716461563 AS configure-vmlinux
FROM --platform=$BUILDPLATFORM ghcr.io/cilium/ci-kernels-builder:1727287467 AS configure-vmlinux

ARG KERNEL_VERSION

Expand Down
19 changes: 17 additions & 2 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY llvm.pref /etc/apt/preferences.d

# Bake the appropriate clang version into the container
ARG CLANG_VERSION=16
ARG PAHOLE_VERSION=1.27
ENV CLANG=clang-${CLANG_VERSION}
ENV LLVM_STRIP=llvm-strip-${CLANG_VERSION}
ENV LLVM_DWARFDUMP=llvm-dwarfdump-${CLANG_VERSION}
Expand All @@ -40,11 +41,25 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
ccache \
libelf-dev \
python3-docutils \
pahole \
libcap-dev \
${CLANG} \
llvm-${CLANG_VERSION} \
lld \
kmod \
rsync \
libc6-dev-i386
libc6-dev-i386 \
cmake \
libdw-dev \
git

RUN cd /tmp && \
git clone https://git.kernel.org/pub/scm/devel/pahole/pahole.git && \
cd pahole && \
git checkout v${PAHOLE_VERSION} && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake -D__LIB=lib -DBUILD_SHARED_LIBS=OFF .. && \
make install && \
cd / && \
rm -rf /tmp/pahole
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1716461563
1727287467
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CONFIG_LIRC=y
CONFIG_MEDIA_RC_SUPPORT=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MODULES=y
CONFIG_MPTCP=y
CONFIG_MULTIUSER=y
CONFIG_NET_FOU=y
CONFIG_NET=y
Expand Down
14 changes: 12 additions & 2 deletions update-versions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/bin/bash
# Fetch the releases encoded in the kernel.org homepage and store them as a JSON.

# Credits: https://stackoverflow.com/a/75770668/1205448
jq_semver_cmp='
def opt(f):
. as $in | try f catch $in;
def semver_cmp:
sub("\\+.*$"; "")
| capture("^(?<v>[^-]+)(?:-(?<p>.*))?$") | [.v, .p // empty]
| map(split(".") | map(opt(tonumber)))
| .[1] |= (. // {});'

read -r -d '' filter <<'EOF'
[ .releases[]
| select(.iseol == false and .moniker != "linux-next")
Expand All @@ -10,8 +20,8 @@ read -r -d '' filter <<'EOF'
| map(.[0].static_tag = .[0].type)
| flatten
| map({version, static_tag})
| sort_by(.version) | reverse
| sort_by(.version|semver_cmp) | reverse
EOF

exec curl -sL https://www.kernel.org/releases.json | jq "$filter" | tee versions.json
exec curl -sL https://www.kernel.org/releases.json | jq "$jq_semver_cmp""$filter" | tee versions.json

22 changes: 11 additions & 11 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
[
{
"version": "6.9.1",
"static_tag": "stable"
"version": "6.12-rc1",
"static_tag": "mainline"
},
{
"version": "6.9",
"static_tag": "mainline"
"version": "6.11.1",
"static_tag": "stable"
},
{
"version": "6.8.10",
"version": "6.10.12",
"static_tag": ""
},
{
"version": "6.6.31",
"version": "6.6.41",
"static_tag": "longterm"
},
{
"version": "6.1.91",
"version": "6.1.112",
"static_tag": ""
},
{
"version": "5.4.276",
"version": "5.15.167",
"static_tag": ""
},
{
"version": "5.15.159",
"version": "5.10.226",
"static_tag": ""
},
{
"version": "5.10.217",
"version": "5.4.284",
"static_tag": ""
},
{
"version": "4.19.314",
"version": "4.19.322",
"static_tag": ""
}
]

0 comments on commit e3830fd

Please sign in to comment.