The branch main has been updated by mm:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=94ca18c18bb0d231c66f146704d9233da48bc84e

commit 94ca18c18bb0d231c66f146704d9233da48bc84e
Author:     Martin Matuska <m...@freebsd.org>
AuthorDate: 2025-08-20 12:57:36 +0000
Commit:     Martin Matuska <m...@freebsd.org>
CommitDate: 2025-08-20 13:42:33 +0000

    zfs: fix build issues from 53a2e2635
    
    Add aesni-gcm-avx2-vaes.S to libicp, libicp_rescue and module build
    This was somehow not catched by my make universe
---
 cddl/lib/libicp/Makefile        | 2 ++
 cddl/lib/libicp_rescue/Makefile | 2 ++
 sys/conf/files.amd64            | 3 +++
 sys/modules/zfs/Makefile        | 6 +++++-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index f097e7e6ff58..8e801246215f 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
         asm-x86_64/aes/aes_aesni.S \
         asm-x86_64/modes/gcm_pclmulqdq.S \
         asm-x86_64/modes/aesni-gcm-x86_64.S \
+        asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
         asm-x86_64/modes/ghash-x86_64.S \
         asm-x86_64/sha2/sha256-x86_64.S \
         asm-x86_64/sha2/sha512-x86_64.S \
@@ -112,6 +113,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
 CFLAGS.aes_aesni.S+= -DLOCORE
 CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
 CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
+CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
 CFLAGS.ghash-x86_64.S+= -DLOCORE
 CFLAGS.sha256-x86_64.S+= -DLOCORE
 CFLAGS.sha512-x86_64.S+= -DLOCORE
diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile
index 3a8b6746fe61..0a5a81f4ab7f 100644
--- a/cddl/lib/libicp_rescue/Makefile
+++ b/cddl/lib/libicp_rescue/Makefile
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
         asm-x86_64/aes/aes_aesni.S \
         asm-x86_64/modes/gcm_pclmulqdq.S \
         asm-x86_64/modes/aesni-gcm-x86_64.S \
+        asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
         asm-x86_64/sha2/sha256-x86_64.S \
         asm-x86_64/sha2/sha512-x86_64.S \
         asm-x86_64/blake3/blake3_avx2.S \
@@ -109,6 +110,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
 CFLAGS.aes_aesni.S+= -DLOCORE
 CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
 CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
+CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
 CFLAGS.ghash-x86_64.S+= -DLOCORE
 CFLAGS.sha256-x86_64.S+= -DLOCORE
 CFLAGS.sha512-x86_64.S+= -DLOCORE
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 80548320c3fc..9b6ba03b78df 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -419,6 +419,9 @@ 
contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_avx512.S    optional zfs com
 contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse2.S      optional zfs 
compile-with "${ZFS_S}"
 contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse41.S     optional zfs 
compile-with "${ZFS_S}"
 
+# zfs AVX2 implementation of aes-gcm from BoringSSL
+contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S      
optional zfs compile-with "${ZFS_S}"
+
 # zfs sha2 hash support
 zfs-sha256-x86_64.o            optional        zfs                     \
        dependency 
"$S/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256-x86_64.S" \
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index 0dc85e3fa684..ec531ed646a7 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -15,6 +15,7 @@ KMOD= zfs
        ${SRCDIR}/icp/asm-ppc64/sha2 \
        ${SRCDIR}/icp/asm-ppc64/blake3 \
        ${SRCDIR}/icp/asm-x86_64/blake3 \
+       ${SRCDIR}/icp/asm-x86_64/modes \
        ${SRCDIR}/icp/asm-x86_64/sha2 \
        ${SRCDIR}/os/freebsd/spl \
        ${SRCDIR}/os/freebsd/zfs \
@@ -41,7 +42,7 @@ CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \
 .if ${MACHINE_ARCH} == "amd64"
 CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
        -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \
-       -DHAVE_VAES HAVE_VPCLMULQDQ
+       -DHAVE_VAES -DHAVE_VPCLMULQDQ
 .endif
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
@@ -83,6 +84,9 @@ SRCS+=        blake3_avx2.S \
        blake3_avx512.S \
        blake3_sse2.S \
        blake3_sse41.S
+
+#icp/asm-x86_64/modes
+SRCS+= aesni-gcm-avx2-vaes.S
 .endif
 
 #icp/algs/sha2

Reply via email to