2020-03-24 08:52:08

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 00/16] x86, crypto: remove always-defined CONFIG_AS_* and cosolidate Kconfig/Makefiles

This series of cleanups was prompted by Linus:
https://lkml.org/lkml/2020/3/12/726

First, this series drop always-on CONFIG_AS_* options.
Some of those options were introduced in old days.
For example, the check for CONFIG_AS_CFI dates back to 2006.

We raise the minimal tool versions from time to time.
Currently, we require binutils 2.21
(and we plan to bump it to 2.23 for v5.7-rc1).

After cleaning away the old checks,
as-instr calls are moved to Kconfig from Makefiles.
(patch 11)

This allows more Kconfig / Makefile cleanups.
Patch 12 is complex, but I double-checked it does the equivalent.

Patch 14 bumps the binutils version to 2.23,
and patch 15 removes more CONFIG_AS_* options.

I folded all relevanet patches into this series,
as suggested by Jason A. Donenfeld.

If x86 maintainers take care of this series, that's good.

If it is OK to queue this up to Kbuild tree,
I will send a pull request to Linus.

Thank you.



Borislav Petkov (1):
Documentation/changes: Raise minimum supported binutils version to
2.23

Jason A. Donenfeld (4):
x86: probe assembler capabilities via kconfig instead of makefile
crypto: x86 - rework configuration based on Kconfig
crypto: curve25519 - do not pollute dispatcher based on assembler
x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2

Masahiro Yamada (11):
lib/raid6/test: fix build on distros whose /bin/sh is not bash
x86: remove unneeded defined(__ASSEMBLY__) check from asm/dwarf2.h
x86: remove always-defined CONFIG_AS_CFI
x86: remove unneeded (CONFIG_AS_)CFI_SIGNAL_FRAME
x86: remove always-defined CONFIG_AS_CFI_SECTIONS
x86: remove always-defined CONFIG_AS_SSSE3
x86: remove always-defined CONFIG_AS_AVX
x86: add comments about the binutils version to support code in
as-instr
x86: replace arch macros from compiler with CONFIG_X86_{32,64}
drm/i915: remove always-defined CONFIG_AS_MOVNTDQA
crypto: x86 - clean up poly1305-x86_64-cryptogams.S by 'make clean'

Documentation/process/changes.rst | 4 +-
arch/x86/Kconfig | 2 +
arch/x86/Kconfig.assembler | 14 ++
arch/x86/Makefile | 22 ---
arch/x86/crypto/Makefile | 162 +++++++-----------
arch/x86/crypto/aesni-intel_avx-x86_64.S | 6 -
arch/x86/crypto/aesni-intel_glue.c | 21 +--
arch/x86/crypto/blake2s-core.S | 2 -
arch/x86/crypto/chacha_glue.c | 6 +-
arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 16 --
arch/x86/crypto/poly1305_glue.c | 11 +-
arch/x86/crypto/sha1_ssse3_asm.S | 4 -
arch/x86/crypto/sha1_ssse3_glue.c | 13 --
arch/x86/crypto/sha256-avx-asm.S | 3 -
arch/x86/crypto/sha256-avx2-asm.S | 3 -
arch/x86/crypto/sha256_ssse3_glue.c | 12 --
arch/x86/crypto/sha512-avx-asm.S | 2 -
arch/x86/crypto/sha512-avx2-asm.S | 3 -
arch/x86/crypto/sha512_ssse3_glue.c | 10 --
arch/x86/include/asm/dwarf2.h | 44 -----
arch/x86/include/asm/xor_avx.h | 9 -
drivers/gpu/drm/i915/Makefile | 3 -
drivers/gpu/drm/i915/i915_memcpy.c | 5 -
include/crypto/curve25519.h | 6 +-
kernel/signal.c | 2 +-
lib/raid6/algos.c | 12 +-
lib/raid6/avx2.c | 4 -
lib/raid6/recov_avx2.c | 6 -
lib/raid6/recov_ssse3.c | 6 -
lib/raid6/test/Makefile | 9 +-
30 files changed, 98 insertions(+), 324 deletions(-)
create mode 100644 arch/x86/Kconfig.assembler

--
2.17.1


2020-03-24 08:52:10

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 11/16] x86: probe assembler capabilities via kconfig instead of makefile

From: "Jason A. Donenfeld" <[email protected]>

