|
@@ -85,7 +85,7 @@ runs:
|
|
|
grep -q '^ADDITIONAL_HOST_TOOLS=' build.config.gki.aarch64 || \
|
|
grep -q '^ADDITIONAL_HOST_TOOLS=' build.config.gki.aarch64 || \
|
|
|
echo 'ADDITIONAL_HOST_TOOLS="${ADDITIONAL_HOST_TOOLS} dd"' >> build.config.gki.aarch64
|
|
echo 'ADDITIONAL_HOST_TOOLS="${ADDITIONAL_HOST_TOOLS} dd"' >> build.config.gki.aarch64
|
|
|
|
|
|
|
|
- - name: Use apt pahole (>=1.23) for hermetic BTF generation (android12-5.10)
|
|
|
|
|
|
|
+ - name: Build and use pahole >=1.26 for hermetic BTF generation (android12-5.10)
|
|
|
shell: bash
|
|
shell: bash
|
|
|
working-directory: ${{ github.workspace }}/kernel
|
|
working-directory: ${{ github.workspace }}/kernel
|
|
|
if: ${{ inputs.version == 'android12-5.10' }}
|
|
if: ${{ inputs.version == 'android12-5.10' }}
|
|
@@ -94,10 +94,13 @@ runs:
|
|
|
# android12-5.10 pins prebuilt pahole v1.19, which fails to recode the
|
|
# android12-5.10 pins prebuilt pahole v1.19, which fails to recode the
|
|
|
# DWARF types and DROPS symbols (e.g. xdp_buff) from the emitted BTF.
|
|
# DWARF types and DROPS symbols (e.g. xdp_buff) from the emitted BTF.
|
|
|
# resolve_btfids then aborts with "FAILED unresolved symbol xdp_buff".
|
|
# resolve_btfids then aborts with "FAILED unresolved symbol xdp_buff".
|
|
|
- # a13-5.10 ships prebuilt pahole v1.23 which works. The runner installs
|
|
|
|
|
- # apt pahole 1.25 (/usr/bin/pahole). Replace the hermetic-path pahole
|
|
|
|
|
- # (first dir on PATH, same dir dd lives in) with a WRAPPER that execs
|
|
|
|
|
- # the apt binary.
|
|
|
|
|
|
|
+ # This is the exact failure Google/kernelci hit (see lore.kernel.org,
|
|
|
|
|
+ # "kernelci failures due to pahole missing", Apr-Sep 2022): pahole emits
|
|
|
|
|
+ # hundreds of MB of "namespace__recode_dwarf_types: couldn't find ..."
|
|
|
|
|
+ # warnings and silently drops types. Even Ubuntu's apt pahole 1.25 still
|
|
|
|
|
+ # cannot fully recode the 5.10.43 sublevel DWARF (5.10.66+ is fine).
|
|
|
|
|
+ # Build the latest pahole from source (1.31, matching a working host)
|
|
|
|
|
+ # and wrap the hermetic-path pahole to exec it.
|
|
|
#
|
|
#
|
|
|
# The wrapper also always injects --skip_encoding_btf_enum64 /
|
|
# The wrapper also always injects --skip_encoding_btf_enum64 /
|
|
|
# decl_tag / type_tag. Sublevels <=149 have no scripts/pahole-flags.sh
|
|
# decl_tag / type_tag. Sublevels <=149 have no scripts/pahole-flags.sh
|
|
@@ -105,7 +108,23 @@ runs:
|
|
|
# old in-tree libbpf there only handles BTF kinds 1-15 and EINVALs on
|
|
# old in-tree libbpf there only handles BTF kinds 1-15 and EINVALs on
|
|
|
# enum64/decl_tag/type_tag. Newer sublevels pass --skip_encoding_btf_enum64
|
|
# enum64/decl_tag/type_tag. Newer sublevels pass --skip_encoding_btf_enum64
|
|
|
# via pahole-flags.sh already; duplicate skip flags are harmless.
|
|
# via pahole-flags.sh already; duplicate skip flags are harmless.
|
|
|
- HERMETIC_PAHOLE="build/build-tools/path/linux-x86/pahole"
|
|
|
|
|
|
|
+ sudo apt-get install -y -qq cmake gcc libdw-dev libelf-dev zlib1g-dev dwarves
|
|
|
|
|
+
|
|
|
|
|
+ # Build pahole 1.31 from source (acmel/dwarves). Deterministic, self-hosted.
|
|
|
|
|
+ # Release build type is required: the default Debug sets -Wall -Werror, and
|
|
|
|
|
+ # the bundled libbpf/btf_encoder fail under newer GCC as -Werror.
|
|
|
|
|
+ PAHOLE_SRC="$HOME/dwarves"
|
|
|
|
|
+ rm -rf "$PAHOLE_SRC"
|
|
|
|
|
+ git clone --depth 1 --branch v1.31 https://github.com/acmel/dwarves.git "$PAHOLE_SRC"
|
|
|
|
|
+ mkdir -p "$PAHOLE_SRC/build"
|
|
|
|
|
+ cd "$PAHOLE_SRC/build"
|
|
|
|
|
+ cmake -D__LIB=lib -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release .. >/dev/null
|
|
|
|
|
+ make -j"$(nproc)" pahole
|
|
|
|
|
+ sudo make install pahole
|
|
|
|
|
+ command -v pahole
|
|
|
|
|
+ pahole --version
|
|
|
|
|
+
|
|
|
|
|
+ HERMETIC_PAHOLE="${{ github.workspace }}/kernel/build/build-tools/path/linux-x86/pahole"
|
|
|
REAL_PAHOLE="$(command -v pahole)"
|
|
REAL_PAHOLE="$(command -v pahole)"
|
|
|
if [ -L "$HERMETIC_PAHOLE" ] || [ -f "$HERMETIC_PAHOLE" ]; then
|
|
if [ -L "$HERMETIC_PAHOLE" ] || [ -f "$HERMETIC_PAHOLE" ]; then
|
|
|
cat > "$HERMETIC_PAHOLE" <<EOF
|
|
cat > "$HERMETIC_PAHOLE" <<EOF
|