mbox series

[0/4] Make gcc-8.1 and binutils-2.30 the minimum version

Message ID 20250407094116.1339199-1-arnd@kernel.org (mailing list archive)
Headers show
Series Make gcc-8.1 and binutils-2.30 the minimum version | expand

Message

Arnd Bergmann April 7, 2025, 9:41 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
actually go through all  version checks and make this is the minimum
for all architectures.

Most of the actual resulting changes are actually for raising the
binutils version, which eliminates version checks on x86 and arm64.

Arnd Bergmann (4):
  kbuild: require gcc-8 and binutils-2.30
  raid6: skip avx512 checks
  x86: remove checks for binutils-2.30 and earlier
  arm64: drop binutils version checks

Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-raid@vger.kernel.org
Cc: x86@kernel.org

 Documentation/admin-guide/README.rst          |  2 +-
 Documentation/kbuild/makefiles.rst            |  4 +-
 Documentation/process/changes.rst             |  4 +-
 .../translations/it_IT/process/changes.rst    |  4 +-
 .../translations/zh_CN/admin-guide/README.rst |  2 +-
 arch/arm64/Kconfig                            | 37 +--------------
 arch/arm64/Makefile                           | 21 +--------
 arch/arm64/include/asm/rwonce.h               |  4 --
 arch/arm64/kvm/Kconfig                        |  1 -
 arch/arm64/lib/xor-neon.c                     |  2 +-
 arch/um/Makefile                              |  4 +-
 arch/x86/Kconfig.assembler                    | 29 ------------
 arch/x86/crypto/Kconfig                       |  2 +-
 arch/x86/crypto/Makefile                      | 12 +++--
 arch/x86/crypto/aes-ctr-avx-x86_64.S          |  2 -
 arch/x86/crypto/aes-xts-avx-x86_64.S          |  2 -
 arch/x86/crypto/aesni-intel_glue.c            | 21 +--------
 arch/x86/crypto/aria-aesni-avx-asm_64.S       | 10 -----
 arch/x86/crypto/aria-aesni-avx2-asm_64.S      | 10 +----
 arch/x86/crypto/aria_aesni_avx2_glue.c        |  4 +-
 arch/x86/crypto/aria_aesni_avx_glue.c         |  4 +-
 arch/x86/crypto/blake2s-core.S                |  4 --
 arch/x86/crypto/blake2s-glue.c                |  6 +--
 arch/x86/crypto/chacha_glue.c                 |  6 +--
 arch/x86/crypto/poly1305-x86_64-cryptogams.pl |  8 ----
 arch/x86/crypto/poly1305_glue.c               |  4 +-
 arch/x86/crypto/sha1_ssse3_glue.c             | 10 -----
 arch/x86/crypto/sha256_ssse3_glue.c           | 10 -----
 include/linux/unroll.h                        |  4 +-
 kernel/gcov/gcc_4_7.c                         |  4 --
 lib/raid6/algos.c                             |  6 ---
 lib/raid6/avx512.c                            |  4 --
 lib/raid6/recov_avx512.c                      |  6 ---
 lib/raid6/test/Makefile                       |  3 --
 lib/test_fortify/Makefile                     |  5 +--
 scripts/Makefile.compiler                     |  2 +-
 scripts/gcc-plugins/gcc-common.h              | 45 -------------------
 scripts/min-tool-version.sh                   |  6 +--
 38 files changed, 36 insertions(+), 278 deletions(-)

Comments

Eric Biggers April 7, 2025, 4:41 p.m. UTC | #1
On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> actually go through all  version checks and make this is the minimum
> for all architectures.
> 
> Most of the actual resulting changes are actually for raising the
> binutils version, which eliminates version checks on x86 and arm64.
> 
> Arnd Bergmann (4):
>   kbuild: require gcc-8 and binutils-2.30
>   raid6: skip avx512 checks
>   x86: remove checks for binutils-2.30 and earlier
>   arm64: drop binutils version checks

This is intended to supersede the patches from Uros that removed checks for
binutils < 2.25, right?  See:

* https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
* https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
* https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/

If we can indeed bump up the requirement to 2.30, that would be great.

Just a note though: I recently added VAES and VPCLMULQDQ instructions to
BoringSSL, which increased the binutils requirement of building BoringSSL to
2.30, and this caused issues in a downstream project; e.g. see
https://github.com/briansmith/ring/issues/2463.  Specifically people complained
about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.

So I just thought I'd mention that, based on past experience with this sort of
thing, those are the specific cases where it seems people are most likely to be
trying to use binutils < 2.30.

But if those distros are not going to be supported any longer (without
installing newer tools on them), or even are already unsupported due to the gcc
requirement, bumping up the binutils requirement to 2.30 sounds good to me.