Doing this probing inside of the Makefiles means we have a maze of
ifdefs inside the source code and child Makefiles that need to make
proper decisions on this too. Instead, we do it at Kconfig time, like
many other compiler and assembler options, which allows us to set up the
dependencies normally for full compilation units. In the process, the
ADX test changes to use %eax instead of %r10 so that it's valid in both
32-bit and 64-bit mode.

Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
---

arch/x86/Kconfig | 2 ++
arch/x86/Kconfig.assembler | 22 ++++++++++++++++++++++
arch/x86/Makefile | 15 ---------------
3 files changed, 24 insertions(+), 15 deletions(-)
create mode 100644 arch/x86/Kconfig.assembler

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index beea77046f9b..707673227837 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2935,3 +2935,5 @@ config HAVE_ATOMIC_IOMAP
source "drivers/firmware/Kconfig"

source "arch/x86/kvm/Kconfig"
+
+source "arch/x86/Kconfig.assembler"
diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler
new file mode 100644
index 000000000000..46868ec7b723
--- /dev/null
+++ b/arch/x86/Kconfig.assembler
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
+
+# binutils >= 2.22
+config AS_AVX2
+ def_bool $(as-instr,vpbroadcastb %xmm0$(comma)%ymm1)
+
+# binutils >= 2.25
+config AS_AVX512
+ def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5)
+
+# binutils >= 2.24
+config AS_SHA1_NI
+ def_bool $(as-instr,sha1msg1 %xmm0$(comma)%xmm1)
+
+# binutils >= 2.24
+config AS_SHA256_NI
+ def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1)
+
+# binutils >= 2.23
+config AS_ADX
+ def_bool $(as-instr,adox %eax$(comma)%eax)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 4c57cb3018fb..b65ec63c7db7 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -177,21 +177,6 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
endif

-# does binutils support specific instructions?
-# binutils >= 2.22
-avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
-# binutils >= 2.25
-avx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1)
-# binutils >= 2.24
-sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1)
-# binutils >= 2.24
-sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1)
-# binutils >= 2.23
-adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1)
-
-KBUILD_AFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
-KBUILD_CFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
-
KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)

#
--
2.17.1

2020-03-24 08:52:31

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 03/16] x86: remove always-defined CONFIG_AS_CFI

CONFIG_AS_CFI was introduced by commit e2414910f212 ("[PATCH] x86:
Detect CFI support in the assembler at runtime"), and extended by
commit f0f12d85af85 ("x86_64: Check for .cfi_rel_offset in CFI probe").

We raise the minimal supported binutils version from time to time.
The last bump was commit 1fb12b35e5ff ("kbuild: Raise the minimum
required binutils version to 2.21").

I confirmed the code in $(call as-instr,...) can be assembled by the
binutils 2.21 assembler and also by LLVM integrated assembler.

Remove CONFIG_AS_CFI, which is always defined.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Jason A. Donenfeld <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
---

If this series is applied,
we can hard-code the assembler code, and delete CFI_* macros entirely.


arch/x86/Makefile | 10 ++--------
arch/x86/include/asm/dwarf2.h | 36 -----------------------------------
2 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 513a55562d75..72f8f744ebd7 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -177,12 +177,6 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
endif

-# Stackpointer is addressed different for 32 bit and 64 bit x86
-sp-$(CONFIG_X86_32) := esp
-sp-$(CONFIG_X86_64) := rsp
-
-# do binutils support CFI?
-cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1)
# is .cfi_signal_frame supported too?
cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
@@ -196,8 +190,8 @@ sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=
sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1)
adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1)

-KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
-KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
+KBUILD_AFLAGS += $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
+KBUILD_CFLAGS += $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)

KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)

diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h
index 5a0502212bc5..90807583cad7 100644
--- a/arch/x86/include/asm/dwarf2.h
+++ b/arch/x86/include/asm/dwarf2.h
@@ -6,15 +6,6 @@
#warning "asm/dwarf2.h should be only included in pure assembly files"
#endif

-/*
- * Macros for dwarf2 CFI unwind table entries.
- * See "as.info" for details on these pseudo ops. Unfortunately
- * they are only supported in very new binutils, so define them
- * away for older version.
- */
-
-#ifdef CONFIG_AS_CFI
-
#define CFI_STARTPROC .cfi_startproc
#define CFI_ENDPROC .cfi_endproc
#define CFI_DEF_CFA .cfi_def_cfa
@@ -55,31 +46,4 @@
#endif
#endif

