aboutsummaryrefslogtreecommitdiffstats
path: root/community/rspamd/07-hyperscan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/rspamd/07-hyperscan.patch')
-rw-r--r--community/rspamd/07-hyperscan.patch73
1 files changed, 0 insertions, 73 deletions
diff --git a/community/rspamd/07-hyperscan.patch b/community/rspamd/07-hyperscan.patch
deleted file mode 100644
index 85d0457df9..0000000000
--- a/community/rspamd/07-hyperscan.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -Nurp a/cmake/Hyperscan.cmake b.hyperscan/cmake/Hyperscan.cmake
---- a/cmake/Hyperscan.cmake 2020-09-30 20:27:23.000000000 +0100
-+++ b.hyperscan/cmake/Hyperscan.cmake 2020-12-28 15:58:12.603285789 +0000
-@@ -1,9 +1,6 @@
- option (ENABLE_HYPERSCAN "Enable hyperscan for fast regexp processing [default: OFF]" OFF)
-
- if (ENABLE_HYPERSCAN MATCHES "ON")
-- if (NOT ("${ARCH}" STREQUAL "x86_64" OR "${ARCH}" STREQUAL "i386"))
-- MESSAGE(FATAL_ERROR "Hyperscan is supported only on x86_64/i386 architectures")
-- endif ()
- ProcessPackage (HYPERSCAN LIBRARY hs INCLUDE hs.h INCLUDE_SUFFIXES
- hs include/hs
- ROOT ${HYPERSCAN_ROOT_DIR} MODULES libhs)
-@@ -16,4 +13,4 @@ if (ENABLE_HYPERSCAN MATCHES "ON")
- set (USE_CXX_LINKER 1)
- endif ()
- endif ()
--endif ()
-\ No newline at end of file
-+endif ()
-diff -Nurp a/src/hs_helper.c b.hyperscan/src/hs_helper.c
---- a/src/hs_helper.c 2020-09-30 20:27:23.000000000 +0100
-+++ b.hyperscan/src/hs_helper.c 2020-12-28 20:17:33.697849599 +0000
-@@ -247,11 +247,13 @@ static gboolean
- rspamd_rs_compile (struct hs_helper_ctx *ctx, struct rspamd_worker *worker,
- gboolean forced)
- {
-+#ifndef __aarch64__
- if (!(ctx->cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
- msg_warn ("CPU doesn't have SSSE3 instructions set "
- "required for hyperscan, disable hyperscan compilation");
- return FALSE;
- }
-+#endif
-
- if (!rspamd_hs_helper_cleanup_dir (ctx, forced)) {
- msg_warn ("cannot cleanup cache dir '%s'", ctx->hs_dir);
-diff -Nurp a/src/libserver/cfg_utils.c b.hyperscan/src/libserver/cfg_utils.c
---- a/src/libserver/cfg_utils.c 2020-09-30 20:27:23.000000000 +0100
-+++ b.hyperscan/src/libserver/cfg_utils.c 2020-12-28 20:15:35.322542255 +0000
-@@ -816,7 +816,7 @@ rspamd_config_post_load (struct rspamd_c
- rspamd_regexp_library_init (cfg);
- rspamd_multipattern_library_init (cfg->hs_cache_dir);
-
--#ifdef WITH_HYPERSCAN
-+#if defined(WITH_HYPERSCAN) && !defined(__aarch64__)
- if (!cfg->disable_hyperscan) {
- if (!(cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
- msg_warn_config ("CPU doesn't have SSSE3 instructions set "
-diff -Nurp a/src/libserver/maps/map_helpers.c b.hyperscan/src/libserver/maps/map_helpers.c
---- a/src/libserver/maps/map_helpers.c 2020-09-30 20:27:23.000000000 +0100
-+++ b.hyperscan/src/libserver/maps/map_helpers.c 2020-12-28 20:19:16.289253951 +0000
-@@ -942,11 +942,13 @@ rspamd_re_map_finalize (struct rspamd_re
-
- map = re_map->map;
-
-+#ifndef __aarch64__
- if (!(map->cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
- msg_info_map ("disable hyperscan for map %s, ssse3 instructons are not supported by CPU",
- map->name);
- return;
- }
-+#endif
-
- if (hs_populate_platform (&plt) != HS_SUCCESS) {
- msg_err_map ("cannot populate hyperscan platform");
-@@ -1572,4 +1574,4 @@ rspamd_match_cdb_map (struct rspamd_cdb_
- }
-
- return NULL;
--}
-\ No newline at end of file
-+}