mbox series

[0/3] crypto: x86/aria - fix build failure with old binutils

Message ID 20230115121536.465367-1-ap420073@gmail.com
Headers show
Series crypto: x86/aria - fix build failure with old binutils | expand

Message

Taehee Yoo Jan. 15, 2023, 12:15 p.m. UTC
There is build failure issue when old binutils is used.

The minimum version of binutils to build kernel is 2.23 but it doesn't
support GFNI.
But aria-avx, aria-avx2, and aria-avx512 use GFNI.
So, the build will be failed when old binutils is used.

In order to fix this issue, it checks build environment is using
binutils, which don't support GFNI or not.
In addition, it also checks AVX512 for aria-avx512.

aria-avx and aria-avx2 use GFNI optionally.
So, if binutils doesn't support GFNI, it hides GFNI code.
But aria-avx512 mandatorily requires GFNI and AVX512.
So, if binutils doesn't support GFNI or AVX512, it disallows select to
build.

In order to check whether the using binutils is supporting GFNI, it adds
AS_GFNI.

Taehee Yoo (3):
  crypto: x86/aria-avx - fix build failure with old binutils
  crypto: x86/aria-avx2 - fix build failure with old binutils
  crypto: x86/aria-avx15 - fix build failure with old binutils

 arch/x86/Kconfig.assembler               |  5 +++++
 arch/x86/crypto/Kconfig                  |  2 +-
 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 +++-
 6 files changed, 31 insertions(+), 4 deletions(-)

Comments

Herbert Xu Jan. 20, 2023, 10:35 a.m. UTC | #1
On Sun, Jan 15, 2023 at 12:15:33PM +0000, Taehee Yoo wrote:
> There is build failure issue when old binutils is used.
> 
> The minimum version of binutils to build kernel is 2.23 but it doesn't
> support GFNI.
> But aria-avx, aria-avx2, and aria-avx512 use GFNI.
> So, the build will be failed when old binutils is used.
> 
> In order to fix this issue, it checks build environment is using
> binutils, which don't support GFNI or not.
> In addition, it also checks AVX512 for aria-avx512.
> 
> aria-avx and aria-avx2 use GFNI optionally.
> So, if binutils doesn't support GFNI, it hides GFNI code.
> But aria-avx512 mandatorily requires GFNI and AVX512.
> So, if binutils doesn't support GFNI or AVX512, it disallows select to
> build.
> 
> In order to check whether the using binutils is supporting GFNI, it adds
> AS_GFNI.
> 
> Taehee Yoo (3):
>   crypto: x86/aria-avx - fix build failure with old binutils
>   crypto: x86/aria-avx2 - fix build failure with old binutils
>   crypto: x86/aria-avx15 - fix build failure with old binutils
> 
>  arch/x86/Kconfig.assembler               |  5 +++++
>  arch/x86/crypto/Kconfig                  |  2 +-
>  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 +++-
>  6 files changed, 31 insertions(+), 4 deletions(-)
> 
> -- 
> 2.34.1

All applied.  Thanks.