From 4c8c2b41769c2001c9375f5850b56ec6ba444bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Tue, 6 Jan 2026 11:05:09 -0800 Subject: [PATCH 1/3] Use pinned Linux version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We really shouldn't be using the moving target that is "the latest" Linux kernel version: just changing a config flag would introduce a bunch of completely unrelated changes, including potentially wrecking a config if certain high profile options were to be renamed. Fixate the Linux kernel version so that we have full control over what we use. Stick to 6.18, which is what commit 991dd4b8dfd8 ("Update vmlinux.h headers from Linux 6.14 to 6.18") bumped us to. Signed-off-by: Daniel Müller --- .github/workflows/vmlinux.h.yml | 10 +++++++--- scripts/download-latest-linux-release.sh | 17 ----------------- 2 files changed, 7 insertions(+), 20 deletions(-) delete mode 100755 scripts/download-latest-linux-release.sh diff --git a/.github/workflows/vmlinux.h.yml b/.github/workflows/vmlinux.h.yml index cdd8eec..bc38b73 100644 --- a/.github/workflows/vmlinux.h.yml +++ b/.github/workflows/vmlinux.h.yml @@ -16,9 +16,13 @@ jobs: - uses: actions/checkout@v4 - - name: Download Linux source - shell: bash - run: ./scripts/download-latest-linux-release.sh + - name: Check out Linux source + uses: actions/checkout@v6 + with: + repository: 'torvalds/linux' + ref: 'v6.18' + fetch-depth: 1 + path: linux/ - name: Install dependencies shell: bash diff --git a/scripts/download-latest-linux-release.sh b/scripts/download-latest-linux-release.sh deleted file mode 100755 index 11f03a6..0000000 --- a/scripts/download-latest-linux-release.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -eux - -sudo apt install -y curl jq tar xz-utils - -# pick the first stable release, it's usually the newest -url=$(curl -s https://www.kernel.org/releases.json \ - | jq -r '[.releases[] | select(.moniker == "mainline")][0].source') - -curl -LO "$url" -tar -xf $(basename "$url") - -dir=$(basename "$url" | sed 's/\.tar\.[gx]z$//') -mv $dir linux - -rm $(basename "$url") From be4914d02917d058e5af0f4b8ae79458c135140c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Tue, 6 Jan 2026 11:21:48 -0800 Subject: [PATCH 2/3] Clone pahole from GitHub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parallel downloads of pahole from git.kernel.org using HTTPS seems to be blocked randomly, rendering parallel vmlinux.h header generation flaky & unusable. Switch to cloning Arnaldo's mirror at https://github.com/acmel/dwarves, which doesn't pose this restriction. Signed-off-by: Daniel Müller --- .github/workflows/vmlinux.h.yml | 19 ++++++++++++++++++- scripts/install-pahole.sh | 22 ---------------------- 2 files changed, 18 insertions(+), 23 deletions(-) delete mode 100755 scripts/install-pahole.sh diff --git a/.github/workflows/vmlinux.h.yml b/.github/workflows/vmlinux.h.yml index bc38b73..960b930 100644 --- a/.github/workflows/vmlinux.h.yml +++ b/.github/workflows/vmlinux.h.yml @@ -24,11 +24,28 @@ jobs: fetch-depth: 1 path: linux/ + - name: Check out pahole source + uses: actions/checkout@v6 + with: + repository: 'acmel/dwarves' + ref: 'next' + fetch-depth: 1 + path: pahole/ + + - name: Install pahole + shell: bash + run: | + sudo apt -y install cmake git libdw-dev libelf-dev + cd pahole + mkdir -p build + cmake -B=build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr + make -C build -j$(nproc) + sudo make -C build install + - name: Install dependencies shell: bash run: | ./scripts/install-dependencies.sh - ./scripts/install-pahole.sh ./scripts/install-bpftool.sh - name: x86_64/vmlinux.h diff --git a/scripts/install-pahole.sh b/scripts/install-pahole.sh deleted file mode 100755 index ee62e4a..0000000 --- a/scripts/install-pahole.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -eux - -PAHOLE_ORIGIN=${PAHOLE_ORIGIN:-https://git.kernel.org/pub/scm/devel/pahole/pahole.git} -PAHOLE_REVISION=${PAHOLE_REVISION:-next} - -sudo apt -y install cmake git libdw-dev libelf-dev - -WORKSPACE=$(mktemp -d -t pahole.XXXXXX) -pushd "$WORKSPACE" -git clone ${PAHOLE_ORIGIN} \ - --branch "${PAHOLE_REVISION}" \ - --depth=1 \ - --single-branch -cd pahole -mkdir -p build -cmake -B=build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -make -C build -j$(nproc) -sudo make -C build install -popd -rm -rf "$WORKSPACE" From 8bbd291bcc2d3fe65672a05fa98a68611523d471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Tue, 6 Jan 2026 10:09:38 -0800 Subject: [PATCH 3/3] Generate vmlinux.h headers in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate vmlinux.h headers for all supported architectures in parallel, by using dedicated jobs. Doing so speeds up the workflow from ~27min to ~6min. Signed-off-by: Daniel Müller --- .github/workflows/vmlinux.h.yml | 63 ++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/.github/workflows/vmlinux.h.yml b/.github/workflows/vmlinux.h.yml index 960b930..9a74e7c 100644 --- a/.github/workflows/vmlinux.h.yml +++ b/.github/workflows/vmlinux.h.yml @@ -9,8 +9,18 @@ on: jobs: gen-headers: - name: Generate vmlinux.h + name: Generate vmlinux.h (${{ matrix.arch }}) runs-on: ubuntu-latest + strategy: + matrix: + arch: + - x86_64 + - aarch64 + - arm + - loongarch64 + - ppc64le + - riscv64 + - s390x steps: @@ -48,35 +58,40 @@ jobs: ./scripts/install-dependencies.sh ./scripts/install-bpftool.sh - - name: x86_64/vmlinux.h + - name: Generate ${{ matrix.arch }}/vmlinux.h shell: bash - run: ./scripts/gen-vmlinux-header.sh x86_64 + run: ./scripts/gen-vmlinux-header.sh ${{ matrix.arch }} - - name: aarch64/vmlinux.h - shell: bash - run: ./scripts/gen-vmlinux-header.sh aarch64 - - - name: arm/vmlinux.h - shell: bash - run: ./scripts/gen-vmlinux-header.sh arm - - - name: loongarch64/vmlinux.h - shell: bash - run: ./scripts/gen-vmlinux-header.sh loongarch64 + - name: Upload headers + uses: actions/upload-artifact@v4 + with: + name: vmlinux.h-${{ matrix.arch }} + if-no-files-found: error + path: ./vmlinux.h/${{ matrix.arch }} - - name: ppc64le/vmlinux.h - shell: bash - run: ./scripts/gen-vmlinux-header.sh ppc64le + combine-headers: + name: Combine all vmlinux.h headers + runs-on: ubuntu-latest + needs: gen-headers - - name: riscv64/vmlinux.h - shell: bash - run: ./scripts/gen-vmlinux-header.sh riscv64 + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + pattern: vmlinux.h-* - - name: s390x/vmlinux.h + - name: Reorganize headers shell: bash - run: ./scripts/gen-vmlinux-header.sh s390x - - - name: Upload headers + run: | + mkdir -p vmlinux.h + for dir in vmlinux.h-*/; do + arch="${dir#vmlinux.h-}" + arch="${arch%/}" + mkdir -p "vmlinux.h/$arch" + mv "$dir"* "vmlinux.h/$arch/" + done + + - name: Upload combined headers uses: actions/upload-artifact@v4 with: name: vmlinux.h