From nobody Fri Dec 19 08:53:23 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 725BA2C21F5; Wed, 8 Oct 2025 22:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963625; cv=none; b=TkLApCV25En5PF05MKjTf/Y7UuVh+PtBtXMCWZ5+n8qePzMXOpLhag+pT9/gzBEfP4FKRkwLa10eNjf7H+R2NiqKEMWr7B+/PS5ySOCEFKEWf4ESU6OQpWtxcKiMDpzkyEN1cSIfBpHYkGNKp0Zgxy96mo6w9YF14Fgwg1GE0YE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963625; c=relaxed/simple; bh=mw64TwJd2BQdFxVSO/KZsV1CoCKO+1PhICHSYCmN1dc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TQSg8XHQfZJ085oj+/M4K8HU1Cuq14CF5eSP/MEvRzewRhXVQeIBSxzKj8Kb1XRMlJBHMifQIOR1y8EBL+AJx3XOkQ69b806mNqw7U4EO+zmB8uydd7tJsbPDaV/1kSIP5mGH+VfdYIpiomwtkdXjmcJZ7BTIP+PBmzBz2/M0A8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kba3TNbh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kba3TNbh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74ADEC4CEF8; Wed, 8 Oct 2025 22:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759963625; bh=mw64TwJd2BQdFxVSO/KZsV1CoCKO+1PhICHSYCmN1dc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kba3TNbhJlx+vlaSdPPb0r9ERKRCnSRMu31MAFZb+1scifn2kCRf49BBWxOxWbuEv GccUwhDt0EU8QxMfJm4ZSkdm7kOERZFB36ljnpevQ4Y5inRu5sGPVs0CvagDTlSoSD EUxxBPScah6vygn984ALmxorAiKRVw/+B1Yua6/ups+Ph/t7nXtSTfurHDHCbU27c3 bOALhnMkK4Qtafoqa9eBRShcL2PLrpMPujYcjOD82dZlJ2twGHJRhUO0o6nC6wuXkF 1o25As2+GAB8u4zt1+j2bfPCwLZk9oFHj3GKuFGKFy++9NI4eq5qBKJjWgXCRCKXME +B2uNAFixD6Kg== From: Nathan Chancellor Date: Wed, 08 Oct 2025 15:46:44 -0700 Subject: [PATCH 1/3] kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251008-kbuild-fix-modinfo-regressions-v1-1-9fc776c5887c@kernel.org> References: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> In-Reply-To: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> To: Nathan Chancellor , Nicolas Schier Cc: Alexey Gladkov , Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Alexandre Ghiti X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1163; i=nathan@kernel.org; h=from:subject:message-id; bh=mw64TwJd2BQdFxVSO/KZsV1CoCKO+1PhICHSYCmN1dc=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnPXj6OrPyvJsT6srRn6a/u1GXXXpbwzpR6lHHlT7Xnt ScLoyuDO0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBE/DgY/pdK7/Jb9q7hv1Wi tPIP8SjvnVyb5H89k77BPVs8IePeDRWGf0Z6ut518RIlMWpzPzmVdru++ylVfHQv42Pt+PkvGAt nsAAA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Commit 0ce5139fd96e ("kbuild: always create intermediate vmlinux.unstripped") removed the pattern to avoid stripping .rela.dyn sections added by commit e9d86b8e17e7 ("scripts: Do not strip .rela.dyn section"). Restore it so that .rela.dyn sections remain in the final vmlinux. Fixes: 0ce5139fd96e ("kbuild: always create intermediate vmlinux.unstripped= ") Signed-off-by: Nathan Chancellor Acked-by: Alexey Gladkov Acked-by: Ard Biesheuvel Acked-by: Nicolas Schier --- Cc: Ard Biesheuvel Cc: Alexandre Ghiti --- scripts/Makefile.vmlinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index 7c6ae9886f8f..a62639982be5 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -82,7 +82,7 @@ endif # ------------------------------------------------------------------------= --- =20 remove-section-y :=3D .modinfo -remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) +=3D '.rel*' +remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) +=3D '.rel*' '!.rel*.dy= n' =20 remove-symbols :=3D -w --strip-symbol=3D'__mod_device_table__*' =20 --=20 2.51.0 From nobody Fri Dec 19 08:53:23 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 737AF2C3257; Wed, 8 Oct 2025 22:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963627; cv=none; b=GJJlBfm2pHlHdXUh8Q9y5PD66vVikdQJVBzqFVV1EhyOfBpBfwZFpR+q3lzKPsfLTzQLSqBABKVVajdDhUvhvhoT51fUXWI74Zx1edM8WGKYKYfSUkI0k5c96pgYCw9w1A5YOhewErOmNc5DjKnh+01VZi7dOWbvmJUB3PEGSUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963627; c=relaxed/simple; bh=Miox2e7D4Y8F1UCWvEmLj46ApSv2AyJ67frrLhbvL+s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lomhR6v/mUw8320rQqJWKoge/vMU+Ed48VNoNVZ4RtGlMeI1fu+vcuwQhv7VjI8kWj9C5IL9mRx2s3GhexkomscYKv6koPI20TF04RqX55z44kmfUBosejQ6a67qdrTN73twIzDLLUw/b6fXKLabOChNuGaTZStd79o3hllM2KY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r4cbxvcV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r4cbxvcV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7081BC4CEFE; Wed, 8 Oct 2025 22:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759963627; bh=Miox2e7D4Y8F1UCWvEmLj46ApSv2AyJ67frrLhbvL+s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=r4cbxvcVji4gTBzQZXb4gKR1iVu60nWpXmuefZ11V/AUdvP7Fwhq99K9bAU7UIz8T dJmRJ3Xtq6xGCQxFaFp4zguGgF7Tk+CPSMvHc/3aDEY40uHiR4ESXtPvaNAQ8znKPC NtU7QapmoeaBTxNuym+MQ/6Kmep/dRGk0FIMwWi1+xn9Vl/kwfe1/IKQ/CFCeFtdm9 1uy2Mz58LWkONN5vWdGnARVwcVF0UEl9kzzRGSUhy1Ej6Nbj32X8wIAMMtdcYPWupG lYhzch529K5874MZrCUGtKAL5w8xt1ljlYljvy+Rlv6EgbNl78tsWx5YE+W7RuqeG+ SsQ8DawCp50Xg== From: Nathan Chancellor Date: Wed, 08 Oct 2025 15:46:45 -0700 Subject: [PATCH 2/3] kbuild: Add '.rel.*' strip pattern for vmlinux Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251008-kbuild-fix-modinfo-regressions-v1-2-9fc776c5887c@kernel.org> References: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> In-Reply-To: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> To: Nathan Chancellor , Nicolas Schier Cc: Alexey Gladkov , Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Linux Kernel Functional Testing , Ard Biesheuvel X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2054; i=nathan@kernel.org; h=from:subject:message-id; bh=Miox2e7D4Y8F1UCWvEmLj46ApSv2AyJ67frrLhbvL+s=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnPXj4+UyjfJLjNhGfPuvRjqsL7dR7qZ//xNG6Qkl796 2TEb2eBjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjCRNG6G/8m6x2QT1FL5L0dY HbvmfeH8ayGj64923pzx1//aHKbpOrMZGZ54Pf/y8cSjC4rK/TYXj4d9VuO7sHnBtbp53Bl+lc1 rbnEBAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 Prior to binutils commit c12d9fa2afe ("Support objcopy --remove-section=3D.relaFOO") [1] in 2.32, stripping relocation sections required the trailing period (i.e., '.rel.*') to work properly. After commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped"), there is an error with binutils 2.31.1 or earlier because these sections are not properly removed: s390-linux-objcopy: st6tO8Ev: symbol `.modinfo' required but not present s390-linux-objcopy:st6tO8Ev: no symbols Add the old pattern to resolve this issue (along with a comment to allow cleaning this when binutils 2.32 or newer is the minimum supported version). While the aforementioned kbuild change exposes this, the pattern was originally changed by commit 71d815bf5dfd ("kbuild: Strip runtime const RELA sections correctly"), where it would still be incorrect with binutils older than 2.32. Fixes: 71d815bf5dfd ("kbuild: Strip runtime const RELA sections correctly") Link: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3Dc12d9= fa2afe7abcbe407a00e15719e1a1350c2a7 [1] Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/CA+G9fYvVktRhFtZXdNgVOL8j+ArsJDpvMLgCitaQvQ= mCx=3DhwOQ@mail.gmail.com/ Signed-off-by: Nathan Chancellor Acked-by: Alexey Gladkov Acked-by: Ard Biesheuvel Acked-by: Nicolas Schier --- Cc: Ard Biesheuvel --- scripts/Makefile.vmlinux | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index a62639982be5..c02f85c2e241 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -83,6 +83,9 @@ endif =20 remove-section-y :=3D .modinfo remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) +=3D '.rel*' '!.rel*.dy= n' +# for compatibility with binutils < 2.32 +# https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3Dc12d9fa2= afe7abcbe407a00e15719e1a1350c2a7 +remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) +=3D '.rel.*' =20 remove-symbols :=3D -w --strip-symbol=3D'__mod_device_table__*' =20 --=20 2.51.0 From nobody Fri Dec 19 08:53:23 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 269E82C3769; Wed, 8 Oct 2025 22:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963630; cv=none; b=piL0XW/TLRj6a4sWTzO4oG/5CaDeZfgo4+ocAtXaE0f/Wsk7vJbCVL7g7NiEJhFHNdWHxQJh9HWRDKtQv8BMe37JMcMb/CQE2Wzmmdf5Uvetrl+jMMcEZV6JjVjftRHLiThmrEMdvNByXwREO67DcV77lsGC9PUpDfC5onMEZpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759963630; c=relaxed/simple; bh=MmSj15jHMzn0CKEQNU4y1JyA4D5YNuL1L+U1napVCas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VRsgGX1qBt/mGM7KZw2+OEFocbcrYOKq1kGcn3uaFAZ5FgVeJjG1JTQnWLDyvDVMebgTcqChzSj5wkKwvjB3Ju5338nl0Bbjcxt6u3dukkh5ghC0ilvkddaEgWWJpym6dMPbiIjjVhXF9bMcuMtb5VDWdgD/w0fwdFV1r9w/zhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jTFGcpRJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jTFGcpRJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C09EC4CEE7; Wed, 8 Oct 2025 22:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759963629; bh=MmSj15jHMzn0CKEQNU4y1JyA4D5YNuL1L+U1napVCas=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jTFGcpRJy/Fmwjac4Cwvj3PDjM7MxlvEenLl66dxqHmmEEst5webr3bi4J0MBh5xG GEGEDpBg05c0Z7DmepQEdeWG08RYxyuTWB1Myh+2hhgpJsiKLHdjsy1dPd+g7xIWHr 1caI2XAJTtKGphza6d3CQyqVUofrBtElrX25YS13M95UO6Ezys9X+f0pDfTHibdapS mrrlbuMZpiJggo7ZIMdpRVQAx1MFrpVjq5oFQfzIYCbSR+R7jRVhPMMaf/KWKpdcql Cm/RC/DDDsTQfO03gB7RB0KbicBdojGqKIx08trEZEe+Ts/7BaQIS8ePvg2GP475wF RWCNmCAvIFdew== From: Nathan Chancellor Date: Wed, 08 Oct 2025 15:46:46 -0700 Subject: [PATCH 3/3] s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251008-kbuild-fix-modinfo-regressions-v1-3-9fc776c5887c@kernel.org> References: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> In-Reply-To: <20251008-kbuild-fix-modinfo-regressions-v1-0-9fc776c5887c@kernel.org> To: Nathan Chancellor , Nicolas Schier Cc: Alexey Gladkov , Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=3481; i=nathan@kernel.org; h=from:subject:message-id; bh=MmSj15jHMzn0CKEQNU4y1JyA4D5YNuL1L+U1napVCas=; b=owGbwMvMwCUmm602sfCA1DTG02pJDBnPXj4+eXjv8cDtK+zll+zqMDx73uJE4RYpN+OJz5cws 02ePP/C+o5SFgYxLgZZMUWW6seqxw0N55xlvHFqEswcViaQIQxcnAIwkS5bhj98vYdaLW+0W//q qOopcljM1Bzz1PNAg4Oh5fEZkkff1+9jZDj67smfQxUboxVkvG9e03zLEjd9u06D8JTweHPXaRc uuTAAAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 When building s390 defconfig with binutils older than 2.32, there are several warnings during the final linking stage: s390-linux-ld: .tmp_vmlinux1: warning: allocated section `.got.plt' not i= n segment s390-linux-ld: .tmp_vmlinux2: warning: allocated section `.got.plt' not i= n segment s390-linux-ld: vmlinux.unstripped: warning: allocated section `.got.plt' = not in segment s390-linux-objcopy: vmlinux: warning: allocated section `.got.plt' not in= segment s390-linux-objcopy: st7afZyb: warning: allocated section `.got.plt' not i= n segment binutils commit afca762f598 ("S/390: Improve partial relro support for 64 bit") [1] in 2.32 changed where .got.plt is emitted, avoiding the warning. The :NONE in the .vmlinux.info output section description changes the segment for subsequent allocated sections. Move .vmlinux.info right above the discards section to place all other sections in the previously defined segment, .data. Fixes: 30226853d6ec ("s390: vmlinux.lds.S: explicitly handle '.got' and '.p= lt' sections") Link: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3Dafca7= 62f598d453c563f244cd3777715b1a0cb72 [1] Signed-off-by: Nathan Chancellor Acked-by: Alexander Gordeev Acked-by: Alexey Gladkov Acked-by: Nicolas Schier --- Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org --- arch/s390/kernel/vmlinux.lds.S | 44 +++++++++++++++++++++-----------------= ---- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index feecf1a6ddb4..d74d4c52ccd0 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -214,6 +214,28 @@ SECTIONS DWARF_DEBUG ELF_DETAILS =20 + /* + * Make sure that the .got.plt is either completely empty or it + * contains only the three reserved double words. + */ + .got.plt : { + *(.got.plt) + } + ASSERT(SIZEOF(.got.plt) =3D=3D 0 || SIZEOF(.got.plt) =3D=3D 0x18, "Unexpe= cted GOT/PLT entries detected!") + + /* + * Sections that should stay zero sized, which is safer to + * explicitly check instead of blindly discarding. + */ + .plt : { + *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt) + } + ASSERT(SIZEOF(.plt) =3D=3D 0, "Unexpected run-time procedure linkages det= ected!") + .rela.dyn : { + *(.rela.*) *(.rela_*) + } + ASSERT(SIZEOF(.rela.dyn) =3D=3D 0, "Unexpected run-time relocations (.rel= a) detected!") + /* * uncompressed image info used by the decompressor * it should match struct vmlinux_info @@ -244,28 +266,6 @@ SECTIONS #endif } :NONE =20 - /* - * Make sure that the .got.plt is either completely empty or it - * contains only the three reserved double words. - */ - .got.plt : { - *(.got.plt) - } - ASSERT(SIZEOF(.got.plt) =3D=3D 0 || SIZEOF(.got.plt) =3D=3D 0x18, "Unexpe= cted GOT/PLT entries detected!") - - /* - * Sections that should stay zero sized, which is safer to - * explicitly check instead of blindly discarding. - */ - .plt : { - *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt) - } - ASSERT(SIZEOF(.plt) =3D=3D 0, "Unexpected run-time procedure linkages det= ected!") - .rela.dyn : { - *(.rela.*) *(.rela_*) - } - ASSERT(SIZEOF(.rela.dyn) =3D=3D 0, "Unexpected run-time relocations (.rel= a) detected!") - /* Sections to be discarded */ DISCARDS /DISCARD/ : { --=20 2.51.0