-#else
-
-/*
- * Due to the structure of pre-exisiting code, don't use assembler line
- * comment character # to ignore the arguments. Instead, use a dummy macro.
- */
-.macro cfi_ignore a=0, b=0, c=0, d=0
-.endm
-
-#define CFI_STARTPROC cfi_ignore
-#define CFI_ENDPROC cfi_ignore
-#define CFI_DEF_CFA cfi_ignore
-#define CFI_DEF_CFA_REGISTER cfi_ignore
-#define CFI_DEF_CFA_OFFSET cfi_ignore
-#define CFI_ADJUST_CFA_OFFSET cfi_ignore
-#define CFI_OFFSET cfi_ignore
-#define CFI_REL_OFFSET cfi_ignore
-#define CFI_REGISTER cfi_ignore
-#define CFI_RESTORE cfi_ignore
-#define CFI_REMEMBER_STATE cfi_ignore
-#define CFI_RESTORE_STATE cfi_ignore
-#define CFI_UNDEFINED cfi_ignore
-#define CFI_ESCAPE cfi_ignore
-#define CFI_SIGNAL_FRAME cfi_ignore
-
-#endif
-
#endif /* _ASM_X86_DWARF2_H */
--
2.17.1

2020-03-24 08:52:47

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 16/16] crypto: x86 - clean up poly1305-x86_64-cryptogams.S by 'make clean'

poly1305-x86_64-cryptogams.S is a generated file, so it should be
cleaned up by 'make clean'.

Assigning it to the variable 'targets' teaches Kbuild that it is a
generated file. However, this line is not evaluated while cleaning
because scripts/Makefile.clean does not include include/config/auto.conf.

Removing the ifneq-conditional, so this file is correctly cleaned up.

Signed-off-by: Masahiro Yamada <[email protected]>
---

arch/x86/crypto/Makefile | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 928aad453c72..a31de0c6ccde 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -83,9 +83,7 @@ crct10dif-pclmul-y := crct10dif-pcl-asm_64.o crct10dif-pclmul_glue.o

obj-$(CONFIG_CRYPTO_POLY1305_X86_64) += poly1305-x86_64.o
poly1305-x86_64-y := poly1305-x86_64-cryptogams.o poly1305_glue.o
-ifneq ($(CONFIG_CRYPTO_POLY1305_X86_64),)
targets += poly1305-x86_64-cryptogams.S
-endif

obj-$(CONFIG_CRYPTO_NHPOLY1305_SSE2) += nhpoly1305-sse2.o
nhpoly1305-sse2-y := nh-sse2-x86_64.o nhpoly1305-sse2-glue.o
--
2.17.1

2020-03-24 11:57:08

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 16/16] crypto: x86 - clean up poly1305-x86_64-cryptogams.S by 'make clean'

On Tue, Mar 24, 2020 at 05:48:21PM +0900, Masahiro Yamada wrote:
> poly1305-x86_64-cryptogams.S is a generated file, so it should be
> cleaned up by 'make clean'.
>
> Assigning it to the variable 'targets' teaches Kbuild that it is a
> generated file. However, this line is not evaluated while cleaning
> because scripts/Makefile.clean does not include include/config/auto.conf.
>
> Removing the ifneq-conditional, so this file is correctly cleaned up.
>
> Signed-off-by: Masahiro Yamada <[email protected]>
> ---
>
> arch/x86/crypto/Makefile | 2 --
> 1 file changed, 2 deletions(-)

Acked-by: Herbert Xu <[email protected]>
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2020-03-24 17:02:15

by Nick Desaulniers

[permalink] [raw]
Subject: Re: [PATCH 11/16] x86: probe assembler capabilities via kconfig instead of makefile

Can 11 just be rebased with 8 dropped?

