mcst-linux-kernel/patches-2024.06.26/ucx-1.9.0/0008-Disable-bisto-mmap-hoo...

34 lines
1015 B
Diff

From 6c26d3b9fd53159e9dd32dde9dd911e7f7bd5c20 Mon Sep 17 00:00:00 2001
Date: Mon, 21 Oct 2019 02:36:56 +0300
Subject: [PATCH 8/8] Disable bisto mmap hooks with binary editing
---
src/ucm/mmap/mmap.h | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ucm/mmap/mmap.h b/src/ucm/mmap/mmap.h
index 35ac47f..2f6168d 100644
--- a/src/ucm/mmap/mmap.h
+++ b/src/ucm/mmap/mmap.h
@@ -13,6 +13,11 @@
#define UCM_MMAP_HOOK_RELOC_STR "reloc"
#define UCM_MMAP_HOOK_BISTRO_STR "bistro"
+// E2K Patch: disable bistro hooks
+#ifdef __e2k__
+# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_RELOC
+# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_RELOC_STR
+#else
#if UCM_BISTRO_HOOKS
# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_BISTRO
# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_BISTRO_STR
@@ -20,6 +25,7 @@
# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_RELOC
# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_RELOC_STR
#endif
+#endif
ucs_status_t ucm_mmap_install(int events);