]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/commitdiff
hyperscan: update to 5.4.0
authorMarcel Lorenz <marcel.lorenz@ipfire.org>
Sat, 30 Jan 2021 05:54:15 +0000 (06:54 +0100)
committerMarcel Lorenz <marcel.lorenz@ipfire.org>
Sat, 30 Jan 2021 05:54:15 +0000 (06:54 +0100)
config/rootfiles/common/i586/hyperscan
config/rootfiles/common/x86_64/hyperscan
lfs/hyperscan
src/patches/hyperscan-5.4.0-fix-cmake-build-system.patch [new file with mode: 0644]
src/patches/hyperscan-5.4.0-fix-missing-instruction.patch [new file with mode: 0644]

index a091e22b570d7a1565e2dc3aeefb1fb7affda70c..cbef457dea4a31b410afe6367e5572e9bce17819 100644 (file)
@@ -5,10 +5,10 @@
 #usr/include/hs/hs_runtime.h
 #usr/lib/libhs.so
 usr/lib/libhs.so.5
-usr/lib/libhs.so.5.3.0
-usr/lib/libhs_runtime.so
+usr/lib/libhs.so.5.4.0
+#usr/lib/libhs_runtime.so
 usr/lib/libhs_runtime.so.5
-usr/lib/libhs_runtime.so.5.3.0
+usr/lib/libhs_runtime.so.5.4.0
 #usr/lib/pkgconfig/libhs.pc
 #usr/share/doc/hyperscan
 #usr/share/doc/hyperscan/examples
index a091e22b570d7a1565e2dc3aeefb1fb7affda70c..cbef457dea4a31b410afe6367e5572e9bce17819 100644 (file)
@@ -5,10 +5,10 @@
 #usr/include/hs/hs_runtime.h
 #usr/lib/libhs.so
 usr/lib/libhs.so.5
-usr/lib/libhs.so.5.3.0
-usr/lib/libhs_runtime.so
+usr/lib/libhs.so.5.4.0
+#usr/lib/libhs_runtime.so
 usr/lib/libhs_runtime.so.5
-usr/lib/libhs_runtime.so.5.3.0
+usr/lib/libhs_runtime.so.5.4.0
 #usr/lib/pkgconfig/libhs.pc
 #usr/share/doc/hyperscan
 #usr/share/doc/hyperscan/examples
index 96979c71837d36ab7ad7ddb25ba701c4ec07501a..b7cd3f93d16f88636eddbe2a52abc277b69d2040 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2020  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 5.3.0
+VER        = 5.4.0
 
 THISAPP    = hyperscan-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -46,7 +46,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 6acab4b242dd81b3cede211d4a9e7101
+$(DL_FILE)_MD5 = 65e08385038c24470a248f6ff2fa379b
 
 install : $(TARGET)
 
@@ -76,6 +76,8 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-fix-cmake-build-system.patch
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-fix-missing-instruction.patch
        cd $(DIR_APP) && cmake . \
                -DCMAKE_INSTALL_PREFIX:PATH=/usr \
                -DBUILD_SHARED_LIBS:BOOL=ON \
diff --git a/src/patches/hyperscan-5.4.0-fix-cmake-build-system.patch b/src/patches/hyperscan-5.4.0-fix-cmake-build-system.patch
new file mode 100644 (file)
index 0000000..159c276
--- /dev/null
@@ -0,0 +1,21 @@
+From: Robert Haist <rhaist@mailbox.org>
+Date: Tue, 19 Jan 2021 17:00:22 +0100
+Subject: Small upstream fix to the cmake build system
+
+---
+ cmake/build_wrapper.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/build_wrapper.sh b/cmake/build_wrapper.sh
+index 1962813..895610c 100755
+--- a/cmake/build_wrapper.sh
++++ b/cmake/build_wrapper.sh
+@@ -17,7 +17,7 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX)
+ LIBC_SO=$("$@" --print-file-name=libc.so.6)
+ cp ${KEEPSYMS_IN} ${KEEPSYMS}
+ # get all symbols from libc and turn them into patterns
+-nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ ]*\).*/^\1$/' >> ${KEEPSYMS}
++nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
+ # build the object
+ "$@"
+ # rename the symbols in the object
diff --git a/src/patches/hyperscan-5.4.0-fix-missing-instruction.patch b/src/patches/hyperscan-5.4.0-fix-missing-instruction.patch
new file mode 100644 (file)
index 0000000..a3773d0
--- /dev/null
@@ -0,0 +1,61 @@
+From 52a698b0e134f0c29984ecbd0a885744d20812c1 Mon Sep 17 00:00:00 2001
+From: Wang Xiang W <xiang.w.wang@intel.com>
+Date: Tue, 26 Jan 2021 11:43:27 +0000
+Subject: [PATCH] fix missing instruction
+
+---
+ src/util/simd_utils.h | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/src/util/simd_utils.h b/src/util/simd_utils.h
+index d1f060b0..5d5ddaf1 100644
+--- a/src/util/simd_utils.h
++++ b/src/util/simd_utils.h
+@@ -156,6 +156,16 @@ static really_inline u32 movd(const m128 in) {
+     return _mm_cvtsi128_si32(in);
+ }
++static really_inline u64a movq(const m128 in) {
++#if defined(ARCH_X86_64)
++    return _mm_cvtsi128_si64(in);
++#else // 32-bit - this is horrific
++    u32 lo = movd(in);
++    u32 hi = movd(_mm_srli_epi64(in, 32));
++    return (u64a)hi << 32 | lo;
++#endif
++}
++
+ #if defined(HAVE_AVX512)
+ static really_inline u32 movd512(const m512 in) {
+     // NOTE: seems gcc doesn't support _mm512_cvtsi512_si32(in),
+@@ -166,20 +176,10 @@ static really_inline u32 movd512(const m512 in) {
+ static really_inline u64a movq512(const m512 in) {
+     // NOTE: seems AVX512 doesn't support _mm512_cvtsi512_si64(in),
+     //       so we use 2-step convertions to work around.
+-    return _mm_cvtsi128_si64(_mm512_castsi512_si128(in));
++    return movq(_mm512_castsi512_si128(in));
+ }
+ #endif
+-static really_inline u64a movq(const m128 in) {
+-#if defined(ARCH_X86_64)
+-    return _mm_cvtsi128_si64(in);
+-#else // 32-bit - this is horrific
+-    u32 lo = movd(in);
+-    u32 hi = movd(_mm_srli_epi64(in, 32));
+-    return (u64a)hi << 32 | lo;
+-#endif
+-}
+-
+ /* another form of movq */
+ static really_inline
+ m128 load_m128_from_u64a(const u64a *p) {
+@@ -791,7 +791,7 @@ m128 movdq_lo(m256 x) {
+ #define lshift128_m256(a, count_immed) _mm256_slli_si256(a, count_immed)
+ #define extract64from256(a, imm) _mm_extract_epi64(_mm256_extracti128_si256(a, imm >> 1), imm % 2)
+ #define extract32from256(a, imm) _mm_extract_epi32(_mm256_extracti128_si256(a, imm >> 2), imm % 4)
+-#define extractlow64from256(a) _mm_cvtsi128_si64(cast256to128(a))
++#define extractlow64from256(a) movq(cast256to128(a))
+ #define extractlow32from256(a) movd(cast256to128(a))
+ #define interleave256hi(a, b) _mm256_unpackhi_epi8(a, b)
+ #define interleave256lo(a, b) _mm256_unpacklo_epi8(a, b)