On Tue, Mar 24, 2020 at 1:49 AM Masahiro Yamada <[email protected]> wrote:
>
> From: "Jason A. Donenfeld" <[email protected]>
>
> Doing this probing inside of the Makefiles means we have a maze of
> ifdefs inside the source code and child Makefiles that need to make
> proper decisions on this too. Instead, we do it at Kconfig time, like
> many other compiler and assembler options, which allows us to set up the
> dependencies normally for full compilation units. In the process, the
> ADX test changes to use %eax instead of %r10 so that it's valid in both
> 32-bit and 64-bit mode.
>
> Signed-off-by: Jason A. Donenfeld <[email protected]>
> Signed-off-by: Masahiro Yamada <[email protected]>
> ---
>
> arch/x86/Kconfig | 2 ++
> arch/x86/Kconfig.assembler | 22 ++++++++++++++++++++++
> arch/x86/Makefile | 15 ---------------
> 3 files changed, 24 insertions(+), 15 deletions(-)
> create mode 100644 arch/x86/Kconfig.assembler
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index beea77046f9b..707673227837 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2935,3 +2935,5 @@ config HAVE_ATOMIC_IOMAP
> source "drivers/firmware/Kconfig"
>
> source "arch/x86/kvm/Kconfig"
> +
> +source "arch/x86/Kconfig.assembler"
> diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler
> new file mode 100644
> index 000000000000..46868ec7b723
> --- /dev/null
> +++ b/arch/x86/Kconfig.assembler
> @@ -0,0 +1,22 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (C) 2020 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
> +
> +# binutils >= 2.22
> +config AS_AVX2
> + def_bool $(as-instr,vpbroadcastb %xmm0$(comma)%ymm1)
> +
> +# binutils >= 2.25
> +config AS_AVX512
> + def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5)
> +
> +# binutils >= 2.24
> +config AS_SHA1_NI
> + def_bool $(as-instr,sha1msg1 %xmm0$(comma)%xmm1)
> +
> +# binutils >= 2.24
> +config AS_SHA256_NI
> + def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1)
> +
> +# binutils >= 2.23
> +config AS_ADX
> + def_bool $(as-instr,adox %eax$(comma)%eax)
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 4c57cb3018fb..b65ec63c7db7 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -177,21 +177,6 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
> KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
> endif
>
> -# does binutils support specific instructions?
> -# binutils >= 2.22
> -avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
> -# binutils >= 2.25
> -avx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1)
> -# binutils >= 2.24
> -sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1)
> -# binutils >= 2.24
> -sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1)
> -# binutils >= 2.23
> -adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1)
> -
> -KBUILD_AFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
> -KBUILD_CFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)
> -
> KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)
>
> #
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200324084821.29944-12-masahiroy%40kernel.org.



--
Thanks,
~Nick Desaulniers

2020-03-24 17:17:53

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH 11/16] x86: probe assembler capabilities via kconfig instead of makefile

On Tue, Mar 24, 2020 at 11:01 AM Nick Desaulniers
<[email protected]> wrote:
>
> Can 11 just be rebased with 8 dropped?

8 adds comments to one place. 11 moves them to another place, while
doing other things.

Your desire is to skip the first step? I guess there's no problem with
this, but I'm curious to learn why.

2020-03-25 05:00:14

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 00/16] x86, crypto: remove always-defined CONFIG_AS_* and cosolidate Kconfig/Makefiles


* Masahiro Yamada <[email protected]> wrote:

> This series of cleanups was prompted by Linus:
> https://lkml.org/lkml/2020/3/12/726
>
> First, this series drop always-on CONFIG_AS_* options.
> Some of those options were introduced in old days.
> For example, the check for CONFIG_AS_CFI dates back to 2006.
>
> We raise the minimal tool versions from time to time.
> Currently, we require binutils 2.21
> (and we plan to bump it to 2.23 for v5.7-rc1).
>
> After cleaning away the old checks,
> as-instr calls are moved to Kconfig from Makefiles.
> (patch 11)
>
> This allows more Kconfig / Makefile cleanups.
> Patch 12 is complex, but I double-checked it does the equivalent.
>
> Patch 14 bumps the binutils version to 2.23,
> and patch 15 removes more CONFIG_AS_* options.
>
> I folded all relevanet patches into this series,
> as suggested by Jason A. Donenfeld.
>
> If x86 maintainers take care of this series, that's good.
>
> If it is OK to queue this up to Kbuild tree,
> I will send a pull request to Linus.
>
> Thank you.

LGTM. I've got these four from Jason A. Donenfeld queued up in
tip:WIP.x86/asm:

