]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
connman: avoid hiding implementation-reserved symbols in version scripts
authorPeter Tatrai <peter.tatrai.ext@siemens.com>
Mon, 8 Sep 2025 10:41:57 +0000 (12:41 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Sep 2025 09:45:09 +0000 (10:45 +0100)
This commit adds a patch to ConnMan that modifies the version scripts
(src/connman.ver and vpn/vpn.ver) to avoid hiding implementation-reserved
symbols (such as _IO_stdin_used). Previously, using 'local: *;' in the
version script caused glibc's libio to misdetect the libc version,
resulting in a crash when printing to stdout (e.g., running 'connmand
--help') on PowerPC.

The new patch changes 'local: *;' to 'local: [!_]*;', following the
recommendation in glibc bug 17908
(https://sourceware.org/bugzilla/show_bug.cgi?id=17908). This ensures
that symbols starting with an underscore are not hidden, allowing libio
to correctly detect the libc version and preventing the crash.

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/connman/connman/0001-connman-vpn-avoid-hiding-implementation-reserved-sym.patch [new file with mode: 0755]
meta/recipes-connectivity/connman/connman_1.45.bb

diff --git a/meta/recipes-connectivity/connman/connman/0001-connman-vpn-avoid-hiding-implementation-reserved-sym.patch b/meta/recipes-connectivity/connman/connman/0001-connman-vpn-avoid-hiding-implementation-reserved-sym.patch
new file mode 100755 (executable)
index 0000000..3b7b5a0
--- /dev/null
@@ -0,0 +1,50 @@
+From eac489c872c775c88bbd85b4cec6c1d47ad9e6a6 Mon Sep 17 00:00:00 2001
+From: Peter Tatrai <peter.tatrai.ext@siemens.com>
+Date: Sun, 7 Sep 2025 09:25:20 +0200
+Subject: [PATCH] connman, vpn: avoid hiding implementation-reserved symbols
+
+When using 'local: *;' in the version script, all symbols, including those
+reserved for the implementation (such as _IO_stdin_used), are hidden. This
+causes glibc's libio to misdetect the libc version, leading to a crash when
+glibc prints to stdout (e.g., with connmand --help) on PowerPC.
+
+Change 'local: *;' to 'local: [!_]*;' to avoid hiding symbols starting with an
+underscore, as recommended in glibc bug 17908
+(https://sourceware.org/bugzilla/show_bug.cgi?id=17908). This ensures libio can
+correctly detect the libc version and prevents the crash.
+
+Reference: https://sourceware.org/bugzilla/show_bug.cgi?id=17908
+
+Upstream-Status: Submitted [https://lore.kernel.org/connman/20250907081844.1558-1-peter.tatrai.ext@siemens.com/]
+
+Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
+---
+ src/connman.ver | 2 +-
+ vpn/vpn.ver     | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/connman.ver b/src/connman.ver
+index 03a0eec..b75e90d 100644
+--- a/src/connman.ver
++++ b/src/connman.ver
+@@ -3,5 +3,5 @@
+               connman_*;
+               g_dbus_*;
+       local:
+-              *;
++              [!_]*;
+ };
+diff --git a/vpn/vpn.ver b/vpn/vpn.ver
+index b887706..5cad344 100644
+--- a/vpn/vpn.ver
++++ b/vpn/vpn.ver
+@@ -4,5 +4,5 @@
+               vpn_*;
+               g_dbus_*;
+       local:
+-              *;
++              [!_]*;
+ };
+-- 
+2.47.2
+
index 85f14eb80ecf7322f4c17830676e2e354d5eb777..ca0337b4d3e0d7e4305bc88928487d65d95c5be9 100644 (file)
@@ -21,6 +21,7 @@ DEPENDS  = "dbus glib-2.0"
 SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
            file://connman \
            file://no-version-scripts.patch \
+           file://0001-connman-vpn-avoid-hiding-implementation-reserved-sym.patch \
            file://0002-resolve-musl-does-not-implement-res_ninit.patch \
            "