mpg123-devel Mailing List for mpg123
Brought to you by:
sobukus
You can subscribe to this list here.
| 2006 |
Jan
(2) |
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(2) |
Oct
(13) |
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(6) |
Oct
|
Nov
(7) |
Dec
(6) |
| 2008 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(18) |
May
(16) |
Jun
(10) |
Jul
(13) |
Aug
(14) |
Sep
(12) |
Oct
(32) |
Nov
(12) |
Dec
(33) |
| 2009 |
Jan
(2) |
Feb
(10) |
Mar
(16) |
Apr
(48) |
May
(92) |
Jun
(68) |
Jul
(37) |
Aug
(28) |
Sep
(61) |
Oct
(43) |
Nov
(33) |
Dec
(48) |
| 2010 |
Jan
(8) |
Feb
(27) |
Mar
(16) |
Apr
(11) |
May
(34) |
Jun
(27) |
Jul
(15) |
Aug
(16) |
Sep
(24) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2011 |
Jan
(21) |
Feb
(12) |
Mar
(8) |
Apr
(33) |
May
(2) |
Jun
(29) |
Jul
(16) |
Aug
(27) |
Sep
(27) |
Oct
(11) |
Nov
(16) |
Dec
(4) |
| 2012 |
Jan
(40) |
Feb
(12) |
Mar
(40) |
Apr
(34) |
May
(32) |
Jun
(6) |
Jul
(7) |
Aug
(13) |
Sep
(8) |
Oct
(12) |
Nov
(14) |
Dec
(5) |
| 2013 |
Jan
(3) |
Feb
(19) |
Mar
(2) |
Apr
(7) |
May
(30) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(23) |
Oct
(8) |
Nov
(3) |
Dec
(1) |
| 2014 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
(9) |
May
(8) |
Jun
(2) |
Jul
|
Aug
(15) |
Sep
(7) |
Oct
(1) |
Nov
(5) |
Dec
|
| 2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
(13) |
Aug
(16) |
Sep
(26) |
Oct
(2) |
Nov
(5) |
Dec
|
| 2016 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
(16) |
Jun
(2) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
| 2017 |
Jan
(11) |
Feb
(10) |
Mar
(6) |
Apr
(4) |
May
(3) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(11) |
| 2018 |
Jan
(8) |
Feb
(16) |
Mar
(6) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(5) |
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
(10) |
Dec
(1) |
| 2020 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(13) |
Jun
(9) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
|
Mar
(3) |
Apr
(12) |
May
(4) |
Jun
(12) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(68) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(9) |
Oct
(7) |
Nov
|
Dec
|
| 2023 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(11) |
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
| 2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
|
From: Thomas O. <tho...@or...> - 2025-10-23 08:56:06
|
Am Mon, 20 Oct 2025 12:39:54 -0500 (CDT) schrieb Peter Tirsek <pe...@ti...>: > All of those also fit the > same simple pattern of escape, followed by one or more characters from > my list, then terminated by one not in that list, so I think my simple > hack still holds. I was more thinking about differing escape sequence introductions, like 8 bit sequences using a literal CSI character. Don't seem relevant. But impossible? > Assuming you only get escape sequences from a well-behaved terminal on > a well-behaved connection with minimal input lag and latency, I agree. > I wouldn't think mpg123 gets used remotely much, so the connection is > likely to be very stable. However, if for some reason this assumption > doesn't hold, e.g. if the user hits the escape key manually, OK, I'll need some time to think and read about how these sequences can enter the UI. I assumed one keypress = one sequence, but that might not be true at all. What about the user pressing ESC manually? Mpg123 gets a literal 0x1b that does get followed by a sequence. Your approach would swallow the next valid terminal control key, wouldn't it? > Although the patch that keeps track of state is a little more robust, I > think for all practical purposes the loop idea is just fine, I read that even Microsoft has an idea of ANSI control sequences. Not sure if that applies to input in term_win32.c, but maybe we should move this a level higher up? If the control sequence looping is around term_get_key() in term.c, then we got all platforms covered _and_ have sequence detection via the select logic on the lower level. If there is just 0x1b and the next term_get_key() doesn't give a following character, it was a lone ESC to be ignored? If running on a link with abysmal latency that turns a single burst of 4 bytes into single chars 10 ms apart (might think about reducing that delay, though … 10 ms is quite long while playing audio), then you'll have false negatives on sequence detection. Would be rather bad experience anyway … and if your mpg123 instance is that far off, are you listening? Maybe we could reduce the select timeout, or actually … if looking for a sequence, setting do_delay=0 might be sensible, to keep the overall select waiting down, keeping playback smooth. Or a normal timeout of 5 ms and 1 ms for each additional character … Alrighty then, Thomas |
|
From: Peter T. <pe...@ti...> - 2025-10-20 17:52:46
|
On Mon, 20 Oct 2025, Thomas Orgis via mpg123-devel wrote: >> I think all these escape sequences can be ignored by discarding the >> leading escape character(s), then any occurrences of the characters >> `[0123456789;O`, followed by a character not in that list. > https://en.wikipedia.org/wiki/ANSI_escape_code > and do some generic escape sequence slurping. https://invisible-island.net/xterm/xterm-function-keys.html (linked to as #cite_ref-68 (currently [62]) from the Wikipedia page you mentioned, has another long list of key control codes. All of those also fit the same simple pattern of escape, followed by one or more characters from my list, then terminated by one not in that list, so I think my simple hack still holds. >> I've applied the patch below to my copy of mpg123 and it works for me. > Thanks, something along that we should add. Regarding the approach: As > it can be reasonably assumed that a control sequence comes in one go, > I'd rather loop-read it right after the intro character without a > global flag for being inside a sequence or not. Assuming you only get escape sequences from a well-behaved terminal on a well-behaved connection with minimal input lag and latency, I agree. I wouldn't think mpg123 gets used remotely much, so the connection is likely to be very stable. However, if for some reason this assumption doesn't hold, e.g. if the user hits the escape key manually, doing it in a loop without returning from the function and keeping track of the input state, playback will stop until a valid key sequence is fully input, unless this read is also protected with a call to select(), in which case, what's an acceptable timeout? Although the patch that keeps track of state is a little more robust, I think for all practical purposes the loop idea is just fine, plus it's a smaller, cleaner patch. It could be done as follows (although this version doesn't fix the ambiguous indent in the preceding "if"): Index: src/term_posix.c =================================================================== --- src/term_posix.c (revision 5528) +++ src/term_posix.c (working copy) @@ -216,7 +216,15 @@ { if(read(term_fd,val,1) <= 0) return 0; /* Well, we couldn't read the key, so there is none. */ - else + if(*val == '\x1b') + { + /* Ignore escape sequences. Keep reading from the terminal as long as the + input character indicates that the sequence has not yet terminated. */ + do { + if(read(term_fd,val,1) <= 0) break; + } while(strchr("\x1b[0123456789;O", *val)); + return 0; + } return 1; } #endif -- Peter Tirsek |
|
From: Thomas O. <tho...@or...> - 2025-10-20 07:50:09
|
Am Fri, 17 Oct 2025 20:10:13 -0500 (CDT) schrieb Peter Tirsek <pe...@ti...>: > I did a brief survey of special keys in the terminal emulators I have > easy access to, and I think all these escape sequences can be ignored > by discarding the leading escape character(s), then any occurrences of > the characters `[0123456789;O`, followed by a character not in that > list. Funny how long mpg123 could live without caring about the issue of escape sequences messing with the terminal control keys. We probably should just go with https://en.wikipedia.org/wiki/ANSI_escape_code and do some generic escape sequence slurping. It's not that many variants if one doesn't actually want to interpret them. I think it should be OK to write simple code to deal with that without relying on a proper terminal/curses library. > I've applied the patch below to my copy of mpg123 and it works for me. > I thought I'd share it upstream in case anyone else finds it useful. Thanks, something along that we should add. Regarding the approach: As it can be reasonably assumed that a control sequence comes in one go, I'd rather loop-read it right after the intro character without a global flag for being inside a sequence or not. Alrighty then, Thomas |
|
From: Peter T. <pe...@ti...> - 2025-10-18 01:10:21
|
I have an issue with occasionally hitting the wrong special key while
using mpg123 in terminal control mode, and depending on the exact
terminal code the terminal emulator sends for that key, it tends to
have an undesirable effect on the state of the player. Mpg123 already
ignores other keys it doesn't recognize, but I wanted it to ignore
complete escape sequences as well.
I did a brief survey of special keys in the terminal emulators I have
easy access to, and I think all these escape sequences can be ignored
by discarding the leading escape character(s), then any occurrences of
the characters `[0123456789;O`, followed by a character not in that
list.
Kitty urxvt Linux console
F1 \eOP \e[11~ \e[[A
Shift-F1 \e[1;2P \e[23~ \e[25~
Ctrl-F1 \e[1;5P \e[11^
Alt-F1 \e[1;3P \e\e[11~
F2 \eOQ \e[12~ \e[[B
F3 \eOR \e[13~ \e[[C
F4 \eOS \e[14~ \e[[D
F5 \e[15~ \e[15~ \e[[E
F6 \e[17~ \e[17~ \e[17~
F7 \e[18~ \e[18~ \e[18~
F8 \e[19~ \e[19~ \e[19~
F9 \e[20~ \e[20~ \e[20~
F10 \e[21~ \e[21~ \e[21~
F11 \e[23~ \e[23~ \e[23~
F12 \e[24~ \e[24~ \e[24~
Shift-F12 \e[24;2~ \e[24$
Ctrl-F12 \e[24;5~ \e[24^
Alt-F12 \e[24;3~ \e\e[24~
Home \e[H \e[7~ \e[1~
End \e[F \e[8~ \e[4~
Insert \e[2~ \e[2~ \e[2~
Delete \e[3~ \e[3~ \e[3~
PgUp \e[5~ \e[5~ \e[5~
PgDn \e[6~ \e[6~ \e[6~
Up \e[A \e[A \e[A
Down \e[B \e[B \e[B
Left \e[D \e[D \e[D
Right \e[C \e[C \e[C
Kp5 \e[E \e[G
Super-PrtSc \e[57361;9u
I've applied the patch below to my copy of mpg123 and it works for me.
I thought I'd share it upstream in case anyone else finds it useful.
Index: src/term_posix.c
===================================================================
--- src/term_posix.c (revision 5528)
+++ src/term_posix.c (working copy)
@@ -196,6 +196,7 @@
#else
fd_set r;
struct timeval t;
+ static int in_escape_seq = 0;
/* Shortcut: If some other means sent a key, use it. */
if(prekey)
@@ -215,9 +216,23 @@
if(select(term_fd+1,&r,NULL,NULL,(stopped) ? NULL : &t) > 0 && FD_ISSET(term_fd,&r))
{
if(read(term_fd,val,1) <= 0)
- return 0; /* Well, we couldn't read the key, so there is none. */
+ return 0; /* Well, we couldn't read the key, so there is none. */
+ if(*val == '\x1b')
+ {
+ /* Ignore escape sequences. */
+ in_escape_seq = 1;
+ return 0;
+ }
+ if(in_escape_seq)
+ {
+ /* Any of the following characters continue the escape sequence. Anything
+ else terminates it. In either case, ignore the current character. */
+ if(!strchr("[0123456789;O", *val))
+ in_escape_seq = 0;
+ return 0;
+ }
else
- return 1;
+ return 1;
}
#endif
else return 0;
--
Peter Tirsek
|
|
From: Thomas O. <tho...@or...> - 2025-10-05 21:29:27
|
Hi folks, a little code hygiene with mpg123 1.33.3: 1.33.3 ------ - libmpg123: -- Fix build with newer toolchain on Android by using __ANDROID__ macro (bug 380). -- Consolidate and more consistently use .rodata switch in macro. Get it at the usual places … https://sourceforge.net/projects/mpg123/files/mpg123/1.33.3/ https://mpg123.org/download/ Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2025-08-05 18:43:51
|
Dear mpg123 folks, there's a little bugfix release fixing a single bug: 1.33.2 ------ - libmpg123: -- Do not modify raw ID3v2 data while parsing (bug 379). This used to be fine before MPG123_STORE_RAW_ID3 got introduced. Not anymore. Get it from the usual places … This release also serves as a notice to anyone wanting to extract raw ID3v2 frames with libmpg123 to disable the internal parsing with MPG123_SKIP_ID3V2 or ensure that at least this bugfixed version of libmpg123 is in use. Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2025-07-27 18:48:38
|
Dear mpg123 folks, there is a new mpg123 release with some urgency for me, as I botched up signal handling for the terminal control mode (--ctrlusr1, --ctrlusr2) in 1.31. Code cleanup triggered changed semantics of the signal() library call, of which you are warned very clearly in the Linux/glibc manpage of signal. It is rather embarassing that mpg123 got hit by that in this age, so I prepared releases to fix the regression for all affected minor series. Any distro shipping 1.31.x or 1.32.x: Please update, also for LTS/stable. Downloads are at the usual places on https://sourceforge.net/projects/mpg123/files/mpg123/ or https://mpg123.org/download/ Full changes for 1.33.1: 1.33.1 ------ - INSTALL updated with hints for Windows, mainly. - Finally formatted README. Maybe do it in Markdown sometime, as that's the fashion. - build: -- The ports/cmake only installs manpages for BUILD_PROGRAMS now. -- The configure gives better hint if pkg-config was missing during generation (bug 378). - mpg123: -- Replace usage of signal() in terminal code with our sigaction() wrapper to fix repeated handling for --sigusr1 and --sigusr2, which got subtly broken on Linux + glibc by a feature test macro change in mpg123 1.31. Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2025-06-07 17:24:07
|
Dear mpg123 afictionados, after some messing around, there is a new mpg123 release now. The question is still open how we continue with Windows binaries. Right now, there are no new ones for this release. If anyone wants to build the set: the Script windows-builds.sh in the archive helps with that, be it in MSYS2 or via mingw-w64 cross toolchain. But to the changes, as there are a few: 1.33.0 ------ - mpg123 -- Fix printout of filenames at end (convert/limit text encoding). -- Treat HTTP header encoding as unknown/ASCII and formally convert to UTF-8. -- Make --continue mode work with --random. -- Handle possible failure of __wgetmainargs on Windows (bug 375). - mpg123-id3dump: Fix up command line arg handling for Windows. - out123 -- Finally give zero exit code when generating sounds, not indicating spurious failure. - build: -- Use CCASFLAGS for assembler tests, to enable builds that enable instruction sets that way (bug 377). -- PIC for compat libs (convenience libs used during build) only if building shared libs (github PR 17 by Wouter Wijsman). - compat: -- Map strtok use to strtok_r or strtok_s (MS platforms), if possible. users only in control_generic and libout123 so far. Out123 itself uses mytok. Shall fix bug 376 (build with MSVC again). -- Enable build on PSP by merging in the hotfix of opmitting signal code (github PR 18 by Wouter Wijsman). - libout123 -- modules/win32: Align waveOutGetDevCapsA to WAVEOUTCAPSA, in anticipation of some UNICODE change. - libmpg123 -- API version 49 with added mpg123_open_handle64(), mpg123_open64(), and mpg123_open_fixed64() that are not subject to largefile renaming. This means you can still access internal I/O with MPG123_PORTABLE_API. The code has been there before, anyway. -- With MPG123_PORTABLE_API, mpg123_open_handle() is hidden now (use mpg123_open_handle64() instead). -- more silence on errors (sideband limit message) Find it at the usual places and have fun, with mpg123 or in other ways … Alrighty then, Thomas |
|
From: <ano...@gm...> - 2025-01-17 22:09:03
|
A pull request by sharkwouter was opened at 2025-01-17 21:15:38+00:00. Please visit https://github.com/madebr/mpg123/pull/18 to give feedback and review the code. --- The previous pull request I made, makes it possible to build for the Playstation Portable (PSP), which can be found here: https://github.com/madebr/mpg123/pull/17 This small change finishes the work needed to make libmpg123 work on the PSP. I tested it using SDL2_Mixer and it works flawlessly from what I can tell. --- patch details: - url: https://github.com/madebr/mpg123/pull/18 - patch: https://github.com/madebr/mpg123/pull/18.patch url details: - user name: sharkwouter - user url: https://github.com/sharkwouter |
|
From: <ano...@gm...> - 2025-01-14 17:08:51
|
A pull request by sharkwouter was opened at 2025-01-14 17:01:43+00:00. Please visit https://github.com/madebr/mpg123/pull/17 to give feedback and review the code. --- I would like to include the mpg123 library into PSPDEV, which is a homebrew sdk for the Playstation Portable (PSP). The PSP only supports building libraries statically, which means position independent code does not work on it. With this PR it can be build for the PSP using CMake. --- patch details: - url: https://github.com/madebr/mpg123/pull/17 - patch: https://github.com/madebr/mpg123/pull/17.patch url details: - user name: sharkwouter - user url: https://github.com/sharkwouter |
|
From: Thomas O. <tho...@or...> - 2024-12-14 15:53:43
|
Dear mpg123 people, there is a new release of mpg123. Get it at the usual places, indicated by https://mpg123.org/download.shtml . 1.32.10 ------ - scripts/tag_lyrics.py: fix for python3 (thanks to cclauss, github PR 16) - libout123: Use strtok_r() to avoid conflicts multithreaded contexts (both sides should avoid plain strtok()! Debian-bug 1089543). - libmpg123: -- Un-break DLL builds that need I/O functions defined in libmpg123.c (like mpg123_open(), bug 374). - ports/cmake: More fixup to also produce .pc files with Libs.private. Alrighty then, Thomas |
|
From: <ano...@gm...> - 2024-12-02 22:10:01
|
A pull request by cclauss was opened at 2024-12-02 21:22:39+00:00. Please visit https://github.com/madebr/mpg123/pull/16 to give feedback and review the code. --- <!-- Please write a little about the why and how of this pull request A mail should automatically get sent to the mpg123-devel mailing list. Before submitting, please check the following: - [ ] Set target branch to `master` - [ ] Write a little text above --> --- patch details: - url: https://github.com/madebr/mpg123/pull/16 - patch: https://github.com/madebr/mpg123/pull/16.patch url details: - user name: cclauss - user url: https://github.com/cclauss |
|
From: Thomas O. <tho...@or...> - 2024-11-02 09:05:32
|
Dear mpg123 folks, here comes just a small followup to the release fixing CVE-2024-10573. I forgot to increase the reported library patchlevel last time and a build improvement for MSVCRT also went in. 1.32.9 ------ - libmpg123: -- enable 64 bit offset path for MSVCRT and avoid warnings about MS's game about POSIX API with and without underscores (bug 373). -- Increase the library patchlevel, as was forgotten on previous release. Now you can check for distversion >= 1.32.8 or mpg123 libversion >= 48 patchlevel 3 to see if you're vulnerable to CVE-2024-10573. Ger it per usual via pointers on https://mpg123.org/download.shtml Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2024-10-26 16:42:18
|
Am Sat, 26 Oct 2024 17:38:40 +0200 schrieb Thomas Orgis <tho...@or...>: > I hereby announce mpg123 version 1.32.8. Get it at the usual places. > Now. Observing that versions 1.26.x and 1.31.x are still in the wild (meaning: Debian stable), I ported the recent security fix to those release series. Please see recent commits to svn://scm.orgis.org/mpg123/branches/1.26-fixes and svn://scm.orgis.org/mpg123/branches/1.31-fixes Current code is also visible under https://scm.orgis.org/mpg123/branches/1.26-fixes/ and https://scm.orgis.org/mpg123/branches/1.31-fixes/ Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2024-10-26 15:55:10
|
Dear mpg123 folks, I hereby announce mpg123 version 1.32.8. Get it at the usual places. Now. This is an important security update! There is possible buffer overflow (writing of decoded PCM samples beyond allocated output buffer) for streams that change output properties together with certain usage of libmpg123. This needed seeking around in the stream (including scanning it before actual decoding) to trigger. So, your usual web radio stream as obvious attack vector is unlikely, as you won't seek around in it. If you do work with stream dumps, usage of MPG123_NO_FRANKENSTEIN or the --no-frankenstein option to the mpg123 application is a workaround to avoid the formerly dangerous situation in earlier mpg123 releases. This also means that mpg123 will not decode streams of concatenated files with either varying format or leading Info frames past the first track anymore. With this release, the parser has been improved not to store certain stream properties before actual MPEG frame data matching that property has been stored. This avoids the inconsistency that triggered the overflow. Also note that if you always use a fixed decoding buffer for full stereo of the maximum of 1152 samples per frame, times two and your choice of encoding, your application is also not susceptible. Exploitation of this is not trivial, but I cannot rule out the possibility of gaining code execution. Your exploit payload needs to pass through an MPEG decoder and PCM synth before possibly reaching the CPU. Some heap corruption can follow at the least. So update or mitigate. If you run 1.32.x, there is no excuse not to get the the latest bugfix release now. Basically any version of mpg123 is affected by this, at least those that explicitly support so-called Frankenstein streams. Thanks to kkkkk123 for bringing this heir to the initial bug 322 to my attention. 1.32.8 ------ - libmpg123: -- Add sections to assembly to support PAC/BTI code for aarch64 (-mbranch-protection variants), thanks to Bill Roberts (github PR 15). -- Prevent premature application of header info into decoding structure, at worst having triggered out-of-bounds writes of decoded PCM data (bug 322, again). - out123: Show --quiet in --longhelp. Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2024-09-20 00:22:56
|
Dear friends of mpg123, it would be great if anyone with a (modern) 64 bit ARM system could check if the recent addition (revision 5431) of PAC/BTI code from https://github.com/madebr/mpg123/pull/15 works. I do not have the resources to verify that myself. I've only checked that a normal ARM build still works. You need some bleeding-edge toolchain and set of libraries with branch protection enabled to properly test things. I hope things for normal builds still are unchanged. With ./configure CFLAGS='-mbranch-protection=standard' you should be able to see a trace of the newly added note section that marks our assembly code as safe for the branch protection stuff. We do not actually change active code, just tell the linker that it should trust it. A BTI-enabled build should show up like this: readelf -n ./src/libmpg123/.libs/libmpg123.so | grep -i bti Properties: AArch64 feature: BTI, PAC Alrighty then, Thomas |
|
From: <ano...@gm...> - 2024-09-06 16:11:18
|
A pull request by billatarm was opened at 2024-09-06 15:17:54+00:00. Please visit https://github.com/madebr/mpg123/pull/15 to give feedback and review the code. --- Enable Pointer Authentication Codes (PAC) and Branch Target Identification (BTI) support for ARM 64 targets. PAC works by signing the LR with either an A key or B key and verifying the return address. Since the assembly code does not push and pop the link register to the stack, and it remains in the register file, their is no need to sign the LR, so PAC is essentially just adding it to the GNU notes section for auditing purposes. BTI works by marking all call and jump positions with bti c and bti j instructions. If execution control transfers via an indirect branch or call to an instruction other than a BTI instruction, the execution is killed via SIGILL. For BTI to work, all object files linked for a unit of execution, whether an executable or a library must have the GNU Notes section of the ELF file marked to indicate BTI support. This is so loader/linkers can apply the proper permission bits (PROT_BRI) on the memory region. PAC can also be annotated in the GNU ELF notes section, but it's not required for enablement, as interleaved PAC and non-pac code works as expected since it's the callee that performs all the checking. Becuase the aarch64 assembly code does not make use of pushing the LR to the stack, only BTI targets were needed to be instrumented and the GNU notes section indicating support for BTU. Thus for PAC the only requirement was to mark the GNU notes section as supporting PAC. Testing was done under the following CFLAGS: 1. -mbranch-protection=none 2. -mbranch-protection=standard 3. -mbranch-protection=pac-ret 4. -mbranch-protection=pac-ret+b-key 5. -mbranch-protection=bti <!-- Please write a little about the why and how of this pull request A mail should automatically get sent to the mpg123-devel mailing list. Before submitting, please check the following: - [ ] Set target branch to `master` - [ ] Write a little text above --> --- patch details: - url: https://github.com/madebr/mpg123/pull/15 - patch: https://github.com/madebr/mpg123/pull/15.patch url details: - user name: billatarm - user url: https://github.com/billatarm |
|
From: Thomas O. <tho...@or...> - 2024-08-07 16:33:56
|
Hi there, mpg123 1.32.7 is coming out, with only some minor hygiene: 1.32.7 ------ - ports/cmake: Work around bug in CMake that does not detect FPU on Apple ARM CPUs (github PR 14). - Fix some laziness (func() to func(void)) for standards conformance. You can get it from https://mpg123.org/download.shtml as usual. Alrighty then, Thomas |
|
From: <ano...@gm...> - 2024-05-02 00:36:33
|
A pull request by madebr was opened at 2024-05-01 23:15:10+00:00. Please visit https://github.com/madebr/mpg123/pull/14 to give feedback and review the code. --- On Apple silicon, `cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU)` returns `HAVE_FPU=0`. I reported this [upstream](https://gitlab.kitware.com/cmake/cmake/-/issues/25950). Without a detected fpu, the build fails when `REAL_IS_FIXED` is defined, and neon is detected. https://github.com/madebr/mpg123/actions/runs/8916112597/job/24486953667#step:5:13 My fix moves the cpu arch detection earlier, and hard enables `HAVE_FPU` for apple arm64. As an extra, I added a patch that adds macos CI. --- patch details: - url: https://github.com/madebr/mpg123/pull/14 - patch: https://github.com/madebr/mpg123/pull/14.patch url details: - user name: madebr - user url: https://github.com/madebr |
|
From: <ano...@gm...> - 2024-04-06 11:06:00
|
A pull request by basicmaster was opened at 2024-04-06 10:57:49+00:00. Please visit https://github.com/madebr/mpg123/pull/13 to give feedback and review the code. --- Fixes a tiny typo. --- patch details: - url: https://github.com/madebr/mpg123/pull/13 - patch: https://github.com/madebr/mpg123/pull/13.patch url details: - user name: basicmaster - user url: https://github.com/basicmaster |
|
From: Thomas O. <tho...@or...> - 2024-04-04 18:12:41
|
Dear mpg123 folks, a little build system tweak arrives in the current mpg123 release. 1.32.6 ------ - build: Detect forced 64 bit offsets on a dual-mode system that used to default to 32 bits and drop ambiguous suffix-less symbols in that case. This avoids subtle ABI breakage (causing memory corruption) with existing binaries and instead has them fail during runtime linking. You trigger that when having -D_FILE_OFFSET_BITS=64 in your compiler flags during mpg123 build. If this does not mean anything to you … you might just ignore it. No new features, just less symbols in a library built in an environment with enforced large file support. Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2024-02-17 15:38:47
|
Hi folks, some cleanup comes to you with mpg123 version 1.32.5: 1.32.5 ------ - build: -- CMake port uses CFLAGS for pulse/jack/tinyalsa properly now (bug 366). -- CMake port links libsyn123 with libm now (bug 370). - libmpg123: -- Fix --enable-portable (no usage of LFS_WRAP_NONE, bug 368). -- Fix dct36 wrapper usage for x86-64 and NEON. Stupid (bug 367) and also avoid returning void. -- Make ARM builds work with nagging (missing feature macros for std=c99). Grab it if you so desire from https://sourceforge.net/projects/mpg123/files/ or https://mpg123.org/download.shtml and have a good time. Alrighty then, Thomas |
|
From: Thomas O. <tho...@or...> - 2024-01-10 16:29:01
|
Hi all, some internal rearrangements and build system enhancements come with mpg123 1.32.4: 1.32.4 ------ - build: -- Reorganize shared headers, API headers into src/include. -- Use relative include paths, avoiding internal directories in CPPFLAGS except for config.h. -- Group C99 feature checks and make several standard headers mandatory. -- Get rid of SIZE_P, OFF_P and friends. -- Only enforce dummy module together with libout123, to be able to build individual modules using --disable-components logic. - out123: -- added --libversion - libmpg123: -- Avoid indirect branches into the assembly routines by using C wrappers also for dct36, relieving us of the need to care for bti / endbr instructions for control flow integrity. Get it from the usual places … Alrighty then, Thomas |
|
From: <ano...@gm...> - 2023-12-29 16:10:06
|
A pull request by JohannesKauffmann was opened at 2023-12-29 15:57:53+00:00. Please visit https://github.com/madebr/mpg123/pull/12 to give feedback and review the code. --- The function doesn't take a parameter, so don't pass it. Caught by Clang's -Wdeprecated-non-prototype: ``` ../src/streamdump.c:691:13: error: passing arguments to 'dump_close' without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] dump_close(sd); ^ ``` --- patch details: - url: https://github.com/madebr/mpg123/pull/12 - patch: https://github.com/madebr/mpg123/pull/12.patch url details: - user name: JohannesKauffmann - user url: https://github.com/JohannesKauffmann |
|
From: <ano...@gm...> - 2023-11-06 16:10:12
|
A pull request by i-garrison was opened at 2023-11-06 15:50:32+00:00. Please visit https://github.com/madebr/mpg123/pull/11 to give feedback and review the code. --- Allow building `mpg123` against installed `libmpg123` - add `programs` component to `configure.ac` - if building `libmpg123` is not enabled, find and use already installed `libmpg123` package; same for `libsyn123` and `libout123` - move a few shared internal headers from `src/libmpg123` to `src/include` to fix build against installed `libmpg123` package --- patch details: - url: https://github.com/madebr/mpg123/pull/11 - patch: https://github.com/madebr/mpg123/pull/11.patch url details: - user name: i-garrison - user url: https://github.com/i-garrison |