patch 'drivers: fix ASan ODR violation on mlx glue symbols' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:05:07 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9f6226810c107e6ead863ee4eeba5b59507283cd

Thanks.

Kevin

---
>From 9f6226810c107e6ead863ee4eeba5b59507283cd Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Tue, 3 Nov 2026 13:25:24 +0200
Subject: [PATCH] drivers: fix ASan ODR violation on mlx glue symbols

[ upstream commit c0bb1db452158d4fc07057051995a6fa99c84858 ]

With ibverbs linked by dlopen, a static PMD and its glue library
each define one global. net/mlx4 and librte_net_mlx4_glue both
define mlx4_glue. common/mlx5 and librte_common_mlx5_glue both
define mlx5_glue. This is not a clash between mlx4 and mlx5.

Only AddressSanitizer detects this collision. The linker keeps one
copy, so a normal process is unaffected. AddressSanitizer records
both definitions and aborts at startup.

Keep the name dlsym() looks up in the glue library. Point the PMD
at that table through a private symbol.

Fixes: a5e5af7f20b4 ("net/mlx4: fix build with -fno-common")

Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/common/mlx5/linux/meson.build      |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.c |  4 ++--
 drivers/common/mlx5/linux/mlx5_glue.h      | 11 +++++++++++
 drivers/net/mlx4/meson.build               |  2 +-
 drivers/net/mlx4/mlx4.c                    |  2 +-
 drivers/net/mlx4/mlx4_glue.h               | 11 +++++++++++
 6 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 3767e7a69b..038b76b844 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -246,5 +246,5 @@ if dlopen_ibverbs
             dlopen_sources,
             include_directories: dlopen_includes,
-            c_args: cflags,
+            c_args: cflags + ['-DMLX5_GLUE_LIBRARY'],
             dependencies: libs,
             link_args: [
diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index c64a4ecae2..f4d1cba6e3 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -29,6 +29,6 @@
 
 #ifdef MLX5_GLUE
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_glue)
-const struct mlx5_glue *mlx5_glue;
+RTE_EXPORT_INTERNAL_SYMBOL(mlx5_glue_handle)
+const mlx5_glue_t *mlx5_glue;
 #endif
 
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index 81d6b0aaf9..ff9ac7c20a 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -411,5 +411,16 @@ struct mlx5_glue {
 };
 
+#if defined(RTE_IBVERBS_LINK_DLOPEN) && !defined(MLX5_GLUE_LIBRARY)
+/*
+ * The PMD keeps the address of the glue table in a private symbol. The glue
+ * library exports mlx5_glue for lookup with dlsym().
+ */
+typedef struct mlx5_glue mlx5_glue_t;
+
+extern const mlx5_glue_t *mlx5_glue_handle;
+#define mlx5_glue mlx5_glue_handle
+#else
 extern const struct mlx5_glue *mlx5_glue;
+#endif
 
 #endif /* MLX5_GLUE_H_ */
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 1eb67f3c47..fdef57f681 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -126,5 +126,5 @@ if dlopen_ibverbs
         dlopen_sources,
         include_directories: global_inc,
-        c_args: cflags,
+        c_args: cflags + ['-DMLX4_GLUE_LIBRARY'],
         dependencies: libs,
         link_args: [
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 997829a107..91241bebeb 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -51,5 +51,5 @@
 
 #ifdef MLX4_GLUE
-const struct mlx4_glue *mlx4_glue;
+const mlx4_glue_t *mlx4_glue;
 #endif
 
diff --git a/drivers/net/mlx4/mlx4_glue.h b/drivers/net/mlx4/mlx4_glue.h
index 96d5cb16b4..9209ce77cd 100644
--- a/drivers/net/mlx4/mlx4_glue.h
+++ b/drivers/net/mlx4/mlx4_glue.h
@@ -84,5 +84,16 @@ struct mlx4_glue {
 };
 
+#if defined(MLX4_GLUE) && !defined(MLX4_GLUE_LIBRARY)
+/*
+ * The PMD keeps the address of the glue table in a private symbol. The glue
+ * library exports mlx4_glue for lookup with dlsym().
+ */
+typedef struct mlx4_glue mlx4_glue_t;
+
+extern const mlx4_glue_t *mlx4_glue_handle;
+#define mlx4_glue mlx4_glue_handle
+#else
 extern const struct mlx4_glue *mlx4_glue;
+#endif
 
 #endif /* MLX4_GLUE_H_ */
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:49.961488480 +0000
+++ 0381-drivers-fix-ASan-ODR-violation-on-mlx-glue-symbols.patch	2026-12-03 12:52:39.289938781 +0000
@@ -1 +1 @@
-From c0bb1db452158d4fc07057051995a6fa99c84858 Mon Sep 17 00:00:00 2001
+From 9f6226810c107e6ead863ee4eeba5b59507283cd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0bb1db452158d4fc07057051995a6fa99c84858 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -44 +45 @@
-index 903963670d..b8a7c53e5f 100644
+index c64a4ecae2..f4d1cba6e3 100644
@@ -57 +58 @@
-index 0610e7778e..38292c1346 100644
+index 81d6b0aaf9..ff9ac7c20a 100644
@@ -60 +61 @@
-@@ -413,5 +413,16 @@ struct mlx5_glue {
+@@ -411,5 +411,16 @@ struct mlx5_glue {
@@ -89 +90 @@
-index dbcd98d49f..c5015bc03c 100644
+index 997829a107..91241bebeb 100644



More information about the stable mailing list