[PATCH 3/3] Linux: Keep termios ioctl constants strictly internal

Andreas K. Huettel dilfridge@gentoo.org
Fri Jul 18 19:31:11 GMT 2025


Am Freitag, 18. Juli 2025, 20:37:04 Mitteleuropäische Sommerzeit schrieb Florian Weimer:
> * Andreas K. Huettel:
> 
> > So we still need to sort out the sanitizer breakage for the release.
> >
> >> Undefine TCGETS, TCGETS2, and related ioctl constants in the installed
> >> headers.  Extract the correct constants (using the kernel type
> >> definitions) automatically from the UAPI headers.  The kernel
> >> constants are available under KERNEL_* names during the glibc build,
> >> computed using assembler constant extraction mechanism.
> >> 
> >> Alpha may have to use TCGETS instead of TCGETS2 because TCTGETS2
> >> became available in Linux 4.20 only.  Introduce ARCH_TCGETS to make
> >> this choice explict.
> >> 
> >> To support emulation on powerpc, glibc versions of the termios
> >> constants are added to the emulation code in internal-ioctl.h.
> >> 
> >> Tested on powerpc64-linux-gnu, x86_64-linux-gnu.  Built with
> >> build-many-glibcs.py.
> >
> > Right now the easiest momentary workaround seems to me to revert this
> > one commit?
> 
> Correct.  I'm no longer convinced that this is the direction we should
> go in, given that the TCGETS ioctl previously worked on many
> architectures, for at least some use cases.  (I didn't test this until
> today, wrongly assuming based on a study of the sources and based on
> what was discussed that the interfacee was terminally broken.)
> 
> I think exposing working termios2 ioctls instead would be the more
> correct course of action than removing the termios ioctls.  This would
> give applications an easier way to port to termios2.
> 
> Do you want me to test a revert?  Or do you want to push a revert of
> your own?

Please go ahead and test. Thank you!
Andreas

> 
> Thanks,
> Florian
> 
> 


-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer 
(council, comrel, toolchain, base-system, perl, libreoffice)
https://wiki.gentoo.org/wiki/User:Dilfridge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250718/edf21d04/attachment.sig>


More information about the Libc-alpha mailing list