Your message dated Mon, 13 Jul 2026 13:44:05 +0200 with message-id <jh55pvwivsykmcuibdjn5nzoypqv47dnk6eqiglwd2cbxvf47r@xitc7iiqf3w2> and subject line Re: Bug#1141979: gen-btf.sh: quoting in PAHOLE awk wrapper breaks BTF step for all out-of-tree modules has caused the Debian Bug report #1141979, regarding gen-btf.sh: quoting in PAHOLE awk wrapper breaks BTF step for all out-of-tree modules to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 1141979: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1141979 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: linux-kbuild-7.1.3+deb14 Version: 7.1.3-1 Tags: patch X-Debbugs-Cc: [email protected], [email protected] Dear Maintainer, /usr/lib/linux-kbuild-7.1.3+deb14/scripts/gen-btf.sh invokes pahole via plain variable expansion: ${PAHOLE} -J ${PAHOLE_FLAGS} \ ${BTF_BASE:+--btf_base ${BTF_BASE}} \ --btf_encode_detached=${btf1} \ "${ELF_FILE}" On Debian, PAHOLE is set to an awk wrapper command containing embedded single quotes (it appends ",c++,c++11" to any --lang_exclude argument). POSIX shell does not re-parse quoting inside expanded variables, so awk receives the literal token 'BEGIN as part of its program text and aborts: awk: cmd. line:1: 'BEGIN awk: cmd. line:1: ^ invalid char ''' in expression The script's cleanup trap then removes the intermediate BTF files, and the module link fails at Makefile.modfinal:62: make[4]: *** [.../scripts/Makefile.modfinal:62: <module>.ko] Error 1 make[4]: *** Deleting file '<module>.ko' This breaks the final link of every out-of-tree module built against the 7.1.3 headers on systems where PAHOLE is the awk wrapper. I hit it with the nvidia DKMS modules while working on #1136776, but the failure is independent of any particular module: all module code had compiled successfully and only the BTF post-processing step failed. The script ships in linux-kbuild and is reached during DKMS builds via the scripts/ symlink in linux-headers-7.1.3+deb14-common, so the failure surfaces as a headers/module problem despite originating here — easy to misattribute to the module being built. The failure only manifests when BTF generation actually runs, i.e. when a vmlinux is available for --btf_base; the script skips gracefully otherwise, which may be why this has gone unnoticed. The attached patch wraps the pahole invocation in eval so the shell re-parses the embedded quoting. All inputs to the evaluated string originate from the kernel build system, not from user-controlled data. The resolve_btfids invocation is left untouched, as RESOLVE_BTFIDS is a plain program path. Tested on 7.1.3+deb14-amd64: with the fix applied, nvidia.ko, nvidia-modeset.ko, nvidia-drm.ko, nvidia-uvm.ko and nvidia-peermem.ko all link successfully with BTF sections generated, and the modules load and run. Regards, Emre Uyguroğlu -- System Information: Debian Release: forky/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.12.17-amd64 (SMP w/32 CPU threads; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages linux-kbuild-7.1.3+deb14 depends on: ii libc6 2.42-17 ii libelf1t64 0.195-1 ii libssl3t64 3.6.3-1 ii pahole 1.31-2 ii zlib1g 1:1.3.dfsg+really1.3.2-3 linux-kbuild-7.1.3+deb14 recommends no packages. linux-kbuild-7.1.3+deb14 suggests no packages. -- no debconf information--- a/scripts/gen-btf.sh +++ b/scripts/gen-btf.sh @@ -69,11 +69,10 @@ gen_btf_data() { btf1="${ELF_FILE}.BTF.1" - ${PAHOLE} -J ${PAHOLE_FLAGS} \ - ${BTF_BASE:+--btf_base ${BTF_BASE}} \ - --btf_encode_detached=${btf1} \ - "${ELF_FILE}" - + eval "${PAHOLE} -J ${PAHOLE_FLAGS} \ + ${BTF_BASE:+--btf_base ${BTF_BASE}} \ + --btf_encode_detached=${btf1} \ + '${ELF_FILE}'" ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_FLAGS} \ ${BTF_BASE:+--btf_base ${BTF_BASE}} \ --btf ${btf1} "${ELF_FILE}"
--- End Message ---
--- Begin Message ---e-mail to submitter bounces, closing. | 550 5.7.515 Access denied, sending domain DEBIAN.ORG doesn't meet the required | authentication level. The sender's domain in the 5322.From address doesn't meet | the authentication requirements defined for the sender. On Mon, Jul 13, 2026 -- Humans do claim a great deal for that particular emotion (love). -- Spock, "The Lights of Zetar", stardate 5725.6
--- End Message ---

