diff options
author | Martin Matuska <mm@FreeBSD.org> | 2023-04-03 14:49:30 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2023-04-03 14:49:30 +0000 |
commit | 2a58b312b62f908ec92311d1bd8536dbaeb8e55b (patch) | |
tree | f6096fd35d318ddc1493acb3ab241f7ed7efbafb /cddl | |
parent | b98fbf3781df16f7797b2bbeabf205dc7d4985ae (diff) | |
parent | 431083f75bdd3efaee992bdd672625ec7240d252 (diff) | |
download | src-2a58b312b62f908ec92311d1bd8536dbaeb8e55b.tar.gz src-2a58b312b62f908ec92311d1bd8536dbaeb8e55b.zip |
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/lib/libicp/Makefile | 52 | ||||
-rw-r--r-- | cddl/lib/libicp_rescue/Makefile | 50 | ||||
-rw-r--r-- | cddl/lib/libzfs/Makefile | 1 | ||||
-rw-r--r-- | cddl/lib/libzpool/Makefile | 5 | ||||
-rw-r--r-- | cddl/usr.sbin/zdb/Makefile | 2 | ||||
-rw-r--r-- | cddl/usr.sbin/zfsd/case_file.cc | 5 | ||||
-rw-r--r-- | cddl/usr.sbin/zfsd/vdev.cc | 4 | ||||
-rw-r--r-- | cddl/usr.sbin/zfsd/zfsd_exception.cc | 2 |
8 files changed, 84 insertions, 37 deletions
diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile index d00a47f2529a..db791854efae 100644 --- a/cddl/lib/libicp/Makefile +++ b/cddl/lib/libicp/Makefile @@ -6,7 +6,6 @@ PACKAGE= zfs LIB= icp LIBADD= - .if ${MACHINE_ARCH} == "amd64" ASM_SOURCES_C = asm-x86_64/aes/aeskey.c ASM_SOURCES_AS = \ @@ -15,30 +14,47 @@ ASM_SOURCES_AS = \ asm-x86_64/modes/gcm_pclmulqdq.S \ asm-x86_64/modes/aesni-gcm-x86_64.S \ asm-x86_64/modes/ghash-x86_64.S \ - asm-x86_64/sha2/sha256_impl.S \ - asm-x86_64/sha2/sha512_impl.S \ + asm-x86_64/sha2/sha256-x86_64.S \ + asm-x86_64/sha2/sha512-x86_64.S \ asm-x86_64/blake3/blake3_avx2.S \ asm-x86_64/blake3/blake3_avx512.S \ asm-x86_64/blake3/blake3_sse2.S \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES +.elif ${MACHINE_ARCH} == "armv7" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-arm/sha2/sha256-armv7.S \ + asm-arm/sha2/sha512-armv7.S .elif ${MACHINE_ARCH} == "aarch64" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-aarch64/blake3/b3_aarch64_sse2.S \ - asm-aarch64/blake3/b3_aarch64_sse41.S + asm-aarch64/blake3/b3_aarch64_sse41.S \ + asm-aarch64/sha2/sha256-armv8.S \ + asm-aarch64/sha2/sha512-armv8.S +.elif ${MACHINE_ARCH} == "powerpc64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S .elif ${MACHINE_ARCH} == "powerpc64le" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-ppc64/blake3/b3_ppc64le_sse2.S \ - asm-ppc64/blake3/b3_ppc64le_sse41.S + asm-ppc64/blake3/b3_ppc64le_sse41.S \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S .else ASM_SOURCES_C = ASM_SOURCES_AS = .endif - KERNEL_C = \ spi/kcf_spi.c \ api/kcf_ctxops.c \ @@ -52,7 +68,6 @@ KERNEL_C = \ algs/blake3/blake3.c \ algs/blake3/blake3_generic.c \ algs/blake3/blake3_impl.c \ - algs/blake3/blake3_x86-64.c \ algs/edonr/edonr.c \ algs/modes/modes.c \ algs/modes/cbc.c \ @@ -62,7 +77,9 @@ KERNEL_C = \ algs/modes/ctr.c \ algs/modes/ccm.c \ algs/modes/ecb.c \ - algs/sha2/sha2.c \ + algs/sha2/sha2_generic.c \ + algs/sha2/sha256_impl.c \ + algs/sha2/sha512_impl.c \ algs/skein/skein.c \ algs/skein/skein_block.c \ algs/skein/skein_iv.c \ @@ -77,10 +94,8 @@ KERNEL_C = \ core/kcf_prov_tabs.c \ $(ASM_SOURCES_C) - - - - +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +KERNEL_C+= zfs_impl.c SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) @@ -98,22 +113,29 @@ CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccomp CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h - CFLAGS.aes_amd64.S+= -DLOCORE CFLAGS.aes_aesni.S+= -DLOCORE CFLAGS.gcm_pclmulqdq.S+= -DLOCORE CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE CFLAGS.ghash-x86_64.S+= -DLOCORE -CFLAGS.sha256_impl.S+= -DLOCORE -CFLAGS.sha512_impl.S+= -DLOCORE +CFLAGS.sha256-x86_64.S+= -DLOCORE +CFLAGS.sha512-x86_64.S+= -DLOCORE CFLAGS.blake3_avx2.S = -DLOCORE CFLAGS.blake3_avx512.S = -DLOCORE CFLAGS.blake3_sse2.S = -DLOCORE CFLAGS.blake3_sse41.S = -DLOCORE CFLAGS.b3_aarch64_sse2.S = -DLOCORE CFLAGS.b3_aarch64_sse41.S = -DLOCORE +CFLAGS.sha256-armv7.S = -DLOCORE +CFLAGS.sha256-armv8.S = -DLOCORE +CFLAGS.sha512-armv7.S = -DLOCORE +CFLAGS.sha512-armv8.S = -DLOCORE CFLAGS.b3_ppc64le_sse2.S = -DLOCORE CFLAGS.b3_ppc64le_sse41.S = -DLOCORE +CFLAGS.sha256-p8.S = -DLOCORE +CFLAGS.sha256-ppc.S = -DLOCORE +CFLAGS.sha512-p8.S = -DLOCORE +CFLAGS.sha512-ppc.S = -DLOCORE LDFLAGS.bfd+= -Wl,-znoexecstack diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile index 6c6c3998f85c..7173f94238bb 100644 --- a/cddl/lib/libicp_rescue/Makefile +++ b/cddl/lib/libicp_rescue/Makefile @@ -6,7 +6,6 @@ PACKAGE= utilities LIB= icp_rescue LIBADD= - .if ${MACHINE_ARCH} == "amd64" ASM_SOURCES_C = asm-x86_64/aes/aeskey.c ASM_SOURCES_AS = \ @@ -14,30 +13,47 @@ 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/sha2/sha256_impl.S \ - asm-x86_64/sha2/sha512_impl.S \ + asm-x86_64/sha2/sha256-x86_64.S \ + asm-x86_64/sha2/sha512-x86_64.S \ asm-x86_64/blake3/blake3_avx2.S \ asm-x86_64/blake3/blake3_avx512.S \ asm-x86_64/blake3/blake3_sse2.S \ asm-x86_64/blake3/blake3_sse41.S CFLAGS+= -D__amd64 -D_SYS_STACK_H +.elif ${MACHINE_ARCH} == "armv7" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-arm/sha2/sha256-armv7.S \ + asm-arm/sha2/sha512-armv7.S .elif ${MACHINE_ARCH} == "aarch64" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-aarch64/blake3/b3_aarch64_sse2.S \ - asm-aarch64/blake3/b3_aarch64_sse41.S + asm-aarch64/blake3/b3_aarch64_sse41.S \ + asm-aarch64/sha2/sha256-armv8.S \ + asm-aarch64/sha2/sha512-armv8.S +.elif ${MACHINE_ARCH} == "powerpc64" +ASM_SOURCES_C = +ASM_SOURCES_AS = \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S .elif ${MACHINE_ARCH} == "powerpc64le" ASM_SOURCES_C = ASM_SOURCES_AS = \ asm-ppc64/blake3/b3_ppc64le_sse2.S \ - asm-ppc64/blake3/b3_ppc64le_sse41.S + asm-ppc64/blake3/b3_ppc64le_sse41.S \ + asm-ppc64/sha2/sha256-ppc.S \ + asm-ppc64/sha2/sha512-ppc.S \ + asm-ppc64/sha2/sha256-p8.S \ + asm-ppc64/sha2/sha512-p8.S .else ASM_SOURCES_C = ASM_SOURCES_AS = .endif - KERNEL_C = \ spi/kcf_spi.c \ api/kcf_ctxops.c \ @@ -51,7 +67,6 @@ KERNEL_C = \ algs/blake3/blake3.c \ algs/blake3/blake3_generic.c \ algs/blake3/blake3_impl.c \ - algs/blake3/blake3_x86-64.c \ algs/edonr/edonr.c \ algs/modes/modes.c \ algs/modes/cbc.c \ @@ -61,7 +76,9 @@ KERNEL_C = \ algs/modes/ctr.c \ algs/modes/ccm.c \ algs/modes/ecb.c \ - algs/sha2/sha2.c \ + algs/sha2/sha2_generic.c \ + algs/sha2/sha256_impl.c \ + algs/sha2/sha512_impl.c \ algs/skein/skein_block.c \ illumos-crypto.c \ io/aes.c \ @@ -74,6 +91,9 @@ KERNEL_C = \ core/kcf_prov_tabs.c \ $(ASM_SOURCES_C) +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +KERNEL_C+= zfs_impl.c + SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) WARNS?= 2 @@ -90,14 +110,13 @@ CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccomp CFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h - CFLAGS.aes_amd64.S+= -DLOCORE CFLAGS.aes_aesni.S+= -DLOCORE CFLAGS.gcm_pclmulqdq.S+= -DLOCORE CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE CFLAGS.ghash-x86_64.S+= -DLOCORE -CFLAGS.sha256_impl.S+= -DLOCORE -CFLAGS.sha512_impl.S+= -DLOCORE +CFLAGS.sha256-x86_64.S+= -DLOCORE +CFLAGS.sha512-x86_64.S+= -DLOCORE CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM CFLAGS.blake3_avx2.S = -DLOCORE CFLAGS.blake3_avx512.S = -DLOCORE @@ -105,9 +124,16 @@ CFLAGS.blake3_sse2.S = -DLOCORE CFLAGS.blake3_sse41.S = -DLOCORE CFLAGS.b3_aarch64_sse2.S = -DLOCORE CFLAGS.b3_aarch64_sse41.S = -DLOCORE +CFLAGS.sha256-armv7.S = -DLOCORE +CFLAGS.sha512-armv7.S = -DLOCORE +CFLAGS.sha256-armv8.S = -DLOCORE +CFLAGS.sha512-armv8.S = -DLOCORE CFLAGS.b3_ppc64le_sse2.S = -DLOCORE CFLAGS.b3_ppc64le_sse41.S = -DLOCORE - +CFLAGS.sha256-ppc.S = -DLOCORE +CFLAGS.sha256-p8.S = -DLOCORE +CFLAGS.sha512-ppc.S = -DLOCORE +CFLAGS.sha512-p8.S = -DLOCORE LDFLAGS.bfd+= -Wl,-znoexecstack diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 2551b9ebdd57..c8e61202d687 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -55,7 +55,6 @@ USER_C += \ os/freebsd/smb.c KERNEL_C = \ - algs/sha2/sha2.c \ cityhash.c \ zfeature_common.c \ zfs_comutil.c \ diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index aeb2b4175a3b..5dbeb9cb1721 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -62,8 +62,9 @@ KERNEL_C = \ bplist.c \ bpobj.c \ bptree.c \ - btree.c \ bqueue.c \ + btree.c \ + brt.c \ cityhash.c \ dbuf.c \ dbuf_stats.c \ @@ -117,7 +118,7 @@ KERNEL_C = \ refcount.c \ rrwlock.c \ sa.c \ - sha256.c \ + sha2_zfs.c \ skein_zfs.c \ spa.c \ spa_checkpoint.c \ diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile index 3be2dea0bb95..dcd0c1329b10 100644 --- a/cddl/usr.sbin/zdb/Makefile +++ b/cddl/usr.sbin/zdb/Makefile @@ -24,7 +24,7 @@ CFLAGS+= \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID -LIBADD= nvpair umem uutil zfs spl avl zutil zpool +LIBADD= nvpair umem uutil zfs spl avl zutil zpool crypto CFLAGS.gcc+= -fms-extensions # Since there are many asserts in this program, it makes no sense to compile diff --git a/cddl/usr.sbin/zfsd/case_file.cc b/cddl/usr.sbin/zfsd/case_file.cc index 8da711fc10cb..34234a5736a5 100644 --- a/cddl/usr.sbin/zfsd/case_file.cc +++ b/cddl/usr.sbin/zfsd/case_file.cc @@ -490,8 +490,7 @@ bool CaseFile::ActivateSpare() { nvlist_t *config, *nvroot, *parent_config; nvlist_t **spares; - char *devPath, *vdev_type; - const char *poolname; + const char *devPath, *poolname, *vdev_type; u_int nspares, i; int error; @@ -518,7 +517,7 @@ CaseFile::ActivateSpare() { parent_config = find_parent(config, nvroot, m_vdevGUID); if (parent_config != NULL) { - char *parent_type; + const char *parent_type; /* * Don't activate spares for members of a "replacing" vdev. diff --git a/cddl/usr.sbin/zfsd/vdev.cc b/cddl/usr.sbin/zfsd/vdev.cc index 508af8cda925..a0e089a5bdf5 100644 --- a/cddl/usr.sbin/zfsd/vdev.cc +++ b/cddl/usr.sbin/zfsd/vdev.cc @@ -336,7 +336,7 @@ Vdev::Name(zpool_handle_t *zhp, bool verbose) const string Vdev::Path() const { - char *path(NULL); + const char *path(NULL); if ((m_config != NULL) && (nvlist_lookup_string(m_config, ZPOOL_CONFIG_PATH, &path) == 0)) @@ -348,7 +348,7 @@ Vdev::Path() const string Vdev::PhysicalPath() const { - char *path(NULL); + const char *path(NULL); if ((m_config != NULL) && (nvlist_lookup_string(m_config, ZPOOL_CONFIG_PHYS_PATH, &path) == 0)) diff --git a/cddl/usr.sbin/zfsd/zfsd_exception.cc b/cddl/usr.sbin/zfsd/zfsd_exception.cc index 7ebb74ca8c6a..e83dd0f6e506 100644 --- a/cddl/usr.sbin/zfsd/zfsd_exception.cc +++ b/cddl/usr.sbin/zfsd/zfsd_exception.cc @@ -106,7 +106,7 @@ ZfsdException::Log() const output << "Pool "; - char *poolName; + const char *poolName; if (nvlist_lookup_string(m_poolConfig, ZPOOL_CONFIG_POOL_NAME, &poolName) == 0) output << poolName; |