Skip to content

Commit

Permalink
Linux kernel: remove AVX compiler flags
Browse files Browse the repository at this point in the history
As these flags are not needed for the Intrinsics code, it is safer to
remove them to aovid the compiler adding AVX instructions somewhere
else where we do not expect it and thus do not have kernel_fpu_enable
around that code.

Signed-off-by: Stephan Mueller <[email protected]>
  • Loading branch information
smuellerDD committed Feb 8, 2024
1 parent e388cea commit e657d57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Changes 0.9.0-prerelease

* enhancement: use accelerated XOR for KMAC/cSHAKE AEAD

* fix: enable poly_compress_avx for Linux kernel compilation
* fix: enable poly_compress_avx for Linux kernel compilation when GCC >= 13 is present

Changes 0.8.0:

Expand Down
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
compiled for target host ARMv7 - at the moment compiling on ARMv6 fails
because the Neon code is compiled (which should not be compiled)

- poly_compress_avx does not work when compiled for Linux kernel - it works with current compilers (see change 0b0bf07b5f7c0d7d623087212883c427476eefef, but older compilers still fail this code

- check RISCV-64 Keccak implementation
7 changes: 2 additions & 5 deletions linux_kernel/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,9 @@ ccflags-y := -I$(PWD) -DLINUX_KERNEL -DLC_MEM_ON_HEAP \
-DMAJVERSION=0 -DMINVERSION=9 -DPATCHLEVEL=0

ifdef CONFIG_X86_64
ccflags-y += -DLC_HOST_X86_64 \
-mavx2 -mbmi2 -mpopcnt \
-Wno-unused-command-line-argument
ccflags-y += -DLC_HOST_X86_64
else ifdef CONFIG_ARM64
ccflags-y += -DLC_HOST_AARCH64 \
-march=armv8-a+simd -Wno-unused-result
ccflags-y += -DLC_HOST_AARCH64
else ifneq ($(and $(CONFIG_RISCV),$(CONFIG_64BIT)),)
ccflags-y += -DLC_HOST_RISCV64
endif
Expand Down

0 comments on commit e657d57

Please sign in to comment.