All of lore.kernel.org
 help / color / mirror / Atom feed
* [scarthgap][PATCH] connman: fix syslog identity with glibc
@ 2026-09-29  9:30 Gaël PORTAY
  2026-10-02 15:17 ` [OE-core] " Yoann Congal
  0 siblings, 1 reply; 4+ messages in thread
From: Gaël PORTAY @ 2026-09-29  9:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Gaël PORTAY

The connman syslog patch modifies the handling of the ident string to
solve a build issue with musl. This introduces a regression with glibc
that does not make an internally copy of the indent string[1], while
musl copies it[2]. Thus, that change is unsafe to apply in the glibc
world.

Also, syslog(3)[3] man page tells:

	NOTES

	The argument ident in the call of openlog() is probably stored
	as-is. Thus, if the string it points to is changed, syslog() may
	start prepending the changed string, and if the string it points
	to ceases to exist, the results are undefined. Most portable is
	to use a string constant.

This removes 0001-src-log.c-Include-libgen.h-for-basename-API.patch[4]
from the SRC_URI if libc-glibc overrides so that it is not applied when
using glibc.

Note: The patch was submitted to connamn, and was never get merged[5].
Moreover the patch was removed from poky after bumping to 1.43[6].

Fixes:

	Sep  7 06:10:36 qemux86-64 daemon.info ^A[776]: Connection Manager version 1.42

This fixes commit 992d59564b84333740e6465ec696238274b73938.

[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=misc/syslog.c;h=b7414e7b43a510342273bece335b4258e8754905;hb=47dd7e0dacf50c740b04c78d3f85fbf983d53aba#l338
[2]: https://git.musl-libc.org/cgit/musl/tree/src/misc/syslog.c?h=v1.2.4#n64
[3]: https://linux.die.net/man/3/syslog
[4]: https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch?h=scarthgap
[5]: https://lore.kernel.org/connman/0caf957f-e046-4453-a8ae-fd6c994ac95d@gmail.com/
[6]: https://github.com/openembedded/openembedded-core/commit/467d28f5d243d821722cf8dcdbb9675a2820cd4f

Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
---
 meta/recipes-connectivity/connman/connman_1.42.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
index 9b3abbe258..5c8bdd43f2 100644
--- a/meta/recipes-connectivity/connman/connman_1.42.bb
+++ b/meta/recipes-connectivity/connman/connman_1.42.bb
@@ -5,13 +5,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
            file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
            file://connman \
            file://no-version-scripts.patch \
-           file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
            file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
            file://CVE-2025-32743.patch \
            file://CVE-2025-32366.patch \
            "
 
-SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
+SRC_URI:append:libc-musl = " file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
+                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+                           "
 
 SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa"
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [scarthgap][PATCH] connman: fix syslog identity with glibc
  2026-09-29  9:30 [scarthgap][PATCH] connman: fix syslog identity with glibc Gaël PORTAY
@ 2026-10-02 15:17 ` Yoann Congal
  2026-10-13  5:24   ` Gaël PORTAY
  0 siblings, 1 reply; 4+ messages in thread
From: Yoann Congal @ 2026-10-02 15:17 UTC (permalink / raw)
  To: gael.portay+rtone, openembedded-core

Hello,

On Tue Sep 29, 2026 at 11:30 AM CEST, Gaël PORTAY via lists.openembedded.org wrote:
> The connman syslog patch modifies the handling of the ident string to
> solve a build issue with musl.
What "connman syslog patch"?
I'm having a hard time understanding this patch...

> This introduces a regression with glibc
> that does not make an internally copy of the indent string[1], while
> musl copies it[2]. Thus, that change is unsafe to apply in the glibc
> world.
>
> Also, syslog(3)[3] man page tells:
>
> 	NOTES
>
> 	The argument ident in the call of openlog() is probably stored
> 	as-is. Thus, if the string it points to is changed, syslog() may
> 	start prepending the changed string, and if the string it points
> 	to ceases to exist, the results are undefined. Most portable is
> 	to use a string constant.
>
> This removes 0001-src-log.c-Include-libgen.h-for-basename-API.patch[4]
> from the SRC_URI if libc-glibc overrides so that it is not applied when
> using glibc.

Hmm, this patch moves "0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch"
not 0001-src-log.c-Include-libgen.h-for-basename-API.patch"

> Note: The patch was submitted to connamn, and was never get merged[5].
> Moreover the patch was removed from poky after bumping to 1.43[6].
>
> Fixes:
>
> 	Sep  7 06:10:36 qemux86-64 daemon.info ^A[776]: Connection Manager version 1.42
>
> This fixes commit 992d59564b84333740e6465ec696238274b73938.
Where it this commit from? I can't find it in oe-core nor poky.

>
> [1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=misc/syslog.c;h=b7414e7b43a510342273bece335b4258e8754905;hb=47dd7e0dacf50c740b04c78d3f85fbf983d53aba#l338
> [2]: https://git.musl-libc.org/cgit/musl/tree/src/misc/syslog.c?h=v1.2.4#n64
> [3]: https://linux.die.net/man/3/syslog
> [4]: https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch?h=scarthgap
> [5]: https://lore.kernel.org/connman/0caf957f-e046-4453-a8ae-fd6c994ac95d@gmail.com/
> [6]: https://github.com/openembedded/openembedded-core/commit/467d28f5d243d821722cf8dcdbb9675a2820cd4f
>
> Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
> ---
>  meta/recipes-connectivity/connman/connman_1.42.bb | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
> index 9b3abbe258..5c8bdd43f2 100644
> --- a/meta/recipes-connectivity/connman/connman_1.42.bb
> +++ b/meta/recipes-connectivity/connman/connman_1.42.bb
> @@ -5,13 +5,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
>             file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
>             file://connman \
>             file://no-version-scripts.patch \
> -           file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
>             file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
>             file://CVE-2025-32743.patch \
>             file://CVE-2025-32366.patch \
>             "
>  
> -SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
> +SRC_URI:append:libc-musl = " file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
> +                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
> +                           "
>  
>  SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa"
>  

Regards,
-- 
Yoann Congal
Smile ECS



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [scarthgap][PATCH] connman: fix syslog identity with glibc
  2026-10-02 15:17 ` [OE-core] " Yoann Congal