bd5b1283e41c: ("crypto: Curve25519 - do not pollute dispatcher based on assembler")
829f32d78588: ("crypto: X86 - rework configuration, based on Kconfig")
95ef9f80ed63: ("x86/build: Probe assembler from Kconfig instead of Kbuild")
1651e700664b: ("x86: Fix bitops.h warning with a moved cast")

I suppose these might interact (maybe even conflict), and are topically
related.

Would you like to pull these into the kbuild tree? You can find them in:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/asm

Thanks,

Ingo

2020-03-25 05:11:05

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 00/16] x86, crypto: remove always-defined CONFIG_AS_* and cosolidate Kconfig/Makefiles

Hi Ingo,

On Wed, Mar 25, 2020 at 1:59 PM Ingo Molnar <[email protected]> wrote:
>
>
> * Masahiro Yamada <[email protected]> wrote:
>
> > This series of cleanups was prompted by Linus:
> > https://lkml.org/lkml/2020/3/12/726
> >
> > First, this series drop always-on CONFIG_AS_* options.
> > Some of those options were introduced in old days.
> > For example, the check for CONFIG_AS_CFI dates back to 2006.
> >
> > We raise the minimal tool versions from time to time.
> > Currently, we require binutils 2.21
> > (and we plan to bump it to 2.23 for v5.7-rc1).
> >
> > After cleaning away the old checks,
> > as-instr calls are moved to Kconfig from Makefiles.
> > (patch 11)
> >
> > This allows more Kconfig / Makefile cleanups.
> > Patch 12 is complex, but I double-checked it does the equivalent.
> >
> > Patch 14 bumps the binutils version to 2.23,
> > and patch 15 removes more CONFIG_AS_* options.
> >
> > I folded all relevanet patches into this series,
> > as suggested by Jason A. Donenfeld.
> >
> > If x86 maintainers take care of this series, that's good.
> >
> > If it is OK to queue this up to Kbuild tree,
> > I will send a pull request to Linus.
> >
> > Thank you.
>
> LGTM. I've got these four from Jason A. Donenfeld queued up in
> tip:WIP.x86/asm:
>
> bd5b1283e41c: ("crypto: Curve25519 - do not pollute dispatcher based on assembler")
> 829f32d78588: ("crypto: X86 - rework configuration, based on Kconfig")
> 95ef9f80ed63: ("x86/build: Probe assembler from Kconfig instead of Kbuild")
> 1651e700664b: ("x86: Fix bitops.h warning with a moved cast")
>
> I suppose these might interact (maybe even conflict), and are topically
> related.
>
> Would you like to pull these into the kbuild tree? You can find them in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/asm
>
> Thanks,
>
> Ingo


I did not know that these had already landed in tip tree.

They are immature version.
(In fact CONFIG_AS_CFI and AS_ADX are false-negative
if GCC that defaults to 32-bit is used.)

Can you simply discard the WIP.x86/asm branch,
and only reapply
1651e700664b: ("x86: Fix bitops.h warning with a moved cast")

?


--
Best Regards
Masahiro Yamada

2020-03-26 09:20:49

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 00/16] x86, crypto: remove always-defined CONFIG_AS_* and cosolidate Kconfig/Makefiles


* Masahiro Yamada <[email protected]> wrote:

> > LGTM. I've got these four from Jason A. Donenfeld queued up in
> > tip:WIP.x86/asm:
> >
> > bd5b1283e41c: ("crypto: Curve25519 - do not pollute dispatcher based on assembler")
> > 829f32d78588: ("crypto: X86 - rework configuration, based on Kconfig")
> > 95ef9f80ed63: ("x86/build: Probe assembler from Kconfig instead of Kbuild")
> > 1651e700664b: ("x86: Fix bitops.h warning with a moved cast")
> >
> > I suppose these might interact (maybe even conflict), and are topically
> > related.
> >
> > Would you like to pull these into the kbuild tree? You can find them in:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/asm
> >
> > Thanks,
> >
> > Ingo
>
>
> I did not know that these had already landed in tip tree.
>
> They are immature version.
> (In fact CONFIG_AS_CFI and AS_ADX are false-negative
> if GCC that defaults to 32-bit is used.)
>
> Can you simply discard the WIP.x86/asm branch,
> and only reapply
> 1651e700664b: ("x86: Fix bitops.h warning with a moved cast")
>
> ?

Sure, done!

In case you need any x86 maintainer acks for your series:

Acked-by: Ingo Molnar <[email protected]>

Thanks,

Ingo