Skip to contentSkip to conversation

Pulseaudio Y2038 fix

PATCH In review Primoz Fiser 2 participants 4 messages Jul 1, 2024

lore
Share & tools
lore
#0 lore raw

cover Pulseaudio Y2038 fix

Hi,

these 2 patches fix pulseaudio issues with Y2038 compatibility. And in turn solve run-time issue with "Stack smashing" as described here [1].

Explanation:

Patch #1: Adds PACKAGECONFIG[oss-output] and hence adds configure flag "-Doss-output=disabled" by default to pulseaudio. This in turn disables OSS (Open Sound System) support that has been enabled by default since. However, please note that OSS has long been deprecated in favor or ALSA and I think we don't even have support for it in the kernel. Moreover, even Debian disabled OSS wrapper support for 32-bit ARM machines [2].

Patch #2: Re-adds GLIBC_64BIT_TIME_FLAGS for pulseaudio removed by the poky time64.inc. This has been disabled since pulseaudio didn't build with those flags enabled [3]. Now, pulseaudio will be Y2038 compatible.

BR,
Primoz

[1] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3783
[2] https://salsa.debian.org/pulseaudio-team/pulseaudio/-/commit/5209c2fc46630722f1aaa3c0bbf88a9f843cd27c
[3] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770

Primoz Fiser (2):
pulseaudio: Add PACKAGECONFIG for optional OSS support
pulseaudio: Remove from time64.inc exception list

 meta/conf/distro/include/time64.inc               | 5 -----
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 pulseaudio: Add PACKAGECONFIG for optional OSS support

Add pulseaudio PACKAGECONFIG for optional OSS (Open Sound System) output support. OSS was a sound system available before ALSA and has since been deprecated. Lately, this part has started causing build issues when used with GLIBC_64BIT_TIME_FLAGS. Thus, by default drop OSS output support in favor of Y2038 compliance.

---
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-multimedia/pulseaudio/pulseaudio.inc +1 -0
index 9fb5c81757da..bfd57c8e21f0 100644
@@ -124,6 +124,7 @@ PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc"
 PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing"
 PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false,"
 PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,"
+PACKAGECONFIG[oss-output] = "-Doss-output=enabled,-Doss-output=disabled,"
 
 export TARGET_PFPU = "${TARGET_FPU}"
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 pulseaudio: Remove from time64.inc exception list

In reply to Primoz Fiser

Pulseaudio OSS (Open Sound System) support was causing build issues when used with GLIBC_64BIT_TIME_FLAGS. However, optional OSS support was disabled by default with addition of PACKAGECONFIG[oss-output]. Thus remove pulseaudio from the exception list in time64.inc and allow it to be Y2038 compatible.

---
 meta/conf/distro/include/time64.inc | 5 -----
 1 file changed, 5 deletions(-)
meta/conf/distro/include/time64.inc +0 -5
index 2e85753e55a4..6ee7b4915267 100644
@@ -25,10 +25,6 @@ GLIBC_64BIT_TIME_FLAGS:pn-glibc-testsuite = ""
 # both 32 and 64 bit file APIs.  But it does not handle the time side?
 # Needs further investigation
 GLIBC_64BIT_TIME_FLAGS:pn-pipewire = ""
-# Pulseaudio override certain LFS64 functions e.g. open64 and intentionally
-# undefines _FILE_OFFSET_BITS, which wont work when _TIME_BITS=64 is set
-# See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770
-GLIBC_64BIT_TIME_FLAGS:pn-pulseaudio = ""
 # Undefines _FILE_OFFSET_BITS on purpose in
 # libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
 GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = ""
@@ -37,7 +33,6 @@ GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = ""
 INSANE_SKIP:append:pn-gcc-sanitizers = " 32bit-time"
 INSANE_SKIP:append:pn-glibc = " 32bit-time"
 INSANE_SKIP:append:pn-glibc-y2038-tests = " 32bit-time"
-INSANE_SKIP:append:pn-pulseaudio = " 32bit-time"
 
 # Strace has tests that call 32 bit API directly, which is fair enough, e.g.
 # /usr/lib/strace/ptest/tests/ioctl_termios uses 32-bit api 'ioctl'
Signature · 1 line
2.25.1
#3 lore raw
In reply to Primoz Fiser

Thanks, these look good.

Alex

Quoted 46 lines · Primoz Fiser via lists.openembedded.org

Hi,

these 2 patches fix pulseaudio issues with Y2038 compatibility. And in turn solve run-time issue with "Stack smashing" as described here [1].

Explanation:

Patch #1: Adds PACKAGECONFIG[oss-output] and hence adds configure flag "-Doss-output=disabled" by default to pulseaudio. This in turn disables OSS (Open Sound System) support that has been enabled by default since. However, please note that OSS has long been deprecated in favor or ALSA and I think we don't even have support for it in the kernel. Moreover, even Debian disabled OSS wrapper support for 32-bit ARM machines [2].

Patch #2: Re-adds GLIBC_64BIT_TIME_FLAGS for pulseaudio removed by the poky time64.inc. This has been disabled since pulseaudio didn't build with those flags enabled [3]. Now, pulseaudio will be Y2038 compatible.

BR,
Primoz

[1] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3783
[2] https://salsa.debian.org/pulseaudio-team/pulseaudio/-/commit/5209c2fc46630722f1aaa3c0bbf88a9f843cd27c
[3] https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770

Primoz Fiser (2):
pulseaudio: Add PACKAGECONFIG for optional OSS support
pulseaudio: Remove from time64.inc exception list

 meta/conf/distro/include/time64.inc               | 5 -----
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)

--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201275): https://lists.openembedded.org/g/openembedded-core/message/201275
Mute This Topic: https://lists.openembedded.org/mt/106973073/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-