No subject
H. Peter Anvin
hpa@zytor.com
Tue Jun 10 15:54:49 GMT 2025
On June 10, 2025 8:40:00 AM PDT, Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> wrote:
>
>
>On 07/06/25 23:19, H. Peter Anvin wrote:
>> From: "H. Peter Anvin" (Intel) <hpa@zytor.com>
>>
>> Subject: [PATCH v7 00/14] termios: support arbitrary baud rates on Linux, minor cleanups, alternative interface
>>
>> This is the arbitrary baud rates on Linux patchset, and the (proposed)
>> "explicitly true baudrate" interface proposed for future
>> standardization.
>>
>> It also includes some generic cleanups to the best of my ability, and
>> removes USE_OLD_TTY from Hurd, which was the only remaining cause of
>> speed_t not being an actual baud rate.
>>
>> A git tree is also available at:
>> https://git.zytor.com/linux/glibc/ branch hpa/termios7
>>
>> Changes in v7: (special thanks to Adhemerval Zanella for reviews)
>>
>> - Stylistic and typo fixes.
>> - Add missing copyright headers.
>> - Make the (already existing) padding field in struct termios explicit
>> and make sure the full structure is initialized by tcgetattr(). This
>> could help future expansion, and is just good practice.
>> (Added as a separate patch in order to not invalidate previous
>> reviews.)
>
>Unfortunately this break m68k, since it uses 2-byte alignment. One
>possibility is to add a termios-struct.h for m68k, another one is
>drop this patch (and send a new one for this specific change).
>
>> - Simplify the test case by making better use of <support/check.h>
>> macros. (Not quite as completely as Adhemerval had suggested, in
>> order to get a little more information into certain error messages.)
>>
>> Changes in v6: (special thanks to Adhemerval Zanella for bug reports)
>>
>> - Fix the definition of CIBAUD on Alpha, and add explicit compile-time
>> tests for CBAUD and CIBAUD validity.
>> - Fix the PowerPC build (stray <bits/sockios.h> remained, rather than
>> <linux/sockios.h>.)
>> - Remove a spurious indentation change in <bits/termios-struct.h> on
>> Linux.
>> - Separate the unification of the B constants and the updating of the
>> manual into separate patches.
>> - Update the baud_t documentation to indicate that speed_t == baud_t
>> is not going to be guaranteed in future versions, only that baud_t
>> is a numeric type.
>>
>> Changes in v5.2:
>>
>> - tst-termios-linux: clean up the definition of the VERIFY and CHECK macros
>> - make sure sysdeps/unix/sysv/linux/Makefile is sorted to prevent lint error
>>
>> Changes in v5:
>>
>> - Added test for various combinations of the legacy and new interfaces.
>> - Fix several typos that caused major malfunctions, oops...
>> - Added Signed-off-bys for the Hurd patches.
>>
>> Changes in v4:
>>
>> - Using <linux/sockios.h> instead of a copied <bits/sockios.h>.
>> - __local_isatty() renamed __isatty_nostatus().
>> - Use *_CALL() versions of the SYSCALL macros.
>> - Fix USE_OLD_TTY removal on Hurd (missing #endif.)
>> - Fix speed_t being signed on Hurd (should be unsigned per POSIX.)
>> - Merge the speed_t constant definitions as they are now all identical.
>> - Use anonymous unions to support both __ispeed/__ospeed and
>> c_ispeed/c_ospeed on all platforms, for consistency.
>> - All baud rate constants added to the manual.
>>
>> Changes in v3:
>>
>> - Fix improper use of tcsetattr() instead of __tcsetattr() in
>> misc/getpass.c
>> - The .abilist files need to be sorted
>> - Move Hurd USE_OLD_TTY removal to before the *baud() interface patch
>>
>> NEWS | 4 +
>> bits/termios-baud.h | 72 +++
>> bits/termios.h | 54 +-
>> include/termios.h | 27 +-
>> include/unistd.h | 1 +
>> io/Makefile | 1 +
>> .../mips/kernel_termios.h => io/isatty_nostatus.c | 36 +-
>> libio/filedoalloc.c | 12 +-
>> login/openpty.c | 2 +-
>> manual/terminal.texi | 164 +++++-
>> misc/getpass.c | 4 +-
>> sysdeps/mach/hurd/bits/ioctls.h | 31 +-
>> sysdeps/mach/hurd/i386/libc.abilist | 5 +
>> sysdeps/mach/hurd/x86_64/libc.abilist | 5 +
>> sysdeps/unix/bsd/tcsetattr.c | 6 +-
>> sysdeps/unix/sysv/linux/Makefile | 2 +-
>> sysdeps/unix/sysv/linux/Versions | 7 +
>> sysdeps/unix/sysv/linux/aarch64/libc.abilist | 10 +
>> .../unix/sysv/linux/alpha/bits/termios-c_cflag.h | 2 +
>> .../alpha/bits/{termios-baud.h => termios-cbaud.h} | 43 +-
>> sysdeps/unix/sysv/linux/alpha/kernel-features.h | 11 +
>> sysdeps/unix/sysv/linux/alpha/kernel_termios.h | 43 --
>> sysdeps/unix/sysv/linux/alpha/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/arc/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/arm/be/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/arm/le/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/bits/ioctls.h | 85 +--
>> sysdeps/unix/sysv/linux/bits/termios-c_cflag.h | 4 +-
>> .../linux/bits/{termios-baud.h => termios-cbaud.h} | 41 +-
>> sysdeps/unix/sysv/linux/bits/termios-struct.h | 11 +-
>> sysdeps/unix/sysv/linux/bits/termios.h | 50 +-
>> sysdeps/unix/sysv/linux/cfsetspeed.c | 59 ++
>> sysdeps/unix/sysv/linux/csky/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/hppa/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/i386/libc.abilist | 10 +
>> .../linux/{mips/bits/termios-struct.h => isatty.c} | 30 +-
>> .../bits/termios-struct.h => isatty_nostatus.c} | 28 +-
>> sysdeps/unix/sysv/linux/kernel-features.h | 4 +
>> sysdeps/unix/sysv/linux/kernel_termios.h | 20 +-
>> .../unix/sysv/linux/loongarch/lp64/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/microblaze/be/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/microblaze/le/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/mips/Versions | 4 +
>> .../unix/sysv/linux/mips/mips32/fpu/libc.abilist | 12 +
>> .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist | 12 +
>> .../unix/sysv/linux/mips/mips64/n32/libc.abilist | 12 +
>> .../unix/sysv/linux/mips/mips64/n64/libc.abilist | 12 +
>> sysdeps/unix/sysv/linux/mips/old_termios.h | 12 +
>> sysdeps/unix/sysv/linux/old_termios.h | 4 +
>> sysdeps/unix/sysv/linux/or1k/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h | 36 ++
>> .../unix/sysv/linux/powerpc/bits/termios-c_cflag.h | 4 +-
>> .../bits/{termios-baud.h => termios-cbaud.h} | 42 +-
>> sysdeps/unix/sysv/linux/powerpc/kernel_termios.h | 53 --
>> .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 10 +
>> .../linux/powerpc/powerpc32/nofpu/libc.abilist | 10 +
>> .../sysv/linux/powerpc/powerpc64/be/libc.abilist | 10 +
>> .../sysv/linux/powerpc/powerpc64/le/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/sh/be/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/sh/le/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/sparc/Versions | 4 +
>> .../sparc/bits/{termios-baud.h => termios-cbaud.h} | 39 +-
>> sysdeps/unix/sysv/linux/sparc/old_termios.h | 12 +
>> sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist | 12 +
>> sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist | 12 +
>> sysdeps/unix/sysv/linux/speed.c | 363 ++++++++++--
>> sysdeps/unix/sysv/linux/tcgetattr.c | 85 ++-
>> sysdeps/unix/sysv/linux/tcsetattr.c | 125 +++--
>> sysdeps/unix/sysv/linux/termios_internals.h | 97 ++++
>> sysdeps/unix/sysv/linux/tst-termios-linux.c | 610 +++++++++++++++++++++
>> sysdeps/unix/sysv/linux/tst-termios-speed-tables.c | 86 +++
>> sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 10 +
>> sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 10 +
>> termios/Makefile | 7 +-
>> termios/Versions | 4 +
>> termios/baud.c | 56 ++
>> .../sparc/kernel_termios.h => termios/cfsetbaud.c | 35 +-
>> termios/cfsetspeed.c | 142 +----
>> termios/speed.c | 18 +-
>> termios/sys/ttychars.h | 4 -
>> termios/tcsetattr.c | 5 +-
>> termios/termios.h | 19 +-
>> 88 files changed, 2284 insertions(+), 778 deletions(-)
>
I'll respin the set if you want.
More information about the Libc-alpha
mailing list