@ 2026-10-13  5:24   ` Gaël PORTAY
  2026-10-13  7:07     ` Yoann Congal
  0 siblings, 1 reply; 4+ messages in thread
From: Gaël PORTAY @ 2026-10-13  5:24 UTC (permalink / raw)
  To: Yoann Congal, openembedded-core

Hello Yoann,

On Fri Oct 2, 2026 at 5:17 PM CEST, Yoann Congal wrote:
> Hello,
>
> On Tue Sep 29, 2026 at 11:30 AM CEST, Gaël PORTAY via lists.openembedded.org wrote:
> > The connman syslog patch modifies the handling of the ident string to
> > solve a build issue with musl.
> What "connman syslog patch"?
> I'm having a hard time understanding this patch...
>

I am sorry to hear that.

By "connman syslog pach", I wanted to reference that downstream change:

	0001-src-log.c-Include-libgen.h-for-basename-API.patch

I can reword the commit message if it is unclear; or I can remove some
parts of it that bring some unnecessary noise.

> > (...)
> >
> > This removes 0001-src-log.c-Include-libgen.h-for-basename-API.patch[4]
> > from the SRC_URI if libc-glibc overrides so that it is not applied when
> > using glibc.
>
> Hmm, this patch moves "0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch"
> not 0001-src-log.c-Include-libgen.h-for-basename-API.patch"
>

Oops, I made a terrible mistake; let me respin a v2 to fix this.

Note that I have that following change in a .bbappend; this would
explain why I have not figured it out :facepalm:

	SRC_URI:remove:libc-glibc = "file://0001-src-log.c-Include-libgen.h-for-basename-API.patch"

Again, I am sorry for that mistake; and I will retest it correctly later
this day.

> > (...)
> > 
> > This fixes commit 992d59564b84333740e6465ec696238274b73938.
> Where it this commit from? I can't find it in oe-core nor poky.
>

This is weird, it comes from poky tree: 992d59564b (connman: Fix build
with musl). And you are right, it is not part of oe-core.

Nevermind, I wanted to link this change in poky tree:
https://git.yoctoproject.org/poky/commit/?id=992d59564b84333740e6465ec696238274b73938

Or that one in oe-core tree:
https://git.openembedded.org/openembedded-core/commit/?id=d0139bcbe0499e570f02f8f7b7e364763f7359ec

> > (...)
> > diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
> > index 9b3abbe258..5c8bdd43f2 100644
> > --- a/meta/recipes-connectivity/connman/connman_1.42.bb
> > +++ b/meta/recipes-connectivity/connman/connman_1.42.bb
> > @@ -5,13 +5,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
> >             file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
> >             file://connman \
> >             file://no-version-scripts.patch \
> > -           file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
> >             file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
> >             file://CVE-2025-32743.patch \
> >             file://CVE-2025-32366.patch \
> >             "
> >  
> > -SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
> > +SRC_URI:append:libc-musl = " file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
> > +                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
> > +                           "
> >  
> >  SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa"

Here is what the change would look like:

	@@ -6,12 +6,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
	            file://connman \
	            file://no-version-scripts.patch \
	            file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
	-           file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
	            file://CVE-2025-32743.patch \
	            file://CVE-2025-32366.patch \
	            "
	
	-SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
	+SRC_URI:append:libc-musl = " file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
	+                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
	+                           "
	
	 SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa" 
	
