From e9fb3c826860455590db2a4721e73f9ae8bfae94 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 5 Jun 2024 07:24:19 -0400 Subject: [PATCH] Drop a few kbuild patches from 6.1 Signed-off-by: Sasha Levin --- .../arm-add-multi_v7_lpae_defconfig.patch | 65 -- queue-6.1/arm64-configs-add-virtconfig.patch | 96 --- ...-id-symlinks-to-installed-debug-vdso.patch | 36 -- .../kbuild-unify-vdso_install-rules.patch | 585 ------------------ queue-6.1/series | 4 - 5 files changed, 786 deletions(-) delete mode 100644 queue-6.1/arm-add-multi_v7_lpae_defconfig.patch delete mode 100644 queue-6.1/arm64-configs-add-virtconfig.patch delete mode 100644 queue-6.1/kbuild-fix-build-id-symlinks-to-installed-debug-vdso.patch delete mode 100644 queue-6.1/kbuild-unify-vdso_install-rules.patch diff --git a/queue-6.1/arm-add-multi_v7_lpae_defconfig.patch b/queue-6.1/arm-add-multi_v7_lpae_defconfig.patch deleted file mode 100644 index 0c426e8c004..00000000000 --- a/queue-6.1/arm-add-multi_v7_lpae_defconfig.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5a82cd5a3b9b17da8ff8cbc4565c1491cf3bcc99 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 24 Jan 2023 12:02:13 +0100 -Subject: ARM: add multi_v7_lpae_defconfig - -From: Nicolas Saenz Julienne - -[ Upstream commit e9faf9b0b07a317f6ac40ab67e5490a1c4df5fc6 ] - -The only missing configuration option preventing us from using -multi_v7_defconfig with the Raspberry Pi 4 is ARM_LPAE. It's needed as -the PCIe controller found on the SoC depends on 64bit addressing, yet -can't be included as not all v7 boards support LPAE. - -Introduce multi_v7_lpae_defconfig, built off multi_v7_defconfig, which will -avoid us having to duplicate and maintain multiple similar configurations. - -Needless to say the Raspberry Pi 4 is not the only platform that can -benefit from this new configuration. - -Signed-off-by: Nicolas Saenz Julienne -Signed-off-by: Alexander Stein -Link: https://lore.kernel.org/r/20230124110213.3221264-11-alexander.stein@ew.tq-group.com -Signed-off-by: Arnd Bergmann -Stable-dep-of: fc2f5f10f9bc ("s390/vdso: Create .build-id links for unstripped vdso files") -Signed-off-by: Sasha Levin ---- - arch/arm/Makefile | 6 ++++++ - arch/arm/configs/lpae.config | 2 ++ - 2 files changed, 8 insertions(+) - create mode 100644 arch/arm/configs/lpae.config - -diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index c846119c448f0..ce1d873c8986a 100644 ---- a/arch/arm/Makefile -+++ b/arch/arm/Makefile -@@ -310,6 +310,10 @@ endif - # My testing targets (bypasses dependencies) - bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage - -+include $(srctree)/scripts/Makefile.defconf -+PHONY += multi_v7_lpae_defconfig -+multi_v7_lpae_defconfig: -+ $(call merge_into_defconfig,multi_v7_defconfig,lpae) - - define archhelp - echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' -@@ -325,4 +329,6 @@ define archhelp - echo ' (distribution) /sbin/$(INSTALLKERNEL) or' - echo ' install to $$(INSTALL_PATH) and run lilo' - echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' -+ echo -+ echo ' multi_v7_lpae_defconfig - multi_v7_defconfig with CONFIG_ARM_LPAE enabled' - endef -diff --git a/arch/arm/configs/lpae.config b/arch/arm/configs/lpae.config -new file mode 100644 -index 0000000000000..a6d6f7ab3c01a ---- /dev/null -+++ b/arch/arm/configs/lpae.config -@@ -0,0 +1,2 @@ -+CONFIG_ARM_LPAE=y -+CONFIG_VMSPLIT_2G=y --- -2.43.0 - diff --git a/queue-6.1/arm64-configs-add-virtconfig.patch b/queue-6.1/arm64-configs-add-virtconfig.patch deleted file mode 100644 index e1cb5f83175..00000000000 --- a/queue-6.1/arm64-configs-add-virtconfig.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 477be48627d9d383c22a15b3032f30c423019d41 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 10 Feb 2023 19:52:49 +0000 -Subject: arm64: configs: Add virtconfig - -From: Mark Brown - -[ Upstream commit c6cd63f5af3921c484be5789cf23e0f276de3a2f ] - -Provide a slimline configuration intended to be booted on virtual -machines, with the goal of providing a light configuration which will -boot on and enable features available in mach-virt. This is defined in -terms of the standard defconfig, with an additional virt.config fragment -which disables options unneeded in a virtual configuration. - -As a first step we just disable all the ARCH_ configuration options, -disabling the build of all the SoC specific drivers. This results in a -kernel that builds about 25% faster in my testing, if this approach -works for people we can add further options. - -Signed-off-by: Mark Brown -Link: https://lore.kernel.org/r/20230203-arm64-defconfigs-v1-3-cd0694a05f13@kernel.org -Signed-off-by: Arnd Bergmann -Stable-dep-of: fc2f5f10f9bc ("s390/vdso: Create .build-id links for unstripped vdso files") -Signed-off-by: Sasha Levin ---- - arch/arm64/Makefile | 6 ++++++ - arch/arm64/configs/virt.config | 39 ++++++++++++++++++++++++++++++++++ - 2 files changed, 45 insertions(+) - create mode 100644 arch/arm64/configs/virt.config - -diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index c9496539c3351..bd4d9a001c612 100644 ---- a/arch/arm64/Makefile -+++ b/arch/arm64/Makefile -@@ -204,6 +204,12 @@ ifdef CONFIG_COMPAT_VDSO - endif - endif - -+include $(srctree)/scripts/Makefile.defconf -+ -+PHONY += virtconfig -+virtconfig: -+ $(call merge_into_defconfig_override,defconfig,virt) -+ - define archhelp - echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)' - echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' -diff --git a/arch/arm64/configs/virt.config b/arch/arm64/configs/virt.config -new file mode 100644 -index 0000000000000..6ef0a739717ff ---- /dev/null -+++ b/arch/arm64/configs/virt.config -@@ -0,0 +1,39 @@ -+# CONFIG_ARCH_ACTIONS is not set -+# CONFIG_ARCH_SUNXI is not set -+# CONFIG_ARCH_ALPINE is not set -+# CONFIG_ARCH_APPLE is not set -+# CONFIG_ARCH_BCM is not set -+# CONFIG_ARCH_BCM2835 is not set -+# CONFIG_ARCH_BCMBCA is not set -+# CONFIG_ARCH_BCM_IPROC is not set -+# CONFIG_ARCH_BERLIN is not set -+# CONFIG_ARCH_BRCMSTB is not set -+# CONFIG_ARCH_EXYNOS is not set -+# CONFIG_ARCH_K3 is not set -+# CONFIG_ARCH_LAYERSCAPE is not set -+# CONFIG_ARCH_LG1K is not set -+# CONFIG_ARCH_HISI is not set -+# CONFIG_ARCH_KEEMBAY is not set -+# CONFIG_ARCH_MEDIATEK is not set -+# CONFIG_ARCH_MESON is not set -+# CONFIG_ARCH_MVEBU is not set -+# CONFIG_ARCH_NXP is not set -+# CONFIG_ARCH_MXC is not set -+# CONFIG_ARCH_NPCM is not set -+# CONFIG_ARCH_QCOM is not set -+# CONFIG_ARCH_RENESAS is not set -+# CONFIG_ARCH_ROCKCHIP is not set -+# CONFIG_ARCH_S32 is not set -+# CONFIG_ARCH_SEATTLE is not set -+# CONFIG_ARCH_INTEL_SOCFPGA is not set -+# CONFIG_ARCH_SYNQUACER is not set -+# CONFIG_ARCH_TEGRA is not set -+# CONFIG_ARCH_TESLA_FSD is not set -+# CONFIG_ARCH_SPRD is not set -+# CONFIG_ARCH_THUNDER is not set -+# CONFIG_ARCH_THUNDER2 is not set -+# CONFIG_ARCH_UNIPHIER is not set -+# CONFIG_ARCH_VEXPRESS is not set -+# CONFIG_ARCH_VISCONTI is not set -+# CONFIG_ARCH_XGENE is not set -+# CONFIG_ARCH_ZYNQMP is not set --- -2.43.0 - diff --git a/queue-6.1/kbuild-fix-build-id-symlinks-to-installed-debug-vdso.patch b/queue-6.1/kbuild-fix-build-id-symlinks-to-installed-debug-vdso.patch deleted file mode 100644 index be3e8a48817..00000000000 --- a/queue-6.1/kbuild-fix-build-id-symlinks-to-installed-debug-vdso.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 90f27ae41a894e0d9da46a8b0fbef58bd78833e3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 20 Dec 2023 17:18:33 +0900 -Subject: kbuild: fix build ID symlinks to installed debug VDSO files - -From: Masahiro Yamada - -[ Upstream commit c1a8627164dbe8b92958aea10c7c0848105a3d7f ] - -Commit 56769ba4b297 ("kbuild: unify vdso_install rules") accidentally -dropped the '.debug' suffix from the build ID symlinks. - -Fixes: 56769ba4b297 ("kbuild: unify vdso_install rules") -Signed-off-by: Masahiro Yamada -Stable-dep-of: fc2f5f10f9bc ("s390/vdso: Create .build-id links for unstripped vdso files") -Signed-off-by: Sasha Levin ---- - scripts/Makefile.vdsoinst | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst -index 1022d9fdd976d..c477d17b0aa5b 100644 ---- a/scripts/Makefile.vdsoinst -+++ b/scripts/Makefile.vdsoinst -@@ -22,7 +22,7 @@ $$(dest): $$(src) FORCE - - # Some architectures create .build-id symlinks - ifneq ($(filter arm sparc x86, $(SRCARCH)),) --link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p') -+link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug - - __default: $$(link) - $$(link): $$(dest) FORCE --- -2.43.0 - diff --git a/queue-6.1/kbuild-unify-vdso_install-rules.patch b/queue-6.1/kbuild-unify-vdso_install-rules.patch deleted file mode 100644 index 807d44ea2e1..00000000000 --- a/queue-6.1/kbuild-unify-vdso_install-rules.patch +++ /dev/null @@ -1,585 +0,0 @@ -From d255d15f5581dc48bfbb442da60af2709f35e43e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 14 Oct 2023 19:54:35 +0900 -Subject: kbuild: unify vdso_install rules - -From: Masahiro Yamada - -[ Upstream commit 56769ba4b297a629148eb24d554aef72d1ddfd9e ] - -Currently, there is no standard implementation for vdso_install, -leading to various issues: - - 1. Code duplication - - Many architectures duplicate similar code just for copying files - to the install destination. - - Some architectures (arm, sparc, x86) create build-id symlinks, - introducing more code duplication. - - 2. Unintended updates of in-tree build artifacts - - The vdso_install rule depends on the vdso files to install. - It may update in-tree build artifacts. This can be problematic, - as explained in commit 19514fc665ff ("arm, kbuild: make - "make install" not depend on vmlinux"). - - 3. Broken code in some architectures - - Makefile code is often copied from one architecture to another - without proper adaptation. - - 'make vdso_install' for parisc does not work. - - 'make vdso_install' for s390 installs vdso64, but not vdso32. - -To address these problems, this commit introduces a generic vdso_install -rule. - -Architectures that support vdso_install need to define vdso-install-y -in arch/*/Makefile. vdso-install-y lists the files to install. - -For example, arch/x86/Makefile looks like this: - - vdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg - vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdsox32.so.dbg - vdso-install-$(CONFIG_X86_32) += arch/x86/entry/vdso/vdso32.so.dbg - vdso-install-$(CONFIG_IA32_EMULATION) += arch/x86/entry/vdso/vdso32.so.dbg - -These files will be installed to $(MODLIB)/vdso/ with the .dbg suffix, -if exists, stripped away. - -vdso-install-y can optionally take the second field after the colon -separator. This is needed because some architectures install a vdso -file as a different base name. - -The following is a snippet from arch/arm64/Makefile. - - vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so - -This will rename vdso.so.dbg to vdso32.so during installation. If such -architectures change their implementation so that the base names match, -this workaround will go away. - -Signed-off-by: Masahiro Yamada -Acked-by: Sven Schnelle # s390 -Reviewed-by: Nicolas Schier -Reviewed-by: Guo Ren -Acked-by: Helge Deller # parisc -Acked-by: Catalin Marinas -Acked-by: Russell King (Oracle) -Stable-dep-of: fc2f5f10f9bc ("s390/vdso: Create .build-id links for unstripped vdso files") -Signed-off-by: Sasha Levin ---- - Makefile | 9 ++++++ - arch/arm/Makefile | 7 +--- - arch/arm/vdso/Makefile | 25 -------------- - arch/arm64/Makefile | 9 ++---- - arch/arm64/kernel/vdso/Makefile | 10 ------ - arch/arm64/kernel/vdso32/Makefile | 10 ------ - arch/loongarch/Makefile | 4 +-- - arch/loongarch/vdso/Makefile | 10 ------ - arch/parisc/Makefile | 8 ++--- - arch/riscv/Makefile | 9 ++---- - arch/riscv/kernel/compat_vdso/Makefile | 10 ------ - arch/riscv/kernel/vdso/Makefile | 10 ------ - arch/s390/Makefile | 6 ++-- - arch/s390/kernel/vdso32/Makefile | 10 ------ - arch/s390/kernel/vdso64/Makefile | 10 ------ - arch/sparc/Makefile | 5 ++- - arch/sparc/vdso/Makefile | 27 ---------------- - arch/x86/Makefile | 7 ++-- - arch/x86/entry/vdso/Makefile | 27 ---------------- - scripts/Makefile.vdsoinst | 45 ++++++++++++++++++++++++++ - 20 files changed, 73 insertions(+), 185 deletions(-) - create mode 100644 scripts/Makefile.vdsoinst - -diff --git a/Makefile b/Makefile -index 0be668057cb2a..fa1d08d2dbc7a 100644 ---- a/Makefile -+++ b/Makefile -@@ -1400,6 +1400,14 @@ scripts_unifdef: scripts_basic - quiet_cmd_install = INSTALL $(INSTALL_PATH) - cmd_install = unset sub_make_done; $(srctree)/scripts/install.sh - -+# --------------------------------------------------------------------------- -+# vDSO install -+ -+PHONY += vdso_install -+vdso_install: export INSTALL_FILES = $(vdso-install-y) -+vdso_install: -+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vdsoinst -+ - # --------------------------------------------------------------------------- - # Tools - -@@ -1675,6 +1683,7 @@ help: - @echo '* vmlinux - Build the bare kernel' - @echo '* modules - Build all modules' - @echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)' -+ @echo ' vdso_install - Install unstripped vdso to INSTALL_MOD_PATH (default: /)' - @echo ' dir/ - Build all files in dir and below' - @echo ' dir/file.[ois] - Build specified target only' - @echo ' dir/file.ll - Build the LLVM assembly file' -diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index ce1d873c8986a..0088198525b19 100644 ---- a/arch/arm/Makefile -+++ b/arch/arm/Makefile -@@ -301,11 +301,7 @@ $(INSTALL_TARGETS): KBUILD_IMAGE = $(boot)/$(patsubst %install,%Image,$@) - $(INSTALL_TARGETS): - $(call cmd,install) - --PHONY += vdso_install --vdso_install: --ifeq ($(CONFIG_VDSO),y) -- $(Q)$(MAKE) $(build)=arch/arm/vdso $@ --endif -+vdso-install-$(CONFIG_VDSO) += arch/arm/vdso/vdso.so.dbg - - # My testing targets (bypasses dependencies) - bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage -@@ -328,7 +324,6 @@ define archhelp - echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' - echo ' (distribution) /sbin/$(INSTALLKERNEL) or' - echo ' install to $$(INSTALL_PATH) and run lilo' -- echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' - echo - echo ' multi_v7_lpae_defconfig - multi_v7_defconfig with CONFIG_ARM_LPAE enabled' - endef -diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile -index 8ca1c9f262a22..9f76ba65d9c65 100644 ---- a/arch/arm/vdso/Makefile -+++ b/arch/arm/vdso/Makefile -@@ -64,28 +64,3 @@ quiet_cmd_vdsold_and_vdso_check = LD $@ - - quiet_cmd_vdsomunge = MUNGE $@ - cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@ -- --# --# Install the unstripped copy of vdso.so.dbg. If our toolchain --# supports build-id, install .build-id links as well. --# --# Cribbed from arch/x86/vdso/Makefile. --# --quiet_cmd_vdso_install = INSTALL $< --define cmd_vdso_install -- cp $< "$(MODLIB)/vdso/vdso.so"; \ -- if readelf -n $< | grep -q 'Build ID'; then \ -- buildid=`readelf -n $< |grep 'Build ID' |sed -e 's/^.*Build ID: \(.*\)$$/\1/'`; \ -- first=`echo $$buildid | cut -b-2`; \ -- last=`echo $$buildid | cut -b3-`; \ -- mkdir -p "$(MODLIB)/vdso/.build-id/$$first"; \ -- ln -sf "../../vdso.so" "$(MODLIB)/vdso/.build-id/$$first/$$last.debug"; \ -- fi --endef -- --$(MODLIB)/vdso: FORCE -- @mkdir -p $(MODLIB)/vdso -- --PHONY += vdso_install --vdso_install: $(obj)/vdso.so.dbg $(MODLIB)/vdso -- $(call cmd,vdso_install) -diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index bd4d9a001c612..5cca6567daacf 100644 ---- a/arch/arm64/Makefile -+++ b/arch/arm64/Makefile -@@ -168,12 +168,6 @@ install: KBUILD_IMAGE := $(boot)/Image - install zinstall: - $(call cmd,install) - --PHONY += vdso_install --vdso_install: -- $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@ -- $(if $(CONFIG_COMPAT_VDSO), \ -- $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso32 $@) -- - archprepare: - $(Q)$(MAKE) $(build)=arch/arm64/tools kapi - ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) -@@ -204,6 +198,9 @@ ifdef CONFIG_COMPAT_VDSO - endif - endif - -+vdso-install-y += arch/arm64/kernel/vdso/vdso.so.dbg -+vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so -+ - include $(srctree)/scripts/Makefile.defconf - - PHONY += virtconfig -diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile -index 619e2dc7ee14c..e4b72db35eb81 100644 ---- a/arch/arm64/kernel/vdso/Makefile -+++ b/arch/arm64/kernel/vdso/Makefile -@@ -80,13 +80,3 @@ include/generated/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE - # Actual build commands - quiet_cmd_vdsold_and_vdso_check = LD $@ - cmd_vdsold_and_vdso_check = $(cmd_ld); $(cmd_vdso_check) -- --# Install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ -- --vdso.so: $(obj)/vdso.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso.so -diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile -index d513533cc922f..694ff1dd4b0f2 100644 ---- a/arch/arm64/kernel/vdso32/Makefile -+++ b/arch/arm64/kernel/vdso32/Makefile -@@ -175,13 +175,3 @@ gen-vdsosym := $(srctree)/$(src)/../vdso/gen_vdso_offsets.sh - quiet_cmd_vdsosym = VDSOSYM $@ - # The AArch64 nm should be able to read an AArch32 binary - cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ -- --# Install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL32 $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/vdso32.so -- --vdso.so: $(obj)/vdso.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso.so -diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile -index ed47a3a87768e..6f618fb3863a4 100644 ---- a/arch/loongarch/Makefile -+++ b/arch/loongarch/Makefile -@@ -110,9 +110,7 @@ vdso_prepare: prepare0 - $(Q)$(MAKE) $(build)=arch/loongarch/vdso include/generated/vdso-offsets.h - endif - --PHONY += vdso_install --vdso_install: -- $(Q)$(MAKE) $(build)=arch/loongarch/vdso $@ -+vdso-install-y += arch/loongarch/vdso/vdso.so.dbg - - all: $(notdir $(KBUILD_IMAGE)) - -diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile -index d89e2ac75f7b8..8b308b7edadd8 100644 ---- a/arch/loongarch/vdso/Makefile -+++ b/arch/loongarch/vdso/Makefile -@@ -85,13 +85,3 @@ $(obj)/vdso.so: $(obj)/vdso.so.dbg FORCE - obj-y += vdso.o - - $(obj)/vdso.o : $(obj)/vdso.so -- --# install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ -- --vdso.so: $(obj)/vdso.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso.so -diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile -index a2d8600521f93..dffe5f7382146 100644 ---- a/arch/parisc/Makefile -+++ b/arch/parisc/Makefile -@@ -175,12 +175,8 @@ vdso_prepare: prepare0 - $(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso32 include/generated/vdso32-offsets.h - endif - --PHONY += vdso_install -- --vdso_install: -- $(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso $@ -- $(if $(CONFIG_COMPAT_VDSO), \ -- $(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso32 $@) -+vdso-install-y += arch/parisc/kernel/vdso32/vdso32.so -+vdso-install-$(CONFIG_64BIT) += arch/parisc/kernel/vdso64/vdso64.so - - install: KBUILD_IMAGE := vmlinux - zinstall: KBUILD_IMAGE := vmlinuz -diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile -index 3cb876f83187d..9711d2b0df051 100644 ---- a/arch/riscv/Makefile -+++ b/arch/riscv/Makefile -@@ -129,12 +129,6 @@ endif - libs-y += arch/riscv/lib/ - libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a - --PHONY += vdso_install --vdso_install: -- $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@ -- $(if $(CONFIG_COMPAT),$(Q)$(MAKE) \ -- $(build)=arch/riscv/kernel/compat_vdso compat_$@) -- - ifeq ($(KBUILD_EXTMOD),) - ifeq ($(CONFIG_MMU),y) - prepare: vdso_prepare -@@ -146,6 +140,9 @@ vdso_prepare: prepare0 - endif - endif - -+vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg -+vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg:../compat_vdso/compat_vdso.so -+ - ifneq ($(CONFIG_XIP_KERNEL),y) - ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy) - KBUILD_IMAGE := $(boot)/loader.bin -diff --git a/arch/riscv/kernel/compat_vdso/Makefile b/arch/riscv/kernel/compat_vdso/Makefile -index 737c0857b14cd..bd6eb768070f9 100644 ---- a/arch/riscv/kernel/compat_vdso/Makefile -+++ b/arch/riscv/kernel/compat_vdso/Makefile -@@ -76,13 +76,3 @@ quiet_cmd_compat_vdsold = VDSOLD $@ - # actual build commands - quiet_cmd_compat_vdsoas = VDSOAS $@ - cmd_compat_vdsoas = $(COMPAT_CC) $(a_flags) $(COMPAT_CC_FLAGS) -c -o $@ $< -- --# install commands for the unstripped file --quiet_cmd_compat_vdso_install = INSTALL $@ -- cmd_compat_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/compat_vdso/$@ -- --compat_vdso.so: $(obj)/compat_vdso.so.dbg -- @mkdir -p $(MODLIB)/compat_vdso -- $(call cmd,compat_vdso_install) -- --compat_vdso_install: compat_vdso.so -diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile -index 06e6b27f3bcc9..f4983bf149816 100644 ---- a/arch/riscv/kernel/vdso/Makefile -+++ b/arch/riscv/kernel/vdso/Makefile -@@ -71,13 +71,3 @@ quiet_cmd_vdsold = VDSOLD $@ - cmd_vdsold = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \ - $(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \ - rm $@.tmp -- --# install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ -- --vdso.so: $(obj)/vdso.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso.so -diff --git a/arch/s390/Makefile b/arch/s390/Makefile -index 5ed242897b0d2..23f39c3cd536d 100644 ---- a/arch/s390/Makefile -+++ b/arch/s390/Makefile -@@ -139,9 +139,6 @@ bzImage: vmlinux - zfcpdump: - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ - --vdso_install: -- $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ -- - archheaders: - $(Q)$(MAKE) $(build)=$(syscalls) uapi - -@@ -161,6 +158,9 @@ vdso_prepare: prepare0 - $(if $(CONFIG_COMPAT),$(Q)$(MAKE) \ - $(build)=arch/s390/kernel/vdso32 include/generated/vdso32-offsets.h) - -+vdso-install-y += arch/s390/kernel/vdso64/vdso64.so.dbg -+vdso-install-$(CONFIG_COMPAT) += arch/s390/kernel/vdso32/vdso32.so.dbg -+ - ifdef CONFIG_EXPOLINE_EXTERN - modules_prepare: expoline_prepare - expoline_prepare: scripts -diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile -index 66f7b0c8e6117..bf30997657ac8 100644 ---- a/arch/s390/kernel/vdso32/Makefile -+++ b/arch/s390/kernel/vdso32/Makefile -@@ -60,16 +60,6 @@ quiet_cmd_vdso32as = VDSO32A $@ - quiet_cmd_vdso32cc = VDSO32C $@ - cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $< - --# install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ -- --vdso32.so: $(obj)/vdso32.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso32.so -- - # Generate VDSO offsets using helper script - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh - quiet_cmd_vdsosym = VDSOSYM $@ -diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile -index e520c548d303e..f8643d50ba6a6 100644 ---- a/arch/s390/kernel/vdso64/Makefile -+++ b/arch/s390/kernel/vdso64/Makefile -@@ -70,16 +70,6 @@ quiet_cmd_vdso64as = VDSO64A $@ - quiet_cmd_vdso64cc = VDSO64C $@ - cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $< - --# install commands for the unstripped file --quiet_cmd_vdso_install = INSTALL $@ -- cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ -- --vdso64.so: $(obj)/vdso64.so.dbg -- @mkdir -p $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --vdso_install: vdso64.so -- - # Generate VDSO offsets using helper script - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh - quiet_cmd_vdsosym = VDSOSYM $@ -diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile -index a4ea5b05f2885..d0f2224d5600d 100644 ---- a/arch/sparc/Makefile -+++ b/arch/sparc/Makefile -@@ -75,9 +75,8 @@ install: - archheaders: - $(Q)$(MAKE) $(build)=arch/sparc/kernel/syscalls all - --PHONY += vdso_install --vdso_install: -- $(Q)$(MAKE) $(build)=arch/sparc/vdso $@ -+vdso-install-$(CONFIG_SPARC64) += arch/sparc/vdso/vdso64.so.dbg -+vdso-install-$(CONFIG_COMPAT) += arch/sparc/vdso/vdso32.so.dbg - - # This is the image used for packaging - KBUILD_IMAGE := $(boot)/zImage -diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile -index 77d7b9032158c..d08c3a0443f3a 100644 ---- a/arch/sparc/vdso/Makefile -+++ b/arch/sparc/vdso/Makefile -@@ -116,30 +116,3 @@ quiet_cmd_vdso = VDSO $@ - - VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic - GCOV_PROFILE := n -- --# --# Install the unstripped copies of vdso*.so. If our toolchain supports --# build-id, install .build-id links as well. --# --quiet_cmd_vdso_install = INSTALL $(@:install_%=%) --define cmd_vdso_install -- cp $< "$(MODLIB)/vdso/$(@:install_%=%)"; \ -- if readelf -n $< |grep -q 'Build ID'; then \ -- buildid=`readelf -n $< |grep 'Build ID' |sed -e 's/^.*Build ID: \(.*\)$$/\1/'`; \ -- first=`echo $$buildid | cut -b-2`; \ -- last=`echo $$buildid | cut -b3-`; \ -- mkdir -p "$(MODLIB)/vdso/.build-id/$$first"; \ -- ln -sf "../../$(@:install_%=%)" "$(MODLIB)/vdso/.build-id/$$first/$$last.debug"; \ -- fi --endef -- --vdso_img_insttargets := $(vdso_img_sodbg:%.dbg=install_%) -- --$(MODLIB)/vdso: FORCE -- @mkdir -p $(MODLIB)/vdso -- --$(vdso_img_insttargets): install_%: $(obj)/%.dbg $(MODLIB)/vdso FORCE -- $(call cmd,vdso_install) -- --PHONY += vdso_install $(vdso_img_insttargets) --vdso_install: $(vdso_img_insttargets) FORCE -diff --git a/arch/x86/Makefile b/arch/x86/Makefile -index 3419ffa2a3507..1f22efb16212d 100644 ---- a/arch/x86/Makefile -+++ b/arch/x86/Makefile -@@ -285,9 +285,10 @@ PHONY += install - install: - $(call cmd,install) - --PHONY += vdso_install --vdso_install: -- $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ -+vdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg -+vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdsox32.so.dbg -+vdso-install-$(CONFIG_X86_32) += arch/x86/entry/vdso/vdso32.so.dbg -+vdso-install-$(CONFIG_IA32_EMULATION) += arch/x86/entry/vdso/vdso32.so.dbg - - archprepare: checkbin - checkbin: -diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile -index 3e88b9df8c8f1..4ee8c3c320586 100644 ---- a/arch/x86/entry/vdso/Makefile -+++ b/arch/x86/entry/vdso/Makefile -@@ -190,31 +190,4 @@ GCOV_PROFILE := n - quiet_cmd_vdso_and_check = VDSO $@ - cmd_vdso_and_check = $(cmd_vdso); $(cmd_vdso_check) - --# --# Install the unstripped copies of vdso*.so. If our toolchain supports --# build-id, install .build-id links as well. --# --quiet_cmd_vdso_install = INSTALL $(@:install_%=%) --define cmd_vdso_install -- cp $< "$(MODLIB)/vdso/$(@:install_%=%)"; \ -- if readelf -n $< |grep -q 'Build ID'; then \ -- buildid=`readelf -n $< |grep 'Build ID' |sed -e 's/^.*Build ID: \(.*\)$$/\1/'`; \ -- first=`echo $$buildid | cut -b-2`; \ -- last=`echo $$buildid | cut -b3-`; \ -- mkdir -p "$(MODLIB)/vdso/.build-id/$$first"; \ -- ln -sf "../../$(@:install_%=%)" "$(MODLIB)/vdso/.build-id/$$first/$$last.debug"; \ -- fi --endef -- --vdso_img_insttargets := $(vdso_img_sodbg:%.dbg=install_%) -- --$(MODLIB)/vdso: FORCE -- @mkdir -p $(MODLIB)/vdso -- --$(vdso_img_insttargets): install_%: $(obj)/%.dbg $(MODLIB)/vdso -- $(call cmd,vdso_install) -- --PHONY += vdso_install $(vdso_img_insttargets) --vdso_install: $(vdso_img_insttargets) -- - clean-files := vdso32.so vdso32.so.dbg vdso64* vdso-image-*.c vdsox32.so* -diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst -new file mode 100644 -index 0000000000000..1022d9fdd976d ---- /dev/null -+++ b/scripts/Makefile.vdsoinst -@@ -0,0 +1,45 @@ -+# SPDX-License-Identifier: GPL-2.0-only -+# ========================================================================== -+# Install unstripped copies of vDSO -+# ========================================================================== -+ -+PHONY := __default -+__default: -+ @: -+ -+include $(srctree)/scripts/Kbuild.include -+ -+install-dir := $(MODLIB)/vdso -+ -+define gen_install_rules -+ -+src := $$(firstword $$(subst :,$(space),$(1))) -+dest := $(install-dir)/$$(or $$(word 2,$$(subst :,$(space),$(1))),$$(patsubst %.dbg,%,$$(notdir $(1)))) -+ -+__default: $$(dest) -+$$(dest): $$(src) FORCE -+ $$(call cmd,install) -+ -+# Some architectures create .build-id symlinks -+ifneq ($(filter arm sparc x86, $(SRCARCH)),) -+link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p') -+ -+__default: $$(link) -+$$(link): $$(dest) FORCE -+ $$(call cmd,symlink) -+endif -+ -+endef -+ -+$(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call gen_install_rules,$(x)))) -+ -+quiet_cmd_install = INSTALL $@ -+ cmd_install = mkdir -p $(dir $@); cp $< $@ -+ -+quiet_cmd_symlink = SYMLINK $@ -+ cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@ -+ -+PHONY += FORCE -+FORCE: -+ -+.PHONY: $(PHONY) --- -2.43.0 - diff --git a/queue-6.1/series b/queue-6.1/series index 980ea067aae..00349b23ac8 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -352,10 +352,6 @@ loongarch-fix-callchain-parse-error-with-kernel-trac.patch s390-vdso-filter-out-mno-pic-data-is-text-relative-c.patch s390-vdso64-filter-out-munaligned-symbols-flag-for-v.patch s390-vdso-generate-unwind-information-for-c-modules.patch -arm-add-multi_v7_lpae_defconfig.patch -arm64-configs-add-virtconfig.patch -kbuild-unify-vdso_install-rules.patch -kbuild-fix-build-id-symlinks-to-installed-debug-vdso.patch s390-vdso-create-.build-id-links-for-unstripped-vdso.patch s390-vdso-use-standard-stack-frame-layout.patch s390-ipl-fix-incorrect-initialization-of-len-fields-.patch -- 2.47.3