Patch "kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kbuild-skip-per-cpu-btf-generation-for-pahole-v1.18-v1.21.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Wed Oct 26 06:44:13 PM CEST 2022
From: Jiri Olsa <jolsa@xxxxxxxxxx>
Date: Wed, 19 Oct 2022 10:56:02 +0200
Subject: kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21
To: stable@xxxxxxxxxxxxxxx
Cc: "Mel Gorman" <mgorman@xxxxxxxxxxxxxxxxxxx>, "Arnaldo Carvalho de Melo" <acme@xxxxxxxxxx>, "Hao Luo" <haoluo@xxxxxxxxxx>, "Michal Suchanek" <msuchanek@xxxxxxx>, bpf@xxxxxxxxxxxxxxx, "Arnaldo Carvalho de Melo" <acme@xxxxxxxxxx>, "Daniel Borkmann" <daniel@xxxxxxxxxxxxx>, "Martin Rodriguez Reboredo" <yakoyoku@xxxxxxxxx>, "Andrii Nakryiko" <andrii@xxxxxxxxxx>, "Javier Martinez Canillas" <javierm@xxxxxxxxxx>, "Ilya Leoshkevich" <iii@xxxxxxxxxxxxx>, "Nathan Chancellor" <nathan@xxxxxxxxxx>, "Philip Müller" <philm@xxxxxxxxxxx>
Message-ID: <20221019085604.1017583-4-jolsa@xxxxxxxxxx>

From: Andrii Nakryiko <andrii@xxxxxxxxxx>

commit a0b8200d06ad6450c179407baa5f0f52f8cfcc97 upstream.

[small context changes due to missing floats support in 5.10]

Commit "mm/page_alloc: convert per-cpu list protection to local_lock" will
introduce a zero-sized per-CPU variable, which causes pahole to generate
invalid BTF.  Only pahole versions 1.18 through 1.21 are impacted, as
before 1.18 pahole doesn't know anything about per-CPU variables, and 1.22
contains the proper fix for the issue.

Luckily, pahole 1.18 got --skip_encoding_btf_vars option disabling BTF
generation for per-CPU variables in anticipation of some unanticipated
problems.  So use this escape hatch to disable per-CPU var BTF info on
those problematic pahole versions.  Users relying on availability of
per-CPU var BTFs would need to upgrade to pahole 1.22+, but everyone won't
notice any regressions.

Link: https://lkml.kernel.org/r/20210530002536.3193829-1-andrii@xxxxxxxxxx
Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Hao Luo <haoluo@xxxxxxxxxx>
Cc: Michal Suchanek <msuchanek@xxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 scripts/link-vmlinux.sh |    5 +++++
 1 file changed, 5 insertions(+)

--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -161,6 +161,11 @@ gen_btf()
 
 	vmlinux_link ${1}
 
+	if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then
+		# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
+		extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_vars"
+	fi
+
 	info "BTF" ${2}
 	LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${extra_paholeopt} ${1}
 


Patches currently in stable-queue which might be from jolsa@xxxxxxxxxx are

queue-5.10/bpf-generate-btf_kind_float-when-linking-vmlinux.patch
queue-5.10/kbuild-skip-per-cpu-btf-generation-for-pahole-v1.18-v1.21.patch
queue-5.10/kbuild-quote-objcopy-var-to-avoid-a-pahole-call-break-the-build.patch
queue-5.10/kbuild-unify-options-for-btf-generation-for-vmlinux-and-modules.patch
queue-5.10/kbuild-add-skip_encoding_btf_enum64-option-to-pahole.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux