Skip to content

Commit f6081ed

Browse files
authored
Merge pull request #6398 from liranmauda/liran-isa-l-2.23
Bumping isa-l_crypto to 2.23
2 parents 9ecef8f + e866bf7 commit f6081ed

File tree

306 files changed

+34102
-1646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+34102
-1646
lines changed

src/native/chunk/splitter.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "splitter.h"
33

44
#include "../util/common.h"
5+
#include "../util/endian.h"
56

67
namespace noobaa
78
{
@@ -86,7 +87,10 @@ Splitter::finish(uint8_t* md5, uint8_t* sha256)
8687
if (md5) {
8788
if (_md5_mb_ctx) {
8889
md5_mb_submit_and_flush(0, 0, HASH_LAST);
89-
memcpy(md5, hash_ctx_digest(_md5_mb_ctx), MD5_DIGEST_NWORDS * 4);
90+
uint32_t *digest = reinterpret_cast<uint32_t*>(md5);
91+
for (int i = 0; i < MD5_DIGEST_NWORDS; i++) {
92+
digest[i] = le32toh(hash_ctx_digest(_md5_mb_ctx)[i]);
93+
}
9094
} else if (_md5_ctx) {
9195
EVP_DigestFinal_ex(_md5_ctx, md5, 0);
9296
} else {

src/native/third_party/isa-l.gyp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
],
130130
# compile asm only for x64 until we have support for ppc
131131
# see https://github.com/intel/isa-l/issues/7
132-
'conditions': [['node_arch=="x64"', {'sources': [
132+
'conditions': [['node_arch=="x64" or node_arch=="x32"', {'sources': [
133133
'isa-l_crypto/md5_mb/md5_ctx_sse.c',
134134
'isa-l_crypto/md5_mb/md5_ctx_avx.c',
135135
'isa-l_crypto/md5_mb/md5_ctx_avx2.c',
@@ -150,7 +150,18 @@
150150
'isa-l_crypto/md5_mb/md5_mb_mgr_flush_avx512.asm',
151151
'isa-l_crypto/md5_mb/md5_mb_x16x2_avx512.asm',
152152
'isa-l_crypto/md5_mb/md5_ctx_avx512.c',
153-
]}]],
153+
]}, 'node_arch=="arm64"', {'sources': [
154+
'isa-l_crypto/md5_mb/aarch64/md5_ctx_aarch64_asimd.c',
155+
'isa-l_crypto/md5_mb/aarch64/md5_mb_aarch64_dispatcher.c',
156+
'isa-l_crypto/md5_mb/aarch64/md5_mb_mgr_aarch64_asimd.c',
157+
'isa-l_crypto/md5_mb/aarch64/md5_mb_asimd_x4.S',
158+
'isa-l_crypto/md5_mb/aarch64/md5_mb_asimd_x1.S',
159+
'isa-l_crypto/md5_mb/aarch64/md5_mb_multibinary.S',
160+
]}, {
161+
'sources': [
162+
'isa-l_crypto/md5_mb/md5_ctx_base_aliases.c',
163+
]
164+
}]],
154165
},
155166

156167
{
@@ -166,7 +177,7 @@
166177
],
167178
# compile asm only for x64 until we have support for ppc
168179
# see https://github.com/intel/isa-l/issues/7
169-
'conditions': [['node_arch=="x64"', {'sources': [
180+
'conditions': [['node_arch=="x64" or node_arch=="x32"', {'sources': [
170181
'isa-l_crypto/sha1_mb/sha1_ctx_sse.c',
171182
'isa-l_crypto/sha1_mb/sha1_ctx_avx.c',
172183
'isa-l_crypto/sha1_mb/sha1_ctx_avx2.c',
@@ -195,9 +206,18 @@
195206
'isa-l_crypto/sha1_mb/sha1_mb_mgr_submit_sse_ni.asm',
196207
'isa-l_crypto/sha1_mb/sha1_mb_mgr_flush_sse_ni.asm',
197208
'isa-l_crypto/sha1_mb/sha1_mb_mgr_flush_avx512_ni.asm',
209+
]}, 'node_arch=="arm64"', {'sources': [
210+
'isa-l_crypto/sha1_mb/sha1_ref.c',
211+
'isa-l_crypto/sha1_mb/aarch64/sha1_mb_multibinary.S',
212+
'isa-l_crypto/sha1_mb/aarch64/sha1_ctx_ce.c',
213+
'isa-l_crypto/sha1_mb/aarch64/sha1_mb_x1_ce.S',
214+
'isa-l_crypto/sha1_mb/aarch64/sha1_mb_x2_ce.S',
215+
'isa-l_crypto/sha1_mb/aarch64/sha1_mb_mgr_ce.c',
216+
'isa-l_crypto/sha1_mb/aarch64/sha1_mb_aarch64_dispatcher.c',
198217
]}, {
199218
'sources': [
200219
'isa-l_crypto/sha1_mb/sha1_ctx_base_aliases.c',
220+
'isa-l_crypto/sha1_mb/sha1_ref.c',
201221
]
202222
}]],
203223
},

src/native/third_party/isa-l_crypto/Doxyfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ INPUT = isa-l_crypto.h \
1515
CONTRIBUTING.md \
1616
Release_notes.txt
1717

18-
EXCLUDE = include/test.h
18+
EXCLUDE = include/test.h include/memcpy_inline.h include/intrinreg.h include/endian_helper.h
19+
EXCLUDE_PATTERNS = */include/*_multibinary.h
1920
EXAMPLE_PATH = . aes md5_mb mh_sha1 mh_sha1_murmur3_x64_128 mh_sha256 rolling_hash sha1_mb sha256_mb sha512_mb
2021
PAPER_TYPE = letter
2122
LATEX_SOURCE_CODE = YES
23+
GENERATE_TREEVIEW = YES
2224
MACRO_EXPANSION = YES
2325
EXPAND_ONLY_PREDEF = YES
2426
PREDEFINED = "DECLARE_ALIGNED(n, a)=ALIGN n" \

src/native/third_party/isa-l_crypto/Makefile.am

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CLEANFILES =
33
LDADD =
44
AM_MAKEFLAGS = --no-print-directory
55
noinst_HEADERS =
6-
pkginclude_HEADERS = include/test.h include/types.h
6+
pkginclude_HEADERS = include/test.h include/types.h include/endian_helper.h
77
noinst_LTLIBRARIES =
88
INCLUDE = -I $(srcdir)/include/
99

@@ -34,20 +34,25 @@ perf_tests32=
3434
# Include units
3535
include sha1_mb/Makefile.am
3636
include mh_sha1/Makefile.am
37-
if !CPU_AARCH64
3837
include md5_mb/Makefile.am
3938
include sha256_mb/Makefile.am
4039
include sha512_mb/Makefile.am
4140
include mh_sha1_murmur3_x64_128/Makefile.am
4241
include mh_sha256/Makefile.am
43-
include aes/Makefile.am
4442
include rolling_hash/Makefile.am
4543
include sm3_mb/Makefile.am
44+
45+
if CPU_X86_64
46+
include aes/Makefile.am
47+
endif
48+
49+
if CPU_X86_32
50+
include aes/Makefile.am
4651
endif
4752

4853
# LIB version info not necessarily the same as package version
4954
LIBISAL_CURRENT=2
50-
LIBISAL_REVISION=22
55+
LIBISAL_REVISION=23
5156
LIBISAL_AGE=0
5257

5358
lib_LTLIBRARIES = libisal_crypto.la
@@ -103,17 +108,29 @@ test: $(addsuffix .run,$(unit_tests))
103108
@echo Completed run: $<
104109

105110
# Support for yasm/nasm
111+
if INTEL_CET_ENABLED
112+
export CET_LD=$(LD)
113+
endif
106114
if USE_YASM
115+
if INTEL_CET_ENABLED
116+
as_filter = ${srcdir}/tools/yasm-cet-filter.sh
117+
else
107118
as_filter = ${srcdir}/tools/yasm-filter.sh
108119
endif
120+
endif
109121
if USE_NASM
122+
if INTEL_CET_ENABLED
123+
as_filter = ${srcdir}/tools/nasm-cet-filter.sh
124+
else
110125
as_filter = ${srcdir}/tools/nasm-filter.sh
111126
endif
127+
endif
112128
if CPU_AARCH64
113-
as_filter = gcc -D__ASSEMBLY__
129+
as_filter = $(CC) -D__ASSEMBLY__
114130
endif
115131
CCAS = $(as_filter)
116132
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
133+
EXTRA_DIST += tools/yasm-cet-filter.sh tools/nasm-cet-filter.sh
117134

118135
AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${D}
119136
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} $(src_include) ${DEFS} ${D}
@@ -128,6 +145,11 @@ CLEANFILES += isa-l_crypto.h
128145
isa-l_crypto.h:
129146
@echo 'Building $@'
130147
@echo '' >> $@
148+
@echo '/**' >> $@
149+
@echo ' * @file isa-l_crypto.h'>> $@
150+
@echo ' * @brief Include for ISA-L_crypto library' >> $@
151+
@echo ' */' >> $@
152+
@echo '' >> $@
131153
@echo '#ifndef _ISAL_CRYPTO_H_' >> $@
132154
@echo '#define _ISAL_CRYPTO_H_' >> $@
133155
@echo '' >> $@

0 commit comments

Comments
 (0)