- Eric
David Laight April 7, 2025, 6:21 p.m. UTC | #2
On Mon, 7 Apr 2025 09:41:51 -0700
Eric Biggers <ebiggers@kernel.org> wrote:

> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> > actually go through all  version checks and make this is the minimum
> > for all architectures.
> > 
> > Most of the actual resulting changes are actually for raising the
> > binutils version, which eliminates version checks on x86 and arm64.
> > 
> > Arnd Bergmann (4):
> >   kbuild: require gcc-8 and binutils-2.30
> >   raid6: skip avx512 checks
> >   x86: remove checks for binutils-2.30 and earlier
> >   arm64: drop binutils version checks  
> 
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right?  See:
> 
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
> 
> If we can indeed bump up the requirement to 2.30, that would be great.
> 
> Just a note though: I recently added VAES and VPCLMULQDQ instructions to
> BoringSSL, which increased the binutils requirement of building BoringSSL to
> 2.30, and this caused issues in a downstream project; e.g. see
> https://github.com/briansmith/ring/issues/2463.  Specifically people complained
> about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.

Just tell them RHEL 7 is no longer supported :-)
(Was a right PITA installing an extra package on a CentOS 7 system we use as
a build machine...)

In any case it is relatively easy to install a later gcc - even though it ends
up in a very obscure place.

	David

> 
> So I just thought I'd mention that, based on past experience with this sort of
> thing, those are the specific cases where it seems people are most likely to be
> trying to use binutils < 2.30.
> 
> But if those distros are not going to be supported any longer (without
> installing newer tools on them), or even are already unsupported due to the gcc
> requirement, bumping up the binutils requirement to 2.30 sounds good to me.
> 
> - Eric
>
Ingo Molnar April 7, 2025, 6:30 p.m. UTC | #3
* Eric Biggers <ebiggers@kernel.org> wrote:

> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> > actually go through all  version checks and make this is the minimum
> > for all architectures.
> > 
> > Most of the actual resulting changes are actually for raising the
> > binutils version, which eliminates version checks on x86 and arm64.
> > 
> > Arnd Bergmann (4):
> >   kbuild: require gcc-8 and binutils-2.30
> >   raid6: skip avx512 checks
> >   x86: remove checks for binutils-2.30 and earlier
> >   arm64: drop binutils version checks
> 
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right?  See:
> 
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/

Yeah, so these commits (now pending in the x86 tree) should nicely 
complement each other, there shouldn't be much friction other than:

  a72d55dc3bd6 x86/idle: Remove CONFIG_AS_TPAUSE

... which will have a conflict in arch/x86/Kconfig.assembler but is 
straightforward to resolve.

> If we can indeed bump up the requirement to 2.30, that would be great.

Agreed.

Thanks,

	Ingo
Arnd Bergmann April 8, 2025, 7:43 a.m. UTC | #4
On Mon, Apr 7, 2025, at 18:41, Eric Biggers wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
>
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right?  See:
>
> * 
> https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> * 
> https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> * 
> https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/

I missed these, but it does sounds we easy to work out, either
by rebasing my patch or dropping Uros' version.

> If we can indeed bump up the requirement to 2.30, that would be great.
>
> Just a note though: I recently added VAES and VPCLMULQDQ instructions to
> BoringSSL, which increased the binutils requirement of building BoringSSL to
> 2.30, and this caused issues in a downstream project; e.g. see
> https://github.com/briansmith/ring/issues/2463.  Specifically people complained
> about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.
>
> So I just thought I'd mention that, based on past experience with this sort of
> thing, those are the specific cases where it seems people are most likely to be
> trying to use binutils < 2.30.
>
> But if those distros are not going to be supported any longer (without
> installing newer tools on them), or even are already unsupported due to the gcc
> requirement, bumping up the binutils requirement to 2.30 sounds good to me.

RHEL7 comes wit gcc-4.8.5, which is already too old to build the kernel,
so I'm not worried about it at all. RHEL8 and Debian 10 have gcc-8,
which is why that makes sense as a new minimum version.

SLES-15 (gcc-7), Debian 9 (gcc-6), and Ubuntu 18.05 (gcc-7) are the
ones that can currently build mainline kernels but are broken by this
change. SLES-15 is the only one of those that are still supported, but
they do ship with add-on compilers.

     Arnd
Ingo Molnar April 8, 2025, 8:16 a.m. UTC | #5
* Arnd Bergmann <arnd@arndb.de> wrote:

> On Mon, Apr 7, 2025, at 18:41, Eric Biggers wrote:
> > On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> >
> > This is intended to supersede the patches from Uros that removed checks for
> > binutils < 2.25, right?  See:
> >
> > * 
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> > * 
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> > * 
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
> 
> I missed these, but it does sounds we easy to work out, either
> by rebasing my patch or dropping Uros' version.

