Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CPU] Skip mbind NUMA binding on Android arm64 (fix SIGSYS seccomp crash) (#37204)

Nesterov Alexander167f73334431
diff --git a/src/plugins/intel_cpu/src/cpu_memory.cpp b/src/plugins/intel_cpu/src/cpu_memory.cpp
index 9e958e3eec4..6be3705fe2a 100644
--- a/src/plugins/intel_cpu/src/cpu_memory.cpp
+++ b/src/plugins/intel_cpu/src/cpu_memory.cpp
@@ -556,7 +556,9 @@ void StaticMemory::StaticMemoryBlock::unregisterMemory(Memory* memPtr) {
// do nothing
}
-#if defined(__linux__)
+// Android arm64 (aarch64) the seccomp filter forbids the mbind syscall. Android devices
+// are single-NUMA-node anyway, so the binding is unnecessary there.
+#if defined(__linux__) && !(defined(__ANDROID__) && defined(__aarch64__))
# define MPOL_DEFAULT 0
# define MPOL_BIND 2
# define MPOL_MF_STRICT (1 << 0)
@@ -577,7 +579,7 @@ static int64_t mbind(void* start, uint64_t len, int mode, const uint64_t* nmask,
}
#endif
-#if defined(__linux__)
+#if defined(__linux__) && !(defined(__ANDROID__) && defined(__aarch64__))
bool mbind_move(void* data, size_t size, int targetNode) {
int realNode = ov::get_org_numa_id(targetNode);
auto pagesize = getpagesize();