>
> Regards,

Regards,
Gaël


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [scarthgap][PATCH] connman: fix syslog identity with glibc
  2026-10-13  5:24   ` Gaël PORTAY
@ 2026-10-13  7:07     ` Yoann Congal
  0 siblings, 0 replies; 4+ messages in thread
From: Yoann Congal @ 2026-10-13  7:07 UTC (permalink / raw)
  To: Gaël PORTAY, openembedded-core

On Tue Oct 13, 2026 at 7:24 AM CEST, Gaël PORTAY wrote:
> Hello Yoann,

Hello,

> On Fri Oct 2, 2026 at 5:17 PM CEST, Yoann Congal wrote:
>> Hello,
>>
>> On Tue Sep 29, 2026 at 11:30 AM CEST, Gaël PORTAY via lists.openembedded.org wrote:
>> > The connman syslog patch modifies the handling of the ident string to
>> > solve a build issue with musl.
>> What "connman syslog patch"?
>> I'm having a hard time understanding this patch...
>>
>
> I am sorry to hear that.
>
> By "connman syslog pach", I wanted to reference that downstream change:
>
> 	0001-src-log.c-Include-libgen.h-for-basename-API.patch
>
> I can reword the commit message if it is unclear; or I can remove some
> parts of it that bring some unnecessary noise.

Yes, please reword to make it clearer. No need to remove parts though.

>> > (...)
>> >
>> > This removes 0001-src-log.c-Include-libgen.h-for-basename-API.patch[4]
>> > from the SRC_URI if libc-glibc overrides so that it is not applied when
>> > using glibc.
>>
>> Hmm, this patch moves "0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch"
>> not 0001-src-log.c-Include-libgen.h-for-basename-API.patch"
>>
>
> Oops, I made a terrible mistake; let me respin a v2 to fix this.
>
> Note that I have that following change in a .bbappend; this would
> explain why I have not figured it out :facepalm:
>
> 	SRC_URI:remove:libc-glibc = "file://0001-src-log.c-Include-libgen.h-for-basename-API.patch"
>
> Again, I am sorry for that mistake; and I will retest it correctly later
> this day.
>
>> > (...)
>> > 
>> > This fixes commit 992d59564b84333740e6465ec696238274b73938.
>> Where it this commit from? I can't find it in oe-core nor poky.
>>
>
> This is weird, it comes from poky tree: 992d59564b (connman: Fix build
> with musl). And you are right, it is not part of oe-core.
>
> Nevermind, I wanted to link this change in poky tree:
> https://git.yoctoproject.org/poky/commit/?id=992d59564b84333740e6465ec696238274b73938
>
> Or that one in oe-core tree:
> https://git.openembedded.org/openembedded-core/commit/?id=d0139bcbe0499e570f02f8f7b7e364763f7359ec


Huh, weird, I believed I checked poky.
Anyway, I'd rather have a oe-core sha1(+commit title) reference instead
of a poky one.

>
>> > (...)
>> > diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
>> > index 9b3abbe258..5c8bdd43f2 100644
>> > --- a/meta/recipes-connectivity/connman/connman_1.42.bb
>> > +++ b/meta/recipes-connectivity/connman/connman_1.42.bb
>> > @@ -5,13 +5,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
>> >             file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
>> >             file://connman \
>> >             file://no-version-scripts.patch \
>> > -           file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
>> >             file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
>> >             file://CVE-2025-32743.patch \
>> >             file://CVE-2025-32366.patch \
>> >             "
>> >  
>> > -SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
>> > +SRC_URI:append:libc-musl = " file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
>> > +                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
>> > +                           "
>> >  
>> >  SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa"
>
> Here is what the change would look like:
>
> 	@@ -6,12 +6,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
> 	            file://connman \
> 	            file://no-version-scripts.patch \
> 	            file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
> 	-           file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
> 	            file://CVE-2025-32743.patch \
> 	            file://CVE-2025-32366.patch \
> 	            "
> 	
> 	-SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
> 	+SRC_URI:append:libc-musl = " file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
> 	+                             file://0002-resolve-musl-does-not-implement-res_ninit.patch \
> 	+                           "
> 	
> 	 SRC_URI[sha256sum] = "a3e6bae46fc081ef2e9dae3caa4f7649de892c3de622c20283ac0ca81423c2aa" 

This change does look better :)

Thanks!
-- 
Yoann Congal
Smile ECS



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-13  7:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29  9:30 [scarthgap][PATCH] connman: fix syslog identity with glibc Gaël PORTAY
2026-10-02 15:17 ` [OE-core] " Yoann Congal
2026-10-13  5:24   ` Gaël PORTAY
2026-10-13  7:07     ` Yoann Congal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.