It's a trivial conflict resolution AFAICS, already done in today's 
-next.

Thanks,

	Ingo
Mark Rutland April 8, 2025, 2:20 p.m. UTC | #6
On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> actually go through all  version checks and make this is the minimum
> for all architectures.

I am very much in favour of this, so for the series:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Is the aim to get this in for v6.15?

I believe this will permit a number of further cleanups for arm64, and
if it's possible to get this in for v6.15, it'd be a bit easier to start
preparing those for v6.16. No big problem if that's not the case.

Mark.

> 
> Most of the actual resulting changes are actually for raising the
> binutils version, which eliminates version checks on x86 and arm64.
> 
> Arnd Bergmann (4):
>   kbuild: require gcc-8 and binutils-2.30
>   raid6: skip avx512 checks
>   x86: remove checks for binutils-2.30 and earlier
>   arm64: drop binutils version checks
> 
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Brian Gerst <brgerst@gmail.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nicolas Schier <nicolas@fjasle.eu>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Uros Bizjak <ubizjak@gmail.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-raid@vger.kernel.org
> Cc: x86@kernel.org
> 
>  Documentation/admin-guide/README.rst          |  2 +-
>  Documentation/kbuild/makefiles.rst            |  4 +-
>  Documentation/process/changes.rst             |  4 +-
>  .../translations/it_IT/process/changes.rst    |  4 +-
>  .../translations/zh_CN/admin-guide/README.rst |  2 +-
>  arch/arm64/Kconfig                            | 37 +--------------
>  arch/arm64/Makefile                           | 21 +--------
>  arch/arm64/include/asm/rwonce.h               |  4 --
>  arch/arm64/kvm/Kconfig                        |  1 -
>  arch/arm64/lib/xor-neon.c                     |  2 +-
>  arch/um/Makefile                              |  4 +-
>  arch/x86/Kconfig.assembler                    | 29 ------------
>  arch/x86/crypto/Kconfig                       |  2 +-
>  arch/x86/crypto/Makefile                      | 12 +++--
>  arch/x86/crypto/aes-ctr-avx-x86_64.S          |  2 -
>  arch/x86/crypto/aes-xts-avx-x86_64.S          |  2 -
>  arch/x86/crypto/aesni-intel_glue.c            | 21 +--------
>  arch/x86/crypto/aria-aesni-avx-asm_64.S       | 10 -----
>  arch/x86/crypto/aria-aesni-avx2-asm_64.S      | 10 +----
>  arch/x86/crypto/aria_aesni_avx2_glue.c        |  4 +-
>  arch/x86/crypto/aria_aesni_avx_glue.c         |  4 +-
>  arch/x86/crypto/blake2s-core.S                |  4 --
>  arch/x86/crypto/blake2s-glue.c                |  6 +--
>  arch/x86/crypto/chacha_glue.c                 |  6 +--
>  arch/x86/crypto/poly1305-x86_64-cryptogams.pl |  8 ----
>  arch/x86/crypto/poly1305_glue.c               |  4 +-
>  arch/x86/crypto/sha1_ssse3_glue.c             | 10 -----
>  arch/x86/crypto/sha256_ssse3_glue.c           | 10 -----
>  include/linux/unroll.h                        |  4 +-
>  kernel/gcov/gcc_4_7.c                         |  4 --
>  lib/raid6/algos.c                             |  6 ---
>  lib/raid6/avx512.c                            |  4 --
>  lib/raid6/recov_avx512.c                      |  6 ---
>  lib/raid6/test/Makefile                       |  3 --
>  lib/test_fortify/Makefile                     |  5 +--
>  scripts/Makefile.compiler                     |  2 +-
>  scripts/gcc-plugins/gcc-common.h              | 45 -------------------
>  scripts/min-tool-version.sh                   |  6 +--
>  38 files changed, 36 insertions(+), 278 deletions(-)
> 
> -- 
> 2.39.5
>
Arnd Bergmann April 8, 2025, 5:16 p.m. UTC | #7
On Tue, Apr 8, 2025, at 16:20, Mark Rutland wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
>> actually go through all  version checks and make this is the minimum
>> for all architectures.
>
> I am very much in favour of this, so for the series:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
>
> Is the aim to get this in for v6.15?
>
> I believe this will permit a number of further cleanups for arm64, and
> if it's possible to get this in for v6.15, it'd be a bit easier to start
> preparing those for v6.16. No big problem if that's not the case.

I wasn't planning to push it for 6.15, as we've discussed this change
for a long time already, I don't think there is any rush now, though
I agree it would have helped to have it earlier.

I already found another follow-up, removing support for the sancov
gcc plugin that is no longer needed, I'm sure there is more.